Skip to content

chore(bun): upgrade to Bun 1.4.2 and pin the version in one place - #502

Draft
DavidBabinec wants to merge 1 commit into
mainfrom
chore/bun-1.4
Draft

chore(bun): upgrade to Bun 1.4.2 and pin the version in one place#502
DavidBabinec wants to merge 1 commit into
mainfrom
chore/bun-1.4

Conversation

@DavidBabinec

Copy link
Copy Markdown
Contributor

What changed

Bun moves from 1.3.11 to 1.4.2, and the version is written in two places instead of ten.

  • package.json gains "packageManager": "bun@1.4.2", which oven-sh/setup-bun@v2 reads by default, so the six bun-version: inputs in ci.yml and release.yml are gone.
  • Dockerfile declares ARG BUN_VERSION=1.4.2 once; the three stages build FROM oven/bun:${BUN_VERSION}.
  • engines.bun widens to >=1.4.0 <1.5.0.
  • dockerConfig.test.ts asserts the ARG and the templated FROM; the bootstrap determinism note in scripts/sync-plugin-bootstrap.ts names the new range and image.

Bumping Bun next time is the packageManager field and the ARG.

Why

1.4 brings a native React Compiler in bun build, 2x faster startup and under half the memory on Linux, and 1.4.1 fixed a run of node:http and socket lifecycle bugs (the Vite port-retry hang, paused sockets never emitting end, ws handleUpgrade after an await, WebSocket backpressure stalls) that map onto the dev-server workarounds this repo carries. Those get re-tested on top of this pin bump and, where the fixes hold, deleted in a follow-up, so each step stays reviewable on its own.

Impact

Verification

Isolated Bun 1.4.2 binary in a fresh worktree off main (the global 1.3.11 untouched):

Check Result
bun install --frozen-lockfile clean, bun.lock unchanged
bun run bootstrap:check fresh, both QuickJS bootstrap artifacts byte-identical
bun run icons:check clean
bun run build tsc and Vite clean
bun run lint clean
bun test 6836 pass, 0 fail
bun test src/__tests__/server/dockerConfig.test.ts 10 pass on the ARG shape

CI on this PR is the Linux proof; the local run is macOS.

Bun moves from 1.3.11 to 1.4.2, and the version stops being written in
ten places. package.json now carries "packageManager": "bun@1.4.2",
which oven-sh/setup-bun reads by default, so the six workflow steps in
ci.yml and release.yml drop their explicit bun-version. The Dockerfile
declares ARG BUN_VERSION=1.4.2 once and the three stages build from it.
The engines range widens to >=1.4.0 <1.5.0. Bumping Bun is now two lines
(the packageManager field and the ARG), and the Docker gate test asserts
that shape. The bootstrap determinism note in
scripts/sync-plugin-bootstrap.ts names the new range and image.

Nothing else had to change: install with the frozen lockfile, tsc, the
Vite build, lint, and the full test suite all pass under 1.4.2 with the
lockfile untouched, and the committed QuickJS bootstrap artifacts are
byte-identical under the new bundler (bootstrap:check).

Why now: 1.4 brings a native React Compiler in bun build, 2x faster
startup and less than half the memory on Linux, and 1.4.1 fixed a run of
node:http and socket lifecycle bugs (Vite port-retry hang, paused sockets
never emitting end, ws handleUpgrade after await, WebSocket backpressure)
that map onto the dev-server workarounds this repo carries. Those get
re-tested and, where the fixes hold, deleted in a follow-up on top of
this pin bump, so each step stays reviewable on its own.

Verification (isolated Bun 1.4.2, global stays 1.3.11):
  bun install --frozen-lockfile        clean, lockfile unchanged
  bun run bootstrap:check              fresh, 2 artifacts byte-identical
  bun run icons:check                  clean
  bun run build                        tsc + vite clean
  bun run lint                         clean
  bun test                             6836 pass, 0 fail
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