Skip to content

v3.1.0

Latest

Choose a tag to compare

@github-actions github-actions released this 03 Oct 23:36
· 6 commits to main since this release
Immutable release. Only release title and notes can be modified.
v3.1.0
7ae66e5

API compatible with node:sqlite from Node.js v26.10.0, plus createModule() and the changes listed under 3.0.0 that are on Node.js v26.x-staging but not yet in a release. SQLite is unchanged at 3.53.4.

Added

  • createModule(): virtual tables whose rows come from a JavaScript iterable, via Database.prototype.createModule(name, { columns, rows, directOnly, useBigIntArguments }), wrapping sqlite3_create_module_v2(). Ports Node.js PR #65787, PR #66195, and PR #66215, which are on v26.x-staging but not yet in a Node.js release.

Fixed

  • process.exit() in a worker during exec(): a user-defined function that called process.exit() while exec() ran in a worker aborted the process with FATAL ERROR: Error::Error napi_define_properties. The worker now exits with the requested code.
  • Expanded SQL longer than V8's maximum string length: with a sqlite.db.query diagnostics subscriber, running a statement whose expanded SQL exceeded V8's maximum string length (for example, one with a bound blob over about 256 MB, which expands to hex) threw Error: Unknown failure from a C++ exception that unwound through SQLite, and leaked the expanded SQL. The statement now succeeds and publishes no event. Reading expandedSQL on such a statement threw Error: Unknown failure with no code; it now throws ERR_STRING_TOO_LONG, as oversized TEXT values do since 3.0.0. node:sqlite aborts the process when reading expandedSQL on such a statement (checked on v24.21.0).
  • C++ exceptions in aggregate callbacks: a node-addon-api failure inside an aggregate's step, inverse, or final callback unwound through SQLite. A step or inverse result whose then getter threw made exec() leave close() failing with ERR_INVALID_STATE (database cannot be closed while in a callback), and get()/all() threw an unrelated error instead of the getter's. Exiting the process or a worker while a window aggregate with a Uint8Array accumulator was mid-query aborted with terminate called after throwing an instance of 'Napi::Error'. Function and aggregate callbacks now catch these exceptions; the statement throws the original error, and exit proceeds normally.

Full Changelog: v3.0.0...v3.1.0