fix(deps): bump better-sqlite3 to 12.11.1 + CI Node to 22 (Node 26 support)#16
Merged
Conversation
… 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]>
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.
Problem
better-sqlite3@^11has no prebuilt binary for Node 26 (ABI 147) and won't compile against Node 26 headers (node-gyp fails at thebetter_sqlite3.ostep). Dev machines that have moved to Node 26 can't runnpm run testat 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
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.1floor).20→22LTS (.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 CInpm ciresolves a prebuilt instead of a fragile from-source build. Still satisfiesengines: >=20.Why this is safe
prepare/exec/pragma/ WAL /transactionall unchanged — maintainer confirms 4+ yrs no breaking API; majors track dropped-Node-prebuilds).better-sqlite3 ">=7"and it's optional — no conflict, no bump.@types/better-sqlite37.6.13: already latest, covers 12.x.npm install --include=optional --force); Linux optional deps (@emnapi/*,@rollup/rollup-linux-x64-{gnu,musl},prebuild-install) retained; verified with a cleannpm ci.Verification
better-sqlite3loads with WAL;npm run build+ full suite (1268 tests) + lint all green — first local test run possible since the machine moved to Node 26.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 ciconfirm nothing broke.🤖 Generated with Claude Code