deps: better-sqlite3 13.x, and stop forcing a source build - #127
Merged
Conversation
Two changes that only make sense together. better-sqlite3 11.10.0 does not work on Node 24: it builds, then package-builder.test.ts hangs until the vitest worker is killed. That was the blocker recorded in #123. 13.0.3 is fine there. 13.x also drops prebuild-install and ships prebuilt binaries inside the package (gypfile: false, no install script). Our root pnpm onlyBuiltDependencies still listed better-sqlite3, which forces pnpm to build it anyway — so with the bump alone, every install would compile from source on both Node versions. Removing that entry lets the shipped binaries be used. Measured on a clean install of each, twice, in a fresh worktree: Node 22.22.2 install/lint/build/test all 0, 221/221 + 41/41, 0 source compiles Node 24.20.0 install/build/test all 0, 221/221 + 41/41, 0 source compiles This also corrects the explanation given in #123. That commit blamed the missing Node 24 prebuild for the failure. It was not the cause — 13.x compiles from source on Node 24 too when forced, and passes. The 11.x code itself is what does not work there. better-sqlite3 stays an optionalDependency, and the sql.js fallback in database.ts is unchanged, so a failed native load still degrades rather than breaks. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01NBQQpA86yYzwJUiVz8ph2R
🦋 Changeset detectedLatest commit: 9af9649 The changes in this PR will be included in the next version bump. This PR includes changesets to release 2 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
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.
Summary
Two changes that only make sense together.
1.
better-sqlite311.9.1 → 13.0.3. 11.10.0 does not work on Node 24 — it builds, thenpackage-builder.test.tshangs until the vitest worker is killed. That was the blocker recorded in #123. 13.0.3 is fine there.2. Drop
better-sqlite3from rootpnpm.onlyBuiltDependencies. 13.x removedprebuild-installand now ships prebuilt binaries inside the package (gypfile: false, no install script). Our config still forced pnpm to build it — so with the bump alone, every install would compile from source on both Node versions. Removing the entry lets the shipped binaries be used.Measured
Clean install of each, in a fresh worktree, reproduced twice:
00So installs get faster on both versions, not slower — and Node 24 is now unblocked.
Correction to #123
That commit blamed the missing Node 24 prebuild for the failure. That was wrong. 13.x also compiles from source on Node 24 when forced, and passes — so the absent prebuild wasn't the cause. The 11.x code itself is what doesn't work there. Recording it here so the reasoning in the history isn't misleading.
Risk
better-sqlite3stays anoptionalDependency, and the sql.js WebAssembly fallback indatabase.tsis untouched — a failed native load still degrades rather than breaks. API surface used by this repo is only.prepare(),.exec(),.transaction(),.close(), all stable across these majors.Follow-up
Node 22 → 24 is now a one-line change, if wanted. Not included here: this PR should be revertable on its own.
Test plan
install --no-frozen-lockfile,lint,build,test— all passinstall,build,test— all passpackages/contextresolves 13.0.3node-gyp rebuildinvocations on bothGenerated by Claude Code