From 23fde448ec9767a13bb9bf3a337f6ed1d4d885b0 Mon Sep 17 00:00:00 2001 From: "opencode-agent[bot]" <219766164+opencode-agent[bot]@users.noreply.github.com> Date: Mon, 31 Aug 2026 23:01:02 -0500 Subject: [PATCH] test(cli): isolate Bun define cache (#46536) Co-authored-by: rekram1-node <63023139+rekram1-node@users.noreply.github.com> --- packages/cli/test/updater-install.test.ts | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/packages/cli/test/updater-install.test.ts b/packages/cli/test/updater-install.test.ts index eb90ef01d99..775b49af7ee 100644 --- a/packages/cli/test/updater-install.test.ts +++ b/packages/cli/test/updater-install.test.ts @@ -198,7 +198,13 @@ test("Node distribution honors the compile-time CLI name", async () => { "--test-name-pattern", "^Node distribution resolves the published npm package$", ], - { cwd: path.join(import.meta.dir, ".."), stdout: "ignore", stderr: "pipe" }, + { + cwd: path.join(import.meta.dir, ".."), + stdout: "ignore", + stderr: "pipe", + // Bun 1.4 can reuse cached modules compiled with different --define values. + env: { ...process.env, BUN_RUNTIME_TRANSPILER_CACHE_PATH: "0" }, + }, ) const [code, stderr] = await Promise.all([child.exited, new Response(child.stderr).text()]) expect(code, stderr).toBe(0)