Skip to content

fix(dev): refuse Bun older than 1.4.1 instead of hanging the editor - #526

Merged
DavidBabinec merged 1 commit into
mainfrom
fix/bun-version-guard
Sep 11, 2026
Merged

DavidBabinec merged 1 commit into
mainfrom
fix/bun-version-guard

Conversation

@DavidBabinec

Copy link
Copy Markdown
Contributor

The bug

After #503 the dev stack needs Bun 1.4.1 (the Vite proxy now forwards the editor's WebSocket), but nothing enforces engines.bun. On Bun 1.3.x bun run dev comes up looking healthy and the editor's collab socket hangs in CONNECTING with no error. No doc stated a Bun version either.

The fix

server/bunVersion.ts holds the supported range (mirrors engines.bun, gated by a test) and the dev-stack minimum. bun run dev and bun run e2e:dev exit with a one-line message on an older Bun before touching ports or dependencies. The server logs one [server] warning outside the range and boots anyway: a direct install must not go down over a version skew. Docker images and Desktop bundles carry their own Bun and are unaffected. The README, vps.md, and server.md now state the requirement.

Verification

bun test                         # 6866 pass, 0 fail (Bun 1.4.2)
bun run build && bun run lint    # clean (Bun 1.4.2)
bun run dev         (Bun 1.3.11) # exits 1: "Bun 1.3.11 is too old for the dev stack ..."
bun server/index.ts (Bun 1.3.11) # logs the warning, then Listening; GET / -> 302

Nothing in Bun enforces engines.bun, so after the Vite proxy started
forwarding the editor's WebSocket a developer on Bun 1.3.x got a dev
stack that looked healthy while the collab socket hung in CONNECTING.
The launchers now exit with the reason. The production server only
warns, because a direct install must keep serving across a version skew,
and the docs finally name the supported Bun.
@DavidBabinec
DavidBabinec merged commit d2a192a into main Sep 11, 2026
11 checks passed
@DavidBabinec
DavidBabinec deleted the fix/bun-version-guard branch September 11, 2026 12:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant