npm / better-sqlite3
better-sqlite3
What changed in better-sqlite3 8 to 13, from its official release notes, upgrade guides and advisories. Also covers @types/better-sqlite3. Sources checked 2026-11-30.
14 breaking2 new APIs and options5 behavior and defaults4 tooling16 fixes and other
See which of these apply to your code, ranked, in your agent:
npx @unstale/cli initbetter-sqlite3 1312 changes
Breaking changes 2
Calling unsafeMode() on a closed database now throws.
The Windows Arm64 build is currently failing; use v13.0.3 until the issue is resolved.
New APIs and options 1
Adds the gypfile option to package.json.
Behavior and default changes 3
Locally compiled binaries are loaded before prebuilt binaries, allowing a local build to be used instead of the prebuilt binary.
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 6
Detection now reads /proc/self/maps, using process.report.getReport() only as a fallback with network lookups disabled, avoiding hangs and incorrect results.
Updates the SQLite version used by better-sqlite3 to 3.54.1.
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 1218 changes
Breaking changes 6
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.
Support for Electron v26, v27, and v28 was dropped because they are EOL.
Support for Node.js v18 was dropped because it is EOL.
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 6
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.
The correct flag is now used to determine whether V8 Sandboxing is enabled.
better-sqlite3 112 changes
Breaking changes 2
Electron v25 is no longer supported.
Node.js v21 is no longer supported.
better-sqlite3 103 changes
Breaking changes 2
Drops support for ancient EOL Electron versions.
Adds Node.js v22 support and drops support for ancient EOL Node.js versions.
Fixes and other changes 1
Fixes Python setuptools on macOS.
better-sqlite3 93 changes
Breaking changes 1
Official support for Node 16 was dropped because it is EOL.
Behavior and default changes 1
SQLite was updated to version 3.43.2, which may affect application behavior.
Fixes and other changes 1
Prebuilds are now available for Electron v27.
better-sqlite3 83 changes
Breaking changes 1
Support for Node.js versions 10.x and 12.x was dropped.
Fixes and other changes 2
Fixed various compilation issues.
Fixed LIMIT and OFFSET queries on virtual tables.