Skip to content

fix: bump better-sqlite3 to ^12 for Node 26 + refresh dev deps#6

Open
Aayush9029 wants to merge 2 commits into
gricha:mainfrom
Aayush9029:fix/better-sqlite3-node26
Open

fix: bump better-sqlite3 to ^12 for Node 26 + refresh dev deps#6
Aayush9029 wants to merge 2 commits into
gricha:mainfrom
Aayush9029:fix/better-sqlite3-node26

Conversation

@Aayush9029
Copy link
Copy Markdown

@Aayush9029 Aayush9029 commented May 12, 2026

Summary

Two related changes:

  1. Bump better-sqlite3 ^11 → ^12 so npx devrage installs on Node 25/26.
  2. Refresh outdated dev deps (esbuild, oxlint, typescript, @types/node) so the dev environment is current.

Why the better-sqlite3 bump is needed

npx devrage (or bunx devrage) currently fails to install on Node 26 because [email protected] cannot be built from source against Node 26's bundled V8 (V8 13.x). V8 removed several APIs that better-sqlite3 11.x still uses, so node-gyp aborts with:

./src/util/binder.lzz:40:37: error: no member named 'GetPrototype' in 'v8::Object'
./src/better_sqlite3.lzz:68:34: error: no member named 'GetIsolate' in 'v8::Context'
./src/objects/database.lzz:416:89: error: no member named 'This' in 'v8::PropertyCallbackInfo<v8::Value>'
...
13 warnings and 6 errors generated.
make: *** [Release/obj.target/better_sqlite3/src/better_sqlite3.o] Error 1
gyp ERR! stack Error: `make` failed with exit code: 2
...
error: install script from "better-sqlite3" exited with 1

[email protected] declares engines.node: 20.x || 22.x || 23.x || 24.x || 25.x || 26.x and switched to the updated V8 API, so bumping the dependency unblocks installation on Node 25/26 without breaking older runtimes.

Dev-dep refresh

Package Before After
@types/node ^25.6.1 ^25.7.0
esbuild ^0.25.0 ^0.28.0
oxlint ^0.16.0 ^1.64.0 (major)
typescript ^5.8.0 ^6.0.3 (major)
better-sqlite3 ^11.0.0 ^12.0.0

(@types/better-sqlite3 is already at the latest 7.6.13. @types/node 26 isn't published on DefinitelyTyped yet — latest tag still points at 25.7.0.)

Test plan

Verified locally on macOS 15 (arm64).

Node 26.0.0:

  • rm -rf node_modules package-lock.json && npm install builds [email protected] from source (was failing on main with the gyp errors above)
  • npm run build succeeds
  • npm run typecheck passes (TypeScript 6.0.3)
  • node dist/cli.js scan reports counts across all 7 adapters — claude 318 / codex 6945 / opencode 193 (sqlite read OK) / amp + cline + pi + zed each loaded cleanly with 0 msgs (no local data, no errors)

Node 20.20.2 LTS:

  • rm -rf node_modules package-lock.json && npm install succeeds (prebuild-install pulls the Node 20 ABI prebuilt binary, NODE_MODULE_VERSION 115)
  • npm run build + npm run typecheck pass
  • node dist/cli.js scan --agent opencode returns 193 msgs (sqlite query OK on Node 20)

engines.node: >=20 in package.json remains satisfied — better-sqlite3@12 lists 20.x in its engines.

Lint note

npm run lint reports Found 0 warnings and 55 errors after the bump — all 55 are pre-existing codebase style findings (eslint(curly) on single-statement if/for bodies in src/adapters/zed.ts and src/detector/index.ts, plus one eslint(prefer-const)). All are in files untouched by this PR. They were already present on main (54 errors before the oxlint major bump; oxlint 1.x picked up one additional finding via prefer-const). Happy to clean those up in a follow-up PR if you'd like, but kept them out of this one to keep the diff focused on the install fix + dep refresh.

better-sqlite3 11.x fails to build from source on Node 26 because the
V8 13.x bundled with Node 25+ removed `v8::Object::GetPrototype`,
`v8::Context::GetIsolate`, and `PropertyCallbackInfo::This`. Errors
like:

  error: no member named 'GetPrototype' in 'v8::Object'
  error: no member named 'GetIsolate' in 'v8::Context'
  error: no member named 'This' in 'v8::PropertyCallbackInfo<v8::Value>'

better-sqlite3 12.x declares `engines.node: 20.x || 22.x || 23.x ||
24.x || 25.x || 26.x` and uses the updated V8 API, so `npx devrage` on
Node 26 installs and runs cleanly.
- @types/node ^25.6.1 → ^25.7.0
- esbuild ^0.25.0 → ^0.28.0
- oxlint ^0.16.0 → ^1.64.0 (major)
- typescript ^5.8.0 → ^6.0.3 (major)

Verified on Node 26.0.0 and Node 20.20.2: `npm install`, `npm run
build`, `npm run typecheck` all pass. `node dist/cli.js scan` reports
counts across all 7 adapters (claude/codex/opencode/amp/cline/pi/zed)
with no runtime errors.

`npm run lint` shows only pre-existing codebase style findings (curly
braces around single-statement bodies, one prefer-const) — all in
files untouched by this change. Not introduced by the dep bumps.
@Aayush9029 Aayush9029 changed the title fix: bump better-sqlite3 to ^12.0.0 for Node 26 support fix: bump better-sqlite3 to ^12 for Node 26 + refresh dev deps May 12, 2026
smirea added a commit to smirea/devrage that referenced this pull request Jun 3, 2026
Apply upstream gricha#6 as a single squash commit.
Bump better-sqlite3 to v12 and refresh development toolchain dependencies from the PR lockfile.

Co-Authored-By: AI <[email protected]>
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