Use Node.js 22 or later. From the repository root, install dependencies and build the package:
npm install
npm run buildThe package build uses the SQLite Wasm binaries already included in src/bin and writes the package
files to dist.
Start an example with its dev:* script, for example:
npm run dev:main-threadFor the OPFS example, use npm run dev:opfs. Other examples have corresponding dev:* scripts in
package.json. Rebuild the package after changing its source files.
To rebuild the underlying SQLite Wasm binaries, use Docker:
-
Build the Docker image:
docker build -t sqlite-wasm-builder:env . -
Run the build:
Unix (Linux/macOS):
docker run --rm \ -e SQLITE_REF="master" \ -v "$(pwd)/out":/out \ -v "$(pwd)/src/bin":/src/bin \ sqlite-wasm-builder:env build
Windows (PowerShell):
docker run --rm ` -e SQLITE_REF="master" ` -v "${PWD}/out:/out" ` -v "${PWD}/src/bin:/src/bin" ` sqlite-wasm-builder:env build
Windows (Command Prompt):
docker run --rm ^ -e SQLITE_REF="master" ^ -v "%cd%/out:/out" ^ -v "%cd%/src/bin:/src/bin" ^ sqlite-wasm-builder:env build
The test suite consists of Node.js tests and browser-based tests (using Vitest Browser Mode). Tests aim to sanity-check the exported scripts. We test for correct exports and very basic functionality.
-
Install dependencies:
npm install
-
Install Playwright browsers (required for browser tests):
npx playwright install chromium --with-deps --no-shell
-
Run all tests:
npm test
(These steps can only be executed by maintainers.)
-
Manually trigger the GitHub Actions workflow. By default, it uses the latest SQLite tag. This pull request will contain the latest
sqlite3.wasmand related bindings. -
Once the above pull request is validated and merged, update the version number in
package.json, reflecting the current SQLite version number and add a build identifier suffix like-build1. The complete version number should read something like3.41.2-build1.