npm / better-sqlite3
better-sqlite3
What changed in better-sqlite3 12 to 13, from its official release notes, upgrade guides and advisories. Also covers @types/better-sqlite3. Sources checked 2026-10-20.
4 breaking2 new APIs and options3 behavior and defaults4 tooling9 fixes and other
See which of these apply to your code, ranked, in your agent:
npx @unstale/cli initbetter-sqlite3 137 changes
New APIs and options 1
Adds the gypfile option to package.json.
Behavior and default changes 2
Updates SQLite to version 3.53.4, which may affect SQLite behavior available to developers.
better-sqlite3 now runs on the N-API, so prebuilt binaries should theoretically work across different versions of Node.js and Electron, and perhaps Bun.
Fixes and other changes 4
Fixes validation of table parameters.
Fixes the process aborting when worker threads are terminated.
Fixed a regression that caused parameter binding to reject plain objects from other realms, such as in jest tests.
Fixed cross-realm and Error.isError compatibility for SqliteError.
better-sqlite3 1215 changes
Breaking changes 4
Starting with Electron v43, binary assets require glibc 2.41 or higher on Linux hosts.
Temporarily rolls back support for Electron v42 prebuilds.
Adds prebuilds for Node.js v26 and removes EOL builds for Node.js v20 and v23.
Node.js v20 or later is required.
New APIs and options 1
Enables percentile functions.
Behavior and default changes 1
Updates the SQLite version to 3.51.0, which may affect database behavior available to applications.
Tooling 4
Adds prebuild support for Electron v43, so developers can use better-sqlite3 with that Electron release.
Support was added for Electron v42 prebuilds, but Electron v39+ prebuilds are not building successfully; the notes recommend staying on v12.9.0 for now.
Prebuilds are now available for Node v25 and Electron 39+, so developers using those runtimes can install the package without building it themselves.
Adds a prebuild for Electron 39, allowing developers to use a prebuilt package with that Electron version.
Fixes and other changes 5
Fixes Electron v42 build errors on Windows.
Adds a build target for Electron v42.
Fixes V8 external API usage for Electron 42.
Updates the bundled SQLite version to 3.53.1.
Uses Holder() instead of This() for Electron 41 compatibility.