Skip to content

Commit 14eaa3d

Browse files
committed
Merge branch 'main' into chore/3.53.0
2 parents 3455108 + a81e4ef commit 14eaa3d

41 files changed

Lines changed: 1154 additions & 1936 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/build-wasm.yml

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -101,19 +101,15 @@ jobs:
101101
fi
102102
103103
- name: Create Pull Request
104-
if:
105-
steps.check-branch.outputs.skip != 'true' &&
106-
steps.git-check.outputs.changes == 'true'
104+
if: steps.check-branch.outputs.skip != 'true' && steps.git-check.outputs.changes == 'true'
107105
uses: peter-evans/create-pull-request@v6
108106
with:
109107
token: ${{ secrets.GITHUB_TOKEN }}
110108
commit-message:
111-
'chore: update SQLite Wasm binaries from ${{
112-
steps.resolve-ref.outputs.sqlite_ref }} (${{
113-
steps.resolve-ref.outputs.sqlite_sha }})'
109+
'chore: update SQLite Wasm binaries from ${{ steps.resolve-ref.outputs.sqlite_ref }}
110+
(${{ steps.resolve-ref.outputs.sqlite_sha }})'
114111
title:
115-
'chore: update SQLite Wasm binaries from ${{
116-
steps.resolve-ref.outputs.sqlite_ref }}'
112+
'chore: update SQLite Wasm binaries from ${{ steps.resolve-ref.outputs.sqlite_ref }}'
117113
body: |
118114
This PR updates the SQLite Wasm binaries in `src/bin` by building them from SQLite reference `${{ steps.resolve-ref.outputs.sqlite_ref }}` (commit `${{ steps.resolve-ref.outputs.sqlite_sha }}`).
119115

.github/workflows/ci.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ jobs:
4747
uses: ./.github/actions/node-setup
4848

4949
- name: Run format check
50-
run: npx prettier . --check
50+
run: npx oxfmt . --check
5151

5252
test-browser:
5353
name: Run browser tests
@@ -74,8 +74,7 @@ jobs:
7474
with:
7575
path: ~/.cache/ms-playwright
7676
key:
77-
${{ runner.os }}-playwright-${{
78-
steps.playwright-version.outputs.PLAYWRIGHT_VERSION }}
77+
${{ runner.os }}-playwright-${{ steps.playwright-version.outputs.PLAYWRIGHT_VERSION }}
7978
restore-keys: |
8079
${{ runner.os }}-playwright-
8180

.gitignore

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,6 @@ testem.log
3838
.DS_Store
3939
Thumbs.db
4040

41-
node_modules/*
41+
node_modules
4242
dist/
43-
bundle
43+
bundle

.oxfmtrc.json

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"$schema": "./node_modules/oxfmt/configuration_schema.json",
3+
"insertPragma": false,
4+
"printWidth": 100,
5+
"proseWrap": "always",
6+
"requirePragma": false,
7+
"singleQuote": true,
8+
"tabWidth": 2,
9+
"trailingComma": "all",
10+
"ignorePatterns": ["/src/bin", "/dist", "/node_modules", "package.json"]
11+
}

.prettierignore

Lines changed: 0 additions & 3 deletions
This file was deleted.

.prettierrc.json

Lines changed: 0 additions & 21 deletions
This file was deleted.

README.md

Lines changed: 33 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -12,20 +12,17 @@ npm install @sqlite.org/sqlite-wasm
1212

1313
> [!Warning]
1414
>
15-
> This project wraps the code of
16-
> [SQLite Wasm](https://sqlite.org/wasm/doc/trunk/index.md) with _no_ changes,
17-
> apart from added TypeScript types. Please do _not_ file issues or feature
18-
> requests regarding the underlying SQLite Wasm code here. Instead, please
19-
> follow the
20-
> [SQLite bug filing instructions](https://www.sqlite.org/src/wiki?name=Bug+Reports).
21-
> Filing TypeScript type related issues and feature requests is fine.
15+
> This project wraps the code of [SQLite Wasm](https://sqlite.org/wasm/doc/trunk/index.md) with _no_
16+
> changes, apart from added TypeScript types. Please do _not_ file issues or feature requests
17+
> regarding the underlying SQLite Wasm code here. Instead, please follow the
18+
> [SQLite bug filing instructions](https://www.sqlite.org/src/wiki?name=Bug+Reports). Filing
19+
> TypeScript type related issues and feature requests is fine.
2220
2321
## Node.js support
2422

2523
> [!Warning]
2624
>
27-
> Node.js is currently only supported for in-memory databases without
28-
> persistence.
25+
> Node.js is currently only supported for in-memory databases without persistence.
2926
3027
## Usage
3128

@@ -34,8 +31,7 @@ There are two ways to use SQLite Wasm:
3431
- [in a worker](#in-a-worker-with-opfs-if-available)
3532
- [in the main thread](#in-the-main-thread-without-opfs)
3633

37-
Only the worker versions allow you to use the origin private file system (OPFS)
38-
storage back-end.
34+
Only the worker versions allow you to use the origin private file system (OPFS) storage back-end.
3935

4036
### In a worker (with OPFS if available):
4137

@@ -116,8 +112,8 @@ The `db` object above implements the
116112

117113
## Usage with vite
118114

119-
If you are using [vite](https://vitejs.dev/), you need to add the following
120-
config option in `vite.config.js`:
115+
If you are using [vite](https://vitejs.dev/), you need to add the following config option in
116+
`vite.config.js`:
121117

122118
```js
123119
import { defineConfig } from 'vite';
@@ -135,38 +131,33 @@ export default defineConfig({
135131
});
136132
```
137133

138-
Check out a
139-
[sample project](https://stackblitz.com/edit/vitejs-vite-ttrbwh?file=main.js)
140-
that shows this in action.
134+
Check out a [sample project](https://stackblitz.com/edit/vitejs-vite-ttrbwh?file=main.js) that shows
135+
this in action.
141136

142137
## Demo
143138

144-
See the [demo](https://github.com/sqlite/sqlite-wasm/tree/main/demo) folder for
145-
examples of how to use this in the main thread and in a worker. (Note that the
146-
worker variant requires special HTTP headers, so it can't be hosted on GitHub
147-
Pages.) An example that shows how to use this with vite is available on
148-
[StackBlitz](https://stackblitz.com/edit/vitejs-vite-ttrbwh?file=main.js).
139+
See the [demo](https://github.com/sqlite/sqlite-wasm/tree/main/demo) folder for examples of how to
140+
use this in the main thread and in a worker. (Note that the worker variant requires special HTTP
141+
headers, so it can't be hosted on GitHub Pages.) An example that shows how to use this with vite is
142+
available on [StackBlitz](https://stackblitz.com/edit/vitejs-vite-ttrbwh?file=main.js).
149143

150144
## Projects using this package
151145

152-
See the list of
153-
[npm dependents](https://www.npmjs.com/browse/depended/@sqlite.org/sqlite-wasm)
154-
for this package.
146+
See the list of [npm dependents](https://www.npmjs.com/browse/depended/@sqlite.org/sqlite-wasm) for
147+
this package.
155148

156149
## Deploying a new version
157150

158151
(These steps can only be executed by maintainers.)
159152

160-
1. Manually trigger the
161-
[GitHub Actions workflow](../../actions/workflows/build-wasm.yml). By
162-
default, it uses the latest SQLite tag. This pull request will contain the
163-
latest `sqlite3.wasm` and related bindings.
153+
1. Manually trigger the [GitHub Actions workflow](../../actions/workflows/build-wasm.yml). By
154+
default, it uses the latest SQLite tag. This pull request will contain the latest `sqlite3.wasm`
155+
and related bindings.
164156

165-
2. Once the above pull request is validated and merged, update the version
166-
number in `package.json`, reflecting the current
167-
[SQLite version number](https://sqlite.org/download.html) and add a build
168-
identifier suffix like `-build1`. The complete version number should read
169-
something like `3.41.2-build1`.
157+
2. Once the above pull request is validated and merged, update the version number in `package.json`,
158+
reflecting the current [SQLite version number](https://sqlite.org/download.html) and add a build
159+
identifier suffix like `-build1`. The complete version number should read something like
160+
`3.41.2-build1`.
170161

171162
## Building the SQLite Wasm locally
172163

@@ -210,9 +201,9 @@ for this package.
210201

211202
## Running tests
212203

213-
The test suite consists of Node.js tests and browser-based tests (using Vitest
214-
Browser Mode). Tests aim to sanity-check the exported scripts. We test for
215-
correct exports and **very** basic functionality.
204+
The test suite consists of Node.js tests and browser-based tests (using Vitest Browser Mode). Tests
205+
aim to sanity-check the exported scripts. We test for correct exports and **very** basic
206+
functionality.
216207

217208
1. Install dependencies:
218209

@@ -234,18 +225,17 @@ correct exports and **very** basic functionality.
234225

235226
## Deprecations
236227

237-
The Worker1 and Promiser1 APIs are, as of 2026-04-15, deprecated. They _will not
238-
be removed_, but they also will not be extended further. It is their author's
239-
considered opinion that they are too fragile, too imperformant, and too limited
240-
for any non-toy software, and their use is _actively discouraged_. The "correct"
241-
way to use this library is documented in [Usage](#usage) section above.
228+
The Worker1 and Promiser1 APIs are, as of 2026-04-15, deprecated. They _will not be removed_, but
229+
they also will not be extended further. It is their author's considered opinion that they are too
230+
fragile, too imperformant, and too limited for any non-toy software, and their use is _actively
231+
discouraged_. The "correct" way to use this library is documented in [Usage](#usage) section above.
242232

243233
## License
244234

245235
Apache 2.0.
246236

247237
## Acknowledgements
248238

249-
This project is based on [SQLite Wasm](https://sqlite.org/wasm), which it
250-
conveniently wraps as an ES Module and publishes to npm as
239+
This project is based on [SQLite Wasm](https://sqlite.org/wasm), which it conveniently wraps as an
240+
ES Module and publishes to npm as
251241
[`@sqlite.org/sqlite-wasm`](https://www.npmjs.com/package/@sqlite.org/sqlite-wasm).

demo/index.html

Lines changed: 0 additions & 19 deletions
This file was deleted.

demo/main-thread.js

Lines changed: 0 additions & 53 deletions
This file was deleted.

demo/node.mjs

Lines changed: 0 additions & 45 deletions
This file was deleted.

0 commit comments

Comments
 (0)