Skip to content

build: upgrade the toolchain to bun 1.4 - #14

Merged
ilbertt merged 2 commits into
mainfrom
claude/bun-v1-4-upgrade-b0c8a5
Aug 20, 2026
Merged

ilbertt merged 2 commits into
mainfrom
claude/bun-v1-4-upgrade-b0c8a5

Conversation

@ilbertt

@ilbertt ilbertt commented Aug 20, 2026 •

Copy link
Copy Markdown
Owner

Upgrades the development toolchain to Bun 1.4.0 (.bun-version, packageManager).

engines.bun stays at ^1.3.0 — the full suite passes on 1.3.14 across Postgres 16/17/18 and SQLite, and nothing in src/ uses a 1.4 API.

Bun 1.4 is worth recommending in the README, though: before it, bun:sql could hand one Postgres query's rows to another when a parameter-less query and a parameterized one shared a connection (oven-sh/bun#32772), and every findMany/count/INSERT … DEFAULT VALUES this adapter emits with no bound params takes that path. That's a reason to advise 1.4, not to refuse 1.3.

Also switches check:all to bun run --parallel --no-exit-on-error (new in 1.4), so a type error no longer hides every Biome finding.

The rest of the 1.4 changelog was audited and needs no code change — = ANY($1) with a bound array still fails and count(*) still decodes as a string, so both workarounds stay.

ilbertt and others added 2 commits August 20, 2026 16:56
Bumps the toolchain to Bun 1.4.0 (`.bun-version`, `packageManager`) and
raises `engines.bun` to `^1.4.0`.

The floor moves for a correctness reason, not just currency: before 1.4,
`bun:sql` could hand one Postgres query's rows to another when a
parameter-less simple-protocol query overlapped a not-yet-prepared
parameterized one on the same connection (oven-sh/bun#32772). Every
`findMany`/`count`/`INSERT … DEFAULT VALUES` this adapter emits with no
bound params takes that path, so the adapter produced exactly the mix
that triggered it.

`check:all` now runs through `bun run --parallel --no-exit-on-error`
(new in 1.4) instead of `&&`, so a type error no longer hides every
Biome finding.

Two comments claimed `options.adapter` is absent on a default Postgres
connection. It never is — on 1.3.14 or 1.4.0 — only the hand-rolled test
doubles omit it, so the wording now says that. The `undefined` fallback
stays; the doubles need it.

The rest of the 1.4 changelog was audited and needs nothing: `= ANY($1)`
with a bound array still fails, so the placeholder expansion in
`#inList` stays; `count(*)` still decodes as a string, so the `::int`
cast stays; `bun.lock` stays at `lockfileVersion: 1`, which is what Bun
1.4 writes for an unchanged lockfile.

BREAKING CHANGE: Bun 1.4 or later is now required.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
Reverts the consumer floor raised in the previous commit. The full suite
passes on Bun 1.3.14 across Postgres 16/17/18 and SQLite (671/671), and
nothing in `src/` uses a 1.4 API, so there was no floor to raise. The
toolchain pins (`.bun-version`, `packageManager`) stay at 1.4.0.

oven-sh/bun#32772 is still worth telling users about, so the README note
becomes a recommendation rather than a requirement. It was never an
argument for a hard floor: `engines` isn't enforced — installing this
package under Bun 1.3 succeeds with no warning — so the floor would have
cost a breaking release and bought nothing.

AGENTS.md said the three Bun versions "must be bumped together", which
is what argued for moving `engines.bun` in lockstep. It now separates
the toolchain pin from the consumer floor.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
@ilbertt ilbertt changed the title build!: require bun 1.4 build: upgrade the toolchain to bun 1.4 Aug 20, 2026
@ilbertt
ilbertt merged commit e35403f into main Aug 20, 2026
7 checks passed
@ilbertt
ilbertt deleted the claude/bun-v1-4-upgrade-b0c8a5 branch August 20, 2026 15:05
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