fix(dev): refuse Bun older than 1.4.1 instead of hanging the editor - #526
Merged
Merged
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.xbun run devcomes 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.tsholds the supported range (mirrorsengines.bun, gated by a test) and the dev-stack minimum.bun run devandbun run e2e:devexit 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, andserver.mdnow state the requirement.Verification