plugins: avoid peer auto-install dependency bloat (#34017)

* plugins/install: omit peer deps during plugin npm install

* tests: assert plugin install omits peer deps

* extensions/googlechat: mark openclaw peer optional

* extensions/memory-core: mark openclaw peer optional
This commit is contained in:
Vincent Koc
2026-03-03 22:00:15 -08:00
committed by GitHub
parent a95a0be133
commit dfb4cb87f9
4 changed files with 19 additions and 2 deletions

View File

@@ -11,7 +11,14 @@ export function expectSingleNpmInstallIgnoreScriptsCall(params: {
throw new Error("expected npm install call");
}
const [argv, opts] = first;
expect(argv).toEqual(["npm", "install", "--omit=dev", "--silent", "--ignore-scripts"]);
expect(argv).toEqual([
"npm",
"install",
"--omit=dev",
"--omit=peer",
"--silent",
"--ignore-scripts",
]);
expect(opts?.cwd).toBe(params.expectedCwd);
}