Skip to content

fix(deps): bump better-sqlite3 to 12.11.1 + CI Node to 22 (Node 26 support)#16

Merged
iaj6 merged 1 commit into
mainfrom
fix/better-sqlite3-node26
Jun 17, 2026
Merged

fix(deps): bump better-sqlite3 to 12.11.1 + CI Node to 22 (Node 26 support)#16
iaj6 merged 1 commit into
mainfrom
fix/better-sqlite3-node26

Conversation

@iaj6

@iaj6 iaj6 commented Jun 17, 2026

Copy link
Copy Markdown
Owner

Problem

better-sqlite3@^11 has no prebuilt binary for Node 26 (ABI 147) and won't compile against Node 26 headers (node-gyp fails at the better_sqlite3.o step). Dev machines that have moved to Node 26 can't run npm run test at all — the native module fails to load. (CI on Node 20 was fine, so this was local-only, but it blocks local verification.)

Fix — two lockstep changes

  1. better-sqlite3 ^11.0.0^12.11.1 (packages/db/package.json) — 12.10.0 was the first release with a Node 26 prebuilt; 12.11.1 is the corrected latest (12.11.0/12.9.1/12.7.x had Electron prebuild failures, all excluded by the ^12.11.1 floor).
  2. CI Node 2022 LTS (.github/workflows/ci.yml, all 3 jobs) — better-sqlite3 dropped Node 20 prebuilds in the same 12.10.0 release that added Node 26, so no single version ships both. Node 22 has a 12.11.1 prebuilt (ABI 127), so CI npm ci resolves a prebuilt instead of a fragile from-source build. Still satisfies engines: >=20.

Why this is safe

  • No code changes: no breaking better-sqlite3 JS API change 11→12 (constructor / prepare / exec / pragma / WAL / transaction all unchanged — maintainer confirms 4+ yrs no breaking API; majors track dropped-Node-prebuilds).
  • drizzle-orm 0.39.3: peers better-sqlite3 ">=7" and it's optional — no conflict, no bump.
  • @types/better-sqlite3 7.6.13: already latest, covers 12.x.
  • Lockfile regenerated per the repo's cross-platform rule (npm install --include=optional --force); Linux optional deps (@emnapi/*, @rollup/rollup-linux-x64-{gnu,musl}, prebuild-install) retained; verified with a clean npm ci.

Verification

  • Local (Node 26): better-sqlite3 loads with WAL; npm run build + full suite (1268 tests) + lint all green — first local test run possible since the machine moved to Node 26.
  • CI (now Node 22) will confirm on this PR.

Note: the lockfile diff is broad (~1k lines) because the prescribed regen refreshes transitive deps in-range — not just better-sqlite3. The green suite + clean npm ci confirm nothing broke.

🤖 Generated with Claude Code

… support

The pinned better-sqlite3 ^11 has no prebuilt binary for Node 26 (ABI 147) and
won't compile against Node 26 headers, so `npm run test` fails outright on dev
machines that have moved to Node 26. Bump to ^12.11.1 — the first line with a
Node 26 prebuilt.

better-sqlite3 dropped Node 20 prebuilds in the SAME 12.10.0 release that added
Node 26, so no single version covers both Node 26 (local) and Node 20 (CI).
Bump CI from Node 20 to Node 22 LTS so `npm ci` resolves a prebuilt instead of a
fragile from-source build; Node 22 has a 12.11.1 prebuilt (ABI 127) and still
satisfies engines >=20.

No code changes needed: no breaking better-sqlite3 JS API change 11->12
(prepare/exec/pragma/WAL/transaction unchanged); drizzle-orm 0.39 peers
better-sqlite3 ">=7" (optional); @types/better-sqlite3 7.6.13 already covers 12.x.
Lockfile regenerated per the cross-platform rule (npm install --include=optional
--force) — Linux optional deps (@emnapi/*, @rollup/rollup-linux-*) retained,
verified with a clean npm ci.

Local on Node 26: build + full suite (1268 tests) + lint all green.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
@iaj6 iaj6 merged commit 5c0ab6c into main Jun 17, 2026
3 checks passed
@iaj6 iaj6 deleted the fix/better-sqlite3-node26 branch June 17, 2026 17:42
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