fix(plugins): stop eager bundled plugin dep install (#69334)

* fix(plugins): stop eager bundled plugin dep install

* test(auto-reply): mock direct auth profile store imports
This commit is contained in:
Peter Steinberger
2026-04-20 14:41:18 +01:00
committed by GitHub
parent f006678f3c
commit 8a4332864b
3 changed files with 39 additions and 9 deletions

View File

@@ -100,7 +100,7 @@ describe("bundled plugin postinstall", () => {
});
});
it("installs bundled plugin deps outside of source checkouts", async () => {
it("does not install bundled plugin deps outside of source checkouts by default", async () => {
const extensionsDir = await createExtensionsDir();
const packageRoot = path.dirname(path.dirname(extensionsDir));
await writePluginPackage(extensionsDir, "acpx", {
@@ -119,7 +119,7 @@ describe("bundled plugin postinstall", () => {
log: { log: vi.fn(), warn: vi.fn() },
});
expect(spawnSync).toHaveBeenCalled();
expect(spawnSync).not.toHaveBeenCalled();
});
it("prunes source-checkout bundled plugin node_modules", async () => {
@@ -431,6 +431,7 @@ describe("bundled plugin postinstall", () => {
runBundledPluginPostinstall({
env: {
OPENCLAW_EAGER_BUNDLED_PLUGIN_DEPS: "1",
npm_config_global: "true",
npm_config_location: "global",
npm_config_prefix: "/opt/homebrew",
@@ -494,7 +495,7 @@ describe("bundled plugin postinstall", () => {
const spawnSync = vi.fn(() => ({ status: 0, stderr: "", stdout: "" }));
runBundledPluginPostinstall({
env: { HOME: "/tmp/home" },
env: { HOME: "/tmp/home", OPENCLAW_EAGER_BUNDLED_PLUGIN_DEPS: "1" },
extensionsDir,
packageRoot,
arch: "arm64",
@@ -614,6 +615,7 @@ describe("bundled plugin postinstall", () => {
runBundledPluginPostinstall({
env: {
OPENCLAW_EAGER_BUNDLED_PLUGIN_DEPS: "1",
npm_config_global: "true",
npm_config_location: "global",
npm_config_prefix: "/opt/homebrew",
@@ -653,6 +655,7 @@ describe("bundled plugin postinstall", () => {
runBundledPluginPostinstall({
env: {
OPENCLAW_EAGER_BUNDLED_PLUGIN_DEPS: "1",
HOME: "/tmp/home",
},
extensionsDir,
@@ -677,6 +680,7 @@ describe("bundled plugin postinstall", () => {
runBundledPluginPostinstall({
env: {
OPENCLAW_EAGER_BUNDLED_PLUGIN_DEPS: "1",
npm_config_location: "global",
npm_config_prefix: "/opt/homebrew",
HOME: "/tmp/home",