Repository navigation
fix(bundlecheck): upgrade better-sqlite3 to v13 - #608
Merged
Merged
Conversation
v13 rewrites the native layer on top of N-API and ships prebuilt binaries inside the tarball, replacing the deprecated prebuild-install download step. The JS API is unchanged for our usage in src/cache.ts (only additions: db.explain() and preparedStatement.toString()), so no code changes are needed. Existing ~/.bundlecheck/cache.db files written by v12 open and read correctly under v13 -- no cache invalidation or migration. The major bump also tightens engines.node to >=22, which every package in this repo already declares. Drops 19 transitive dependencies (prebuild-install, bindings, node-abi, tar-fs, rc, tunnel-agent, simple-get, ...) in favor of node-addon-api. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KPs55pyFkC3ejzdR9JiH8r
Merged
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
Bumps
better-sqlite312.11.1 → 13.0.1 in@node-cli/bundlecheck, the only package that depends on it.Despite the major bump, no code changes are required. v13 rewrites the native layer on top of N-API and ships prebuilt binaries inside the tarball, replacing the deprecated
prebuild-installdownload step. The JS API only gained methods (db.explain(),preparedStatement.toString()); nothing was removed or changed. The major is driven by the ABI/packaging rewrite and byengines.nodetightening from20.x || 22.x || …to>=22— which every package in this repo already declares as of #603.Verification
tsc+swcbuild clean against@types/better-sqlite3@7.6.13(still latest; v12's typed surface is a subset of v13's).pnpm testinpackages/bundlecheck: 268/268 pass. Full monorepo: 12/12 projects pass.pnpm lint: clean.~/.bundlecheck/cache.dbwritten by v12 (WAL mode, 35 rows) opens and reads correctly under v13 — no cache invalidation, no migration needed.--forcerun (cache write), warm run (cache hit), and--trend 3(multi-version) all produce correct output.src/cache.tsis the sole consumer. It usesnew Database(),.pragma(),.exec(),.prepare<T>(),.get(),.run()and.close()— all unchanged — and only ever binds primitives, so the stricter parameter binding introduced in 13.0.0 (and relaxed in 13.0.1) does not apply.Tradeoffs
Wins
prebuild-install,bindings,node-abi,tar-fs,rc,tunnel-agent,simple-get, …) in favor of a singlenode-addon-api. Notablyprebuild-install@7.1.3is npm-deprecated as "No longer maintained."--ignore-scriptsinstalls now work (verified: v12 throwsCould not locate the bindings file, v13 works).Costs
npxusers.node-gypstill runs on install (npm auto-injects it becausebinding.gypis present), so Python +makeare still needed at install time. It is a no-op —binding.gypshort-circuits toTOUCH …stampwhen a prebuild exists, no compilation happens.pnpm-workspace.yamlneeds no change:allowBuilds: better-sqlite3: trueis already set and the build is now a no-op. Setting it tofalsewould skip node-gyp entirely and still work, but would also remove the compile-from-source fallback for platforms outside the 8 prebuilds (win32-ia32, freebsd, linux-armv7), so it is intentionally left as-is.🤖 Generated with Claude Code
https://claude.ai/code/session_01KPs55pyFkC3ejzdR9JiH8r