GeezerVison is showing github.com — Releases · sql-js/sql.js
Releases · sql-js/sql.js
Release v1.16.0
This release adds SQLite's native math functions and updates SQLite to 3.54.1. Existing legacy math and string functions remain enabled by default, so existing query results are preserved.
Deprecation warnings
Calling a legacy function now logs a warning. A function called for every row can produce many warnings, even for familiar names such as sqrt. Legacy functions are planned to be disabled by default in the next major release.
To try native SQLite behavior now:
const SQL = await initSqlJs({ useOldExtensionFunctions: false });
The first initialization chooses the mode for all databases from that module. For a worker, pass config: { useOldExtensionFunctions: false } on its first message.
Check your queries before opting in:
log(100) changes from the natural logarithm to 2; use ln() for the natural logarithm.
- Some invalid inputs return
NULL instead of zero. Native sign() returns an integer and works in expression indexes and generated columns.
- Legacy-only functions such as
reverse, charindex, stdev, variance, and median are unavailable, including in saved views and triggers.
Both modes also gain native functions including ln, log2, mod, trunc, pow, ceiling, and two-argument log.
See the migration discussion and SQLite's math function reference for details. Install with npm install [email protected], or download a distribution below.
Assets
7
Loading
Uh oh!
There was an error while loading. Please reload this page.
lppedd reacted with thumbs up emoji
reneleonhardt reacted with hooray emoji
All reactions
-
👍
1 reaction
-
🎉
1 reaction
2 people reacted
Release v1.15.2
4f1c22d
This commit was created on GitHub.com and signed with GitHub’s verified signature.
Fixed
Database.export() now keeps the existing database connection open, preserving update hooks, custom functions and aggregates, prepared statements/cursors, PRAGMAs, TEMP objects, attached databases and change counters. (#644)
- Export uses SQLite's backup API to fill a single JS-owned output buffer, avoiding a database-sized WASM allocation and repeated intermediate copies. WAL-mode databases produce standalone, reopenable snapshots.
- Include generated documentation in GitHub Pages deployments. (#645)
Transaction behavior
Commit or roll back an active write transaction before calling export(). Export now throws during a write transaction instead of implicitly rolling it back. Read transactions are supported. Export does not end transactions or change savepoints, including on failure.
The exported file contains only the main database. Connection-local callbacks/settings, TEMP objects and attached databases remain usable on the original connection but are not included in the exported file.
Validation
CI covers all five WebAssembly variants, browser/worker distribution checks and the new export regressions. In the recorded same-runner comparison, exporting a 577.53 MiB database took 233 ms with 21 MiB WASM memory; a 108 MiB database also exported under an enforced 64 MiB WASM cap. Performance varies by environment.
Full changelog: v1.15.1...v1.15.2
Assets
7
Loading
Uh oh!
There was an error while loading. Please reload this page.
reneleonhardt reacted with hooray emoji
1 person reacted
Release v1.15.1
Fixes for SQL names and user-defined functions:
- Preserve columns named
__proto__ in Statement.getAsObject() and Database.each() while keeping ordinary object results.
- Keep aggregate callbacks together so SQL names ending in
__finalize cannot collide with another aggregate's internal finalizer.
- Track function registrations by SQLite's ASCII case-insensitive name and argument count, allowing scalar and aggregate overloads to coexist and be replaced independently.
Regression tests reproduce all three failures on the previous implementation. Validation includes the full WebAssembly suite, distribution checks, lint, documentation generation, and the asm.js memory-growth suite.
Assets
7
Loading
Uh oh!
There was an error while loading. Please reload this page.
Release v1.15.0
This release adds single-file WebAssembly builds and updates SQLite from 3.49.1 to 3.54.0.
- Add
sql-wasm-inline.js and worker.sql-wasm-inline.js, with debug variants. These embed the WebAssembly binary and need no companion .wasm file or locateFile configuration.
- Deprecate asm.js builds. They remain in the npm package and
sqljs-all.zip; use the inline WebAssembly builds for single-file integration.
- Preserve embedded NUL characters when binding or reading TEXT and passing TEXT to or from JavaScript SQL functions (#634).
- Allocate SQL strings on the heap in
Database.run and Database.prepare, fixing failures with SQL larger than the WebAssembly stack (#482, #639).
- Free statement iterator resources when a
for...of loop exits early (#457, #632).
- Reset the worker database after close so subsequent requests can initialize a fresh database (#638).
- Update Emscripten to 6.0.12, development tooling, CI actions, documentation, and browser dependencies (#637).
- Retain npm trusted publishing with provenance, and retry transient SQLite source download failures.
Node.js users need Node.js 18.3 or newer. WebAssembly support is required for the default and inline builds.
Full changes: v1.14.2...v1.15.0
Assets
7
Loading
Uh oh!
There was an error while loading. Please reload this page.
reneleonhardt reacted with hooray emoji
1 person reacted
Release v1.14.2
Fix WASM stack leak in Database.exec (#630, #631)
Assets
7
Loading
Uh oh!
There was an error while loading. Please reload this page.
vthg2themax reacted with hooray emoji
1 person reacted
Release v1.14.1
8088a68
This commit was created on GitHub.com and signed with GitHub’s verified signature.
fix bug in browser bundle
Assets
7
Loading
Uh oh!
There was an error while loading. Please reload this page.
reneleonhardt, tracker1, AntonyZ89, aadarshbk, and timemanx reacted with hooray emoji
5 people reacted
Release v1.14.0
v1.14.0
This tag was signed with the committer’s verified signature.
9f289db
This commit was signed with the committer’s verified signature.
update deps & improve webpack experience
Assets
7
Loading
Uh oh!
There was an error while loading. Please reload this page.
abetomo, AntonyZ89, and timemanx reacted with rocket emoji
3 people reacted
Release v1.13.0
sql.js v1.13 Release Notes
This release of sql.js brings significant updates and improvements, primarily focused on modernizing the underlying toolchain and enhancing functionality.
The online playground was rewritten:

Key highlights include:
🚀 Dependency Updates and Modernization
-
SQLite Core Upgrade: sql.js is now built with SQLite version 3.49. This incorporates all the enhancements and bug fixes from SQLite versions 3.45.0 through 3.49.1. See SQLite release notes. Notable SQLite improvements in this range include:
- Query Planner Enhancements: Expect improved query performance due to optimizations in query planning, especially for complex queries, star joins, and queries involving
IN operators. These improvements are detailed in the SQLite release notes for versions 3.47.0, 3.49.0, and 3.46.0.
- New SQL Features: Take advantage of new SQL functions and features introduced in SQLite 3.47+, such as:
- Enhanced
iif() function with support for multiple arguments (SQLite 3.49.0).
- Right-hand side negative indexing for JSON
->> operator (SQLite 3.47.0).
json_pretty() function for formatted JSON output (SQLite 3.46.0).
- Support for underscore characters in numeric literals (SQLite 3.46.0).
- Improved date and time function modifiers like
ceiling and floor (SQLite 3.46.0).
- Bug Fixes and Stability: Benefit from numerous bug fixes and stability improvements across various SQLite components, ensuring a more robust database experience. Refer to the SQLite Changelog for detailed fixes in versions 3.45.1, 3.45.2, 3.45.3, 3.46.1, 3.47.1, 3.47.2, 3.49.1, and 3.44.2.
-
Emscripten 4.x Upgrade: sql.js is now compiled with Emscripten 4. See changes in emscripten. This major update to the Emscripten toolchain brings several under-the-hood improvements:
- Modern JavaScript Output: Emscripten 4 generates more modern JavaScript code. While compatibility with older browsers is still maintained through transpilation where necessary, this move to modern JS internally can lead to performance improvements in modern environments.
- LLVM 19.1.6: The underlying compiler toolchain is updated to LLVM 19.1.6, which includes improvements to code generation, optimizations, and potentially better support for newer WebAssembly features.
- Minimum Node.js Version Increase (for Emscripten Toolchain): While sql.js itself aims for broad compatibility, the Emscripten toolchain now requires Node.js v18.3 as a minimum (and is tested with Node.js 22 in this release). This is primarily relevant for developers building sql.js from source.
-
Node.js Worker Thread Compatibility: The worker scripts are now fully compatible with Node.js worker threads, allowing for seamless integration in Node.js environments leveraging worker threads. This is a significant step towards better performance and concurrency in Node.js.
-
Removal of Puppeteer Dev Dependency: The project no longer depends on Puppeteer for worker tests. Worker tests now utilize Node.js worker threads directly, simplifying the testing setup and removing an external dependency. This also speeds up the devcontainer installation.
✨ New Features
updateHook API (#604): This release introduces a new low-level API, Database.updateHook, providing a mechanism to register a callback function that is invoked whenever a row is updated, inserted, or deleted in the database. view docs
- This feature wraps the native
sqlite3_update_hook functionality, allowing developers to monitor database modifications at a granular level.
- Callbacks receive information about the operation type (update, insert, delete), the database name, table name, and rowid.
🛠️ Internal and Development Changes
- Worker Debug Script: Added a new debug script specifically for worker environments to aid in development and troubleshooting of worker-related issues.
Assets
7
Loading
Uh oh!
There was an error while loading. Please reload this page.
AntonyZ89, dofufa, arrow501, IgorTheLight, and AppleHair reacted with thumbs up emoji
ram-you, hoeck, IgorTheLight, AppleHair, and FS-Frost reacted with heart emoji
All reactions
-
👍
5 reactions
-
❤️
5 reactions
8 people reacted
Release v1.12.0
new getRowsModified action in web worker
Assets
7
Loading
Uh oh!
There was an error while loading. Please reload this page.
donald95, neomafo88, and IgorTheLight reacted with thumbs up emoji
mark-myer and IgorTheLight reacted with hooray emoji
lixingyangok, IgorTheLight, and FS-Frost reacted with heart emoji
AHS12, IgorTheLight, and rumphel-lee reacted with rocket emoji
All reactions
-
👍
3 reactions
-
🎉
2 reactions
-
❤️
3 reactions
-
🚀
3 reactions
8 people reacted
Release v1.11.0
Assets
7
Loading
Uh oh!
There was an error while loading. Please reload this page.
soft-di, Chachaproper, and surpol reacted with thumbs up emoji
3 people reacted
|