fix(db): require better-sqlite3 ^12.4.1 so Node 24 gets the native backend (#203) (#216)

better-sqlite3 ^11.0.0 (latest 11.10.0) ships no prebuilt binary for
Node 24's ABI (node-v137) and predates Node 24, so every Node 24 install
silently fell back to the 5-10x-slower WASM backend. Bump to ^12.4.1 —
the first 12.x with the Node 24 prebuild — and raise the engines floor to
Node 20 (Node 18 is EOL and dropped from better-sqlite3 12.x prebuilds).

Verified on macOS Node 24.15.0 (ABI 137): prebuilt binary used with no
compiler (installs even with CC/CXX sabotaged), `codegraph init -i` shows
no WASM banner, and `codegraph status` reports Backend: native. 639/639
tests pass on Node 22.

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
Colby Mchenry
2026-05-20 11:54:19 -05:00
committed by GitHub
co-authored by Claude Opus 4.7
parent b3d3ddbd93
commit 9b06b0edde
3 changed files with 30 additions and 7 deletions
+2 -2
View File
@@ -51,9 +51,9 @@
"vitest": "^2.1.9"
},
"optionalDependencies": {
"better-sqlite3": "^11.0.0"
"better-sqlite3": "^12.4.1"
},
"engines": {
"node": ">=18.0.0 <25.0.0"
"node": ">=20.0.0 <25.0.0"
}
}