Skip to content

Commit 1bf0009

Browse files
committed
New release
1 parent 92afba8 commit 1bf0009

File tree

5 files changed

+33
-27
lines changed

5 files changed

+33
-27
lines changed

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -111,19 +111,19 @@ sqlite3InitModule({
111111
Import the `@sqlite.org/sqlite-wasm` library in your code and use it as such:
112112

113113
```js
114-
import {SqliteClient} from "@sqlite.org/sqlite-wasm";
114+
import { SqliteClient } from '@sqlite.org/sqlite-wasm';
115115

116116
// Must correspond to the path in your final deployed build.
117117
const sqliteWorkerPath = 'assets/js/sqlite-worker.js';
118118
// This is the name of your database. It corresponds to the path in the OPFS.
119119
const filename = '/test.sqlite3';
120120

121-
const sqlite = new Sqlite(filename, sqliteWorkerPath)
121+
const sqlite = new Sqlite(filename, sqliteWorkerPath);
122122
await sqlite.init();
123123

124-
await sqlite.executeSql("CREATE TABLE IF NOT EXISTS test(a,b)");
125-
await sqlite.executeSql("INSERT INTO test VALUES(?, ?)", [6,7]);
126-
const results = await sqlite.executeSql("SELECT * FROM test");
124+
await sqlite.executeSql('CREATE TABLE IF NOT EXISTS test(a,b)');
125+
await sqlite.executeSql('INSERT INTO test VALUES(?, ?)', [6, 7]);
126+
const results = await sqlite.executeSql('SELECT * FROM test');
127127
```
128128

129129
## Usage with vite

demo/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<!DOCTYPE html>
1+
<!doctype html>
22
<html>
33
<head>
44
<meta charset="utf-8" />

index.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
import { default as sqlite3InitModule } from './sqlite-wasm/jswasm/sqlite3-bundler-friendly.mjs';
22

33
export default sqlite3InitModule;
4-
export * from './src/sqlite-client.mjs';
4+
export * from './src/sqlite-client.mjs';

package-lock.json

Lines changed: 17 additions & 16 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@sqlite.org/sqlite-wasm",
3-
"version": "3.42.0-build2",
3+
"version": "3.42.0-build3",
44
"description": "SQLite Wasm conveniently wrapped as an ES Module.",
55
"keywords": [
66
"sqlite",
@@ -15,7 +15,11 @@
1515
],
1616
"main": "index.mjs",
1717
"type": "module",
18-
"files": ["index.mjs", "sqlite-wasm/", "src/"],
18+
"files": [
19+
"index.mjs",
20+
"sqlite-wasm/",
21+
"src/"
22+
],
1923
"exports": {
2024
".": {
2125
"import": "./index.mjs",
@@ -33,6 +37,7 @@
3337
"build": "npm run clean && node bin/index.js",
3438
"start": "npx http-server --coop",
3539
"fix": "npx prettier . --write",
40+
"prepare": "npm run build && npm run fix && npm run publint",
3641
"deploy": "npm run prepare && git add . && git commit -am 'New release' && git push && npm publish --access public"
3742
},
3843
"repository": {
@@ -51,8 +56,8 @@
5156
"http-server": "github:vapier/http-server",
5257
"module-workers-polyfill": "^0.3.2",
5358
"node-fetch": "^3.3.1",
54-
"prettier": "^2.8.8",
55-
"publint": "^0.1.13",
59+
"prettier": "^3.0.0",
60+
"publint": "^0.1.16",
5661
"shx": "^0.3.4"
5762
},
5863
"optionalDependencies": {

0 commit comments

Comments
 (0)