Releases: photostructure/node-sqlite
Releases · photostructure/node-sqlite
Release v0.4.0
Immutable
release. Only release title and notes can be modified.
API compatible with node:sqlite from Node.js v25.6.1.
Added
enhance()function: Adds better-sqlite3-style.pragma()and.transaction()methods to any compatible database instanceisEnhanced()type guard: Check if a database has enhanced methods- Transaction helper: Automatic BEGIN/COMMIT/ROLLBACK with savepoint support for nested transactions
- Pragma convenience method: Simple API for reading and setting SQLite pragmas with
simpleoption - Node.js test sync script:
npm run sync:testsdownloads and adapts upstream Node.js SQLite tests - Percentile extension:
SQLITE_ENABLE_PERCENTILEnow enabled, addingpercentile(),median(),percentile_cont(),percentile_disc()SQL functions (Node.js v25+) - Prepare options:
db.prepare(sql, options)now accepts per-statement options (readBigInts,returnArrays,allowBareNamedParameters,allowUnknownNamedParameters) to override database-level defaults. This is a Node.js v25+ feature;node:sqliteon v24 and earlier silently ignores these options. - StatementColumnMetadata type:
stmt.columns()now returns richer metadata includingcolumn,database,table, andtypeproperties alongsidename - SQLite 3.51.2: Updated from 3.51.1
Changed
- BREAKING: Removed API extensions to achieve exact parity with
node:sqlite:- Removed
stmt.finalize()method (use database close for cleanup) - Removed
stmt.finalizedproperty - Removed
stmt[Symbol.dispose](still available onDatabaseSyncandSession) - Removed
db.backup()instance method (use standalonebackup(db, path)function instead)
- Removed
- BREAKING:
Session.changeset()andSession.patchset()now returnUint8Arrayinstead ofBufferto matchnode:sqliteAPI - BREAKING: Defensive mode now defaults to
trueinstead offalseto match Node.js v25+ behavior. Use{ defensive: false }to restore old behavior.
Fixed
- Alpine Linux / musl stability: Fixed native crashes by removing N-API reference cleanup from destructors that corrupted V8 JIT state
- Session lifecycle management: Fixed use-after-free, double-free, and mutex deadlock when databases are garbage collected before their sessions
- Worker thread stability: Added cleanup hooks and exception handling for worker thread termination
- Callback error preservation:
applyChangeset()now preserves the original error message when JavaScript callbacks throw createTagStore()now throws errors withcode: 'ERR_INVALID_STATE'property when database is closed, matching Node.js error format
Full Changelog: v0.3.0...v0.4.0
Release v0.3.0
Immutable
release. Only release title and notes can be modified.
- BREAKING:
SQLTagStore.sizechanged from method to getter for Node.js API parity Node.js PR #60246- Before:
sql.size() - After:
sql.size
- Before:
Full Changelog: v0.2.1...v0.3.0
Release v0.2.1
Added
- Windows ARM64 prebuilt binaries
Fixed
- Error message handling on Windows ARM64 (ABI compatibility)
- Error handling consistency across platforms
Full Changelog: v0.2.0...v0.2.1
Release v0.2.0
Added
- Node.js v25 API sync: SQLite 3.51.1, native
Symbol.disposein C++, Session class exposed in public API - New database open options:
readBigInts,returnArrays,allowBareNamedParameters,allowUnknownNamedParameters,defensive,open - Defensive mode:
enableDefensive()method to prevent SQL from deliberately corrupting the database - Statement enhancements:
setAllowUnknownNamedParameters()method,finalizedproperty - Type identification:
sqlite-typesymbol property on DatabaseSync (Node.js PR #59405) - Enhanced SQLite errors: New properties
sqliteCode,sqliteExtendedCode,code,sqliteErrorString,systemErrno - ARM64 prebuilds: macOS Apple Silicon and Windows ARM64 binaries
- Tagged template literals:
db.createTagStore()for cached prepared statements (Node.js PR #58748) - Authorization API:
db.setAuthorizer()for security callbacks (Node.js PR #59928) - Standalone backup:
backup(srcDb, destFile, options?)for one-liner database backups with progress callbacks
Fixed
- DataView parameter binding (previously returned garbage data)
- DataView and TypedArray return values in user-defined functions
- RETURNING clause metadata handling
- Null and empty values in user function return value conversion
- Native stability: N-API reference cleanup in aggregates/destructors, thread-local napi_env storage, statement-to-database reference tracking, deferred exception handling in authorizers
Full Changelog: v0.0.1...v0.2.0
Release v0.0.1
What's Changed
- chore(deps): bump crazy-max/ghaction-import-gpg from 6.2.0 to 6.3.0 by @dependabot in #1
New Contributors
- @dependabot made their first contribution in #1
Full Changelog: https://github.com/photostructure/node-sqlite/commits/v0.0.1