fix(deps): remove extension-owned deps from root install (#69335)

* fix(deps): remove extension runtime deps from root install

* fix(deps): keep bundled plugin deps local

* test(plugins): assert matrix deps stay plugin-local
This commit is contained in:
Peter Steinberger
2026-04-20 15:03:09 +01:00
committed by GitHub
parent 8642137252
commit f6360da116
9 changed files with 80 additions and 270 deletions

View File

@@ -194,7 +194,6 @@ export function collectRootDistBundledRuntimeMirrors(params) {
}
export function collectBundledPluginRootRuntimeMirrorErrors(params) {
const rootRuntimeDeps = collectRuntimeDependencySpecs(params.rootPackageJson);
const errors = [];
for (const [dependencyName, record] of params.bundledRuntimeDependencySpecs) {
@@ -205,25 +204,5 @@ export function collectBundledPluginRootRuntimeMirrorErrors(params) {
}
}
for (const [dependencyName, mirror] of params.requiredRootMirrors) {
const rootSpec = rootRuntimeDeps.get(dependencyName);
const importers = [...mirror.importers].toSorted((left, right) => left.localeCompare(right));
const importerLabel = importers.join(", ");
const pluginLabel = mirror.pluginIds
.toSorted((left, right) => left.localeCompare(right))
.join(", ");
if (typeof rootSpec !== "string" || rootSpec.length === 0) {
errors.push(
`root dist imports bundled plugin runtime dependency '${dependencyName}' from ${importerLabel}; mirror '${dependencyName}: ${mirror.spec}' in root package.json (declared by ${pluginLabel}).`,
);
continue;
}
if (rootSpec !== mirror.spec) {
errors.push(
`root dist imports bundled plugin runtime dependency '${dependencyName}' from ${importerLabel}; root package.json has '${rootSpec}' but plugin manifest declares '${mirror.spec}' (${pluginLabel}).`,
);
}
}
return errors;
}