From 7d83e028d2e17ba8c7a7f85c636c124c67e989db Mon Sep 17 00:00:00 2001 From: Aleksandar Grbic Date: Wed, 26 Aug 2026 11:06:33 +0200 Subject: [PATCH 1/2] chore: bump pinned Bun version to 1.4.0 Pins CI and engines.bun to 1.4.0 (was 1.3.14) so the local dev toolchain and CI stay in sync with the currently installed Bun. Opening as its own PR to see what CI surfaces on Linux before fixing anything. --- .github/workflows/core-ci.yml | 2 +- .github/workflows/docs-linkcheck.yml | 2 +- .github/workflows/release.yml | 2 +- .github/workflows/security-deps.yml | 2 +- package.json | 2 +- packages/core/package.json | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/core-ci.yml b/.github/workflows/core-ci.yml index 57daeefb..31ca91b2 100644 --- a/.github/workflows/core-ci.yml +++ b/.github/workflows/core-ci.yml @@ -50,7 +50,7 @@ jobs: if: steps.filter.outputs.code == 'true' uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2.2.0 with: - bun-version: 1.3.14 + bun-version: 1.4.0 - name: Cache bun install if: steps.filter.outputs.code == 'true' diff --git a/.github/workflows/docs-linkcheck.yml b/.github/workflows/docs-linkcheck.yml index 3c135b45..d7f4cfcf 100644 --- a/.github/workflows/docs-linkcheck.yml +++ b/.github/workflows/docs-linkcheck.yml @@ -51,7 +51,7 @@ jobs: if: steps.filter.outputs.docs == 'true' uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2.2.0 with: - bun-version: 1.3.14 + bun-version: 1.4.0 - name: Cache bun install if: steps.filter.outputs.docs == 'true' diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index dcb37c0b..7bd4bff2 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -31,7 +31,7 @@ jobs: - name: Set up Bun uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2.2.0 with: - bun-version: 1.3.14 + bun-version: 1.4.0 - name: Cache bun install uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0 diff --git a/.github/workflows/security-deps.yml b/.github/workflows/security-deps.yml index 4d505677..8b203abc 100644 --- a/.github/workflows/security-deps.yml +++ b/.github/workflows/security-deps.yml @@ -100,7 +100,7 @@ jobs: if: steps.filter.outputs.code == 'true' uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2.2.0 with: - bun-version: 1.3.14 + bun-version: 1.4.0 - name: bun audit if: steps.filter.outputs.code == 'true' diff --git a/package.json b/package.json index 6bf6209a..89920da0 100644 --- a/package.json +++ b/package.json @@ -36,7 +36,7 @@ "packageManager": "bun@1.3.14", "engines": { "node": ">=24.0.0", - "bun": "1.3.14" + "bun": "1.4.0" }, "devDependencies": { "@ast-grep/cli": "^0.45.0", diff --git a/packages/core/package.json b/packages/core/package.json index ecb2f293..50eefa6f 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -23,7 +23,7 @@ "strict.type-aware.eslint.config.mjs" ], "engines": { - "bun": ">=1.3.14" + "bun": ">=1.4.0" }, "publishConfig": { "access": "public" From 5ad8be9eec4797233565b7cc66cf2cf407d99072 Mon Sep 17 00:00:00 2001 From: Aleksandar Grbic Date: Thu, 27 Aug 2026 12:24:09 +0200 Subject: [PATCH 2/2] fix: adapt drain-bound test to Bun 1.4's spawnSync change; widen a timeout MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Bun 1.4 made Bun.spawnSync with inherited stdio wait for every process sharing that stdio (including a backgrounded job), where 1.3.14 didn't — so the "output drain is bounded when a backgrounded child holds the pipe open" test's own simulation blocked for the full 5s instead of exercising the fast-exit case it's meant to cover. Swapping the nested spawnSync for a fire-and-forget async Bun.spawn (matching a real shell `&`) restores it; process.ts's actual drain-bound logic was never broken — confirmed directly against the real runArgvCommand path, which still settles in ~500ms on 1.4.0. Also widens edit-autoformat.e2e.test.ts's timeout from bun:test's 5s default to 15s: it drives real eslint+prettier subprocesses and came close to that ceiling under CI load. --- packages/core/tests/edit-autoformat.e2e.test.ts | 2 +- packages/core/tests/script-tool.test.ts | 7 ++++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/packages/core/tests/edit-autoformat.e2e.test.ts b/packages/core/tests/edit-autoformat.e2e.test.ts index 6bb14440..16c74c64 100644 --- a/packages/core/tests/edit-autoformat.e2e.test.ts +++ b/packages/core/tests/edit-autoformat.e2e.test.ts @@ -39,4 +39,4 @@ test("a pre-format edit anchor survives the real write-guard auto-format", async } finally { await rm(dir, { recursive: true, force: true }); } -}); +}, 15_000); diff --git a/packages/core/tests/script-tool.test.ts b/packages/core/tests/script-tool.test.ts index bde59b6c..b190f8f0 100644 --- a/packages/core/tests/script-tool.test.ts +++ b/packages/core/tests/script-tool.test.ts @@ -394,8 +394,13 @@ test("the output drain is bounded when a backgrounded child holds the pipe open" // stdout pipe) then exits immediately, so `bun` exits fast while the orphan // keeps the pipe open. An unbounded drain (`Response(stdout).text()`) would // block the whole 5s waiting for EOF; the shared runner bounds it. + // Fire-and-forget async `Bun.spawn` here, NOT `Bun.spawnSync`: Bun 1.4 made + // `spawnSync` with inherited stdio wait for everything sharing that stdio + // (including this backgrounded job) before returning, which defeated the + // simulation — the script itself would block for the full 5s. `Bun.spawn` + // launches it and returns immediately, matching a real shell `&`. const code = [ - `Bun.spawnSync(["sh", "-c", "sleep 5 &"], { stdout: "inherit" });`, + `Bun.spawn(["sh", "-c", "sleep 5 &"], { stdout: "inherit" });`, 'console.log("SCRIPT_DONE");', ].join("\n"); const events: ILoopEvent[] = [];