@sqlite.org/sqlite-wasm
Advanced tools
Comparing version 3.43.2-prebuild1 to 3.44.0-build1
@@ -42,10 +42,2 @@ import fs from 'fs'; | ||
fs.copyFileSync( | ||
'./node_modules/comlink/dist/esm/comlink.mjs', | ||
'./src/comlink.mjs', | ||
); | ||
fs.copyFileSync( | ||
'./node_modules/comlink/dist/esm/comlink.mjs.map', | ||
'./src/comlink.mjs.map', | ||
); | ||
fs.copyFileSync( | ||
'./node_modules/module-workers-polyfill/module-workers-polyfill.min.js', | ||
@@ -52,0 +44,0 @@ './demo/module-workers-polyfill.min.js', |
{ | ||
"name": "@sqlite.org/sqlite-wasm", | ||
"version": "3.43.2-prebuild1", | ||
"version": "3.44.0-build1", | ||
"description": "SQLite Wasm conveniently wrapped as an ES Module.", | ||
@@ -21,4 +21,3 @@ "keywords": [ | ||
"index.mjs", | ||
"sqlite-wasm/", | ||
"src/" | ||
"sqlite-wasm/" | ||
], | ||
@@ -31,9 +30,6 @@ "types": "index.d.ts", | ||
"main": "./index.mjs", | ||
"browser": "./index.mjs", | ||
"types": "./index.d.ts" | ||
"browser": "./index.mjs" | ||
}, | ||
"./src/comlink.mjs": "./src/comlink.mjs", | ||
"./package.json": "./package.json" | ||
}, | ||
"types": "./index.d.ts", | ||
"bin": { | ||
@@ -68,9 +64,6 @@ "sqlite-wasm": "bin/index.js" | ||
"prettier": "^3.0.3", | ||
"publint": "^0.2.4", | ||
"publint": "^0.2.5", | ||
"prettier-plugin-jsdoc": "^1.1.1", | ||
"shx": "^0.3.4" | ||
}, | ||
"optionalDependencies": { | ||
"comlink": "^4.4.1" | ||
} | ||
} |
@@ -8,7 +8,14 @@ # SQLite Wasm | ||
> This project wraps the code of | ||
> [SQLite Wasm](https://sqlite.org/wasm/doc/trunk/index.md) with _no_ changes. | ||
> Please do _not_ file issues or feature requests regarding the underlying | ||
> SQLite Wasm code here. Instead, please follow the | ||
> [SQLite Wasm](https://sqlite.org/wasm/doc/trunk/index.md) with _no_ changes, | ||
> apart from added TypeScript types. Please do _not_ file issues or feature | ||
> requests regarding the underlying SQLite Wasm code here. Instead, please | ||
> follow the | ||
> [SQLite bug filing instructions](https://www.sqlite.org/src/wiki?name=Bug+Reports). | ||
> Filing TypeScript type related issues and feature requests is fine. | ||
> **Warning** | ||
> | ||
> **Breaking change:** Version `3.43.2-build1` removes `SqliteClient`. It will | ||
> be published as a separate package. | ||
## Installation | ||
@@ -107,30 +114,2 @@ | ||
## Usage with the bundled `SQLiteClient` (with OPFS if available): | ||
> **Warning** | ||
> | ||
> For this to work, you need to set the following headers on your server: | ||
> | ||
> `Cross-Origin-Opener-Policy: same-origin` | ||
> | ||
> `Cross-Origin-Embedder-Policy: require-corp` | ||
Import the `@sqlite.org/sqlite-wasm` library in your code and use it as such: | ||
```js | ||
import { SqliteClient } from '@sqlite.org/sqlite-wasm'; | ||
// Must correspond to the path in your final deployed build. | ||
const sqliteWorkerPath = 'assets/js/sqlite-worker.js'; | ||
// This is the name of your database. It corresponds to the path in the OPFS. | ||
const filename = '/test.sqlite3'; | ||
const sqlite = new SqliteClient(filename, sqliteWorkerPath); | ||
await sqlite.init(); | ||
await sqlite.executeSql('CREATE TABLE IF NOT EXISTS test(a,b)'); | ||
await sqlite.executeSql('INSERT INTO test VALUES(?, ?)', [6, 7]); | ||
const results = await sqlite.executeSql('SELECT * FROM test'); | ||
``` | ||
## Usage with vite | ||
@@ -169,2 +148,8 @@ | ||
## Projects using this package | ||
See the list of | ||
[npm dependents](https://www.npmjs.com/browse/depended/@sqlite.org/sqlite-wasm) | ||
for this package. | ||
## Deploying a new version | ||
@@ -171,0 +156,0 @@ |
@@ -37,3 +37,3 @@ /* | ||
const urlParams = globalThis.location | ||
? new URL(self.location.href).searchParams | ||
? new URL(globalThis.location.href).searchParams | ||
: new URLSearchParams(); | ||
@@ -40,0 +40,0 @@ let theJs = 'sqlite3.js'; |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Native code
Supply chain riskContains native code (e.g., compiled binaries or shared libraries). Including native code can obscure malicious behavior.
Found 1 instance in 1 package
3110521
0
26
15
60274
174