v13.0.0
Added 2
- Added db.explain() method for running EXPLAIN queries without needing to supply bound parameters
- Added preparedStatement.toString() method for getting the expanded SQL of a prepared statement
Changed 1
- Refactored codebase to use node-addon-api and N-API for compatibility across different versions of Node.js and Electron
Fixed 1
- Fixed SqliteError cross-realm and Error.isError compatibility
Removed 1
- Removed deprecated prebuild-install dependency
From better-sqlite3
Version 13.0.0 marks a major milestone, as it's the first version of better-sqlite3 to run on the N-API. This means prebuilt binaries should theoretically work across different versions of Node.js and Electron, and perhaps even other runtimes like Bun. As a result, we've removed the deprecated prebuild-install dependency, and now prebuilt binaries are published directly with the better-sqlite3 code itself. If your platform/architecture doesn't have a prebuilt binary, it should compile during install as before.
What's Changed
- Refactored codebase to use node-addon-api by @JoshuaWise in https://github.com/WiseLibs/better-sqlite3/pull/1498
- Added a new
db.explain()method, for running EXPLAIN queries without needing to supply bound parameters. - Added a new
preparedStatement.toString()method, for getting the expanded SQL of a prepared statement. - Fix
SqliteErrorcross-realm andError.isErrorcompatibility by @dennismutuku2005 in https://github.com/WiseLibs/better-sqlite3/pull/1473
New Contributors
- @dennismutuku2005 made their first contribution in https://github.com/WiseLibs/better-sqlite3/pull/1473
Full Changelog: https://github.com/WiseLibs/better-sqlite3/compare/v12.12.0...v13.0.0