diff --git a/scripts/lib/plugin-package-dependencies.mjs b/scripts/lib/plugin-package-dependencies.mjs index d1f3c2a97e35..cdb44c72e580 100644 --- a/scripts/lib/plugin-package-dependencies.mjs +++ b/scripts/lib/plugin-package-dependencies.mjs @@ -50,6 +50,11 @@ export function collectBundledPluginPackageDependencySpecs(bundledPluginsDir) { for (const packageJsonPath of packageJsonPaths) { const packageJson = JSON.parse(fs.readFileSync(packageJsonPath, "utf8")); + // External official plugins own isolated npm projects, so their dependency + // specs do not need to match packages bundled into the root distribution. + if (packageJson.openclaw?.build?.bundledDist === false) { + continue; + } const pluginId = path.basename(path.dirname(packageJsonPath)); for (const [name, spec] of collectRuntimeDependencySpecs(packageJson)) { const existing = specs.get(name); diff --git a/test/scripts/plugin-package-dependencies.test.ts b/test/scripts/plugin-package-dependencies.test.ts index eb053215c8d1..3e0f08adb550 100644 --- a/test/scripts/plugin-package-dependencies.test.ts +++ b/test/scripts/plugin-package-dependencies.test.ts @@ -74,6 +74,16 @@ describe("scripts/lib/plugin-package-dependencies.mjs", () => { shared: "^1.1.0", }, }); + writePackageJson(root, "external", { + dependencies: { + shared: "^9.0.0", + }, + openclaw: { + build: { + bundledDist: false, + }, + }, + }); expect([...collectBundledPluginPackageDependencySpecs(root)]).toEqual([ [