Repository navigation
chore(runtime): declare and warn a minimum Bun version - #81
Merged
Merged
Conversation
|
🎉 This PR is included in version 0.8.12 🎉 The release is available on: Your semantic-release bot 📦🚀 |
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.
What
The plugin runs inside opencode v2, whose compiled binaries embed Bun (upstream builds release binaries with
BUN_COMPILE_RELEASE; older v2 builds embed older Bun). Nothing in this repo declares which Bun is old enough to matter: noengines, and@opencode/pluginis type-only. When the embedded Bun is old, the failure mode is odd memory-store errors, not a clean unsupported signal.This adds a warn-only floor:
src/runtime.ts— pure helpers (parseBunVersion,MIN_BUN = 1.3.0,bunFloorWarning), 10 new unit tests intest/runtime.test.tssrc/index.ts— one warn-once check insetup(), same style as the existingcaptureModelwarningpackage.json—engines.bun: ">=1.3.0"(documentation-grade; Bun itself doesn't enforce it)Why 1.3.0
It is the floor this repo has actually been run against, not an OS-level decision anyone is being asked to make: 1.3.10 and 1.4.4 are the two versions the test suite has been validated on. It is deliberately conservative — below the floor you get one startup warning line, nothing is blocked. Happy to move the number if a different floor matches reality better; the point is that the floor exists and is discoverable.
Deliberate choice worth eyeballing
An unparseable version string also warns once ("unrecognized"). Rationale: unknown host = untested host, and one startup line is cheap. If you'd rather stay silent on unparseable versions, that's a two-line change to
bunFloorWarning.Verification
main(theDirHandle.close()TypeError inresolver.tsand a lock-contention race — fixed by fix(store): make the store's file semantics hold on Windows (+ a windows-latest CI leg) #89, the Windows store-semantics PR in this same batch; unrelated to this diff).tsc --noEmitclean;biome lintno new diagnostics.