Skip to content

chore(runtime): declare and warn a minimum Bun version - #81

Merged
abogartz merged 3 commits into
abogartz:mainfrom
WhollyMindless:chore/bun-version-floor
Oct 24, 2026
Merged

abogartz merged 3 commits into
abogartz:mainfrom
WhollyMindless:chore/bun-version-floor

Conversation

@WhollyMindless

@WhollyMindless WhollyMindless commented Oct 24, 2026 •

Copy link
Copy Markdown
Contributor

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: no engines, and @opencode/plugin is 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 in test/runtime.test.ts
  • src/index.ts — one warn-once check in setup(), same style as the existing captureModel warning
  • package.json — engines.bun: ">=1.3.0" (documentation-grade; Bun itself doesn't enforce it)
  • README — two lines in the install section

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

@abogartz
abogartz merged commit 3f31efd into abogartz:main Oct 24, 2026
3 checks passed
@abogartz-opencode-self-improvement

Copy link
Copy Markdown

🎉 This PR is included in version 0.8.12 🎉

The release is available on:

Your semantic-release bot 📦🚀

@WhollyMindless
WhollyMindless deleted the chore/bun-version-floor branch October 26, 2026 00:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants