fix(deps): bump better-sqlite3 to v12 for Node 24 support (v1.54.1) - #184
Merged
paulkr merged 1 commit intoAug 11, 2026
Merged
Conversation
v11 publishes prebuilt binaries only up to NODE_MODULE_VERSION 131 (Node 23). Node 24 is 137, so npm falls back to compiling from source, which needs Visual Studio Build Tools on Windows or a compiler toolchain elsewhere. And because better-sqlite3 is an optionalDependency, npm does not error — it silently skips it. The install "succeeds", the CLI works, and `one sync` is dead with no warning anywhere. Node 24 is what a new user gets today. What was broken: gmail and fathom sync (the only two built-in profiles that declare enrich, and so the only ones that open SQLite), plus `sync delete`, `sync remove`, and `mem migrate`. Attio/Stripe/Notion/Calendar/HN sync never touch SQLite and were unaffected. v12.11.1 ships win32-x64 prebuilds for node-v127/137/141/147, so nothing compiles. Verified on this machine: npm ci installs it clean under Node 24, FTS5 and pragma() both work, and the full suite goes from 13 skipped to **0 skipped, 443/443 passing** — the enrich-preserve suite had been silently skipping itself here, which is how the --no-memory regression in #180 reached CI instead of a local run. Cost: v12 requires Node 20+, so `one sync` no longer works on Node 18. In practice it already didn't — v11 can't build there on a current toolchain either — but the README now says so explicitly rather than implying 18 is fine for everything. Note CI cannot catch this class of bug: GitHub runners ship compilers, so they build from source successfully and go green regardless. Adding Node 24 to the matrix would not have found it. Also documents the package-lock.json pruning trap in CLAUDE.md — `npm install` here drops the `pg` entry, which had to be restored by hand after regenerating the lockfile for this change. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
paulkr
approved these changes
Aug 11, 2026
paulkr
deleted the
feature/int-4407-bump-better-sqlite3-to-v12-for-node-24-support
branch
August 11, 2026 15:24
paulkr
pushed a commit
that referenced
this pull request
Aug 13, 2026
…184) Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
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.
INT-4407
Problem
one syncis silently broken for anyone on Node 24 without a C++ toolchain — which is the default experience for a new user, since Node 24 is what you get installing Node today.better-sqlite3@11publishes prebuilt binaries only up toNODE_MODULE_VERSION 131(Node 23):Node 24 is 137, so
prebuild-installfalls back tonode-gyp rebuild— compiling from source, which needs Visual Studio Build Tools on Windows. And because it's anoptionalDependency, npm doesn't error, it silently skips it. The install succeeds, the CLI works, andone syncis dead with no warning.Blast radius
Narrower than it sounds, but it hits the marquee feature. SQLite is only opened when a profile declares
enrich(runner.ts:172,needsSqlite = !!profile.enrich) — 2 of the 9 built-in profiles:sync delete,sync remove, andmem migrate(which is the tool for getting people off SQLite).Verification
On this machine (Windows, Node 24.14.0):
npm ciinstalls 12.11.1 clean — no compilation.pragma()and FTS5 both work;tsc --noEmitpasses against the existing@types/better-sqlite3@^7.That last point matters beyond this PR.
enrich-preserve.test.tsskips itself when the driver is missing, so it had been quietly not running here — which is exactly how the--no-memoryregression in #180 reached CI instead of my machine. This restores local coverage of the enrich path.Cost
v12 requires Node 20+, so
one syncno longer works on Node 18. In practice it already didn't — v11 can't build there on a current toolchain either — but the README now states it explicitly rather than implying "Node 18+" covers everything. Every other command is unaffected on 18.Worth knowing for review
CI cannot catch this class of bug. GitHub runners ship with compilers, so they build from source successfully and go green regardless of whether a prebuild exists. Adding Node 24 to the matrix would not have found this, and won't protect against the next occurrence — the protection is keeping the dependency current.
Lockfile. This needed a real regeneration, not a version-field edit.
npm install --package-lock-onlydroppednode_modules/pg(an optional dep that can't install here), so I restored that entry by hand and validated the result with a cleannpm ci. Documented the trap in CLAUDE.md so the next person doesn't ship a lockfile withpgmissing.Not bumped:
@types/better-sqlite3stays at^7.6.13(latest is 9.6.0). It typechecks clean against v12 and bumping it is unrelated risk — happy to split that out if you'd rather they moved together.🤖 Generated with Claude Code