mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-06 20:00:42 +00:00
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:
committed by
GitHub
parent
8642137252
commit
f6360da116
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user