Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@sqlite.org/sqlite-wasm

Package Overview
Dependencies
Maintainers
2
Versions
54
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@sqlite.org/sqlite-wasm - npm Package Compare versions

Comparing version 3.42.0-build2 to 3.42.0-build3

10

package.json
{
"name": "@sqlite.org/sqlite-wasm",
"version": "3.42.0-build2",
"version": "3.42.0-build3",
"description": "SQLite Wasm conveniently wrapped as an ES Module.",

@@ -35,3 +35,2 @@ "keywords": [

"scripts": {
"prepare": "npm run build && npm run fix && npm run publint",
"publint": "npx publint",

@@ -42,2 +41,3 @@ "clean": "shx rm -rf sqlite-wasm",

"fix": "npx prettier . --write",
"prepare": "npm run build && npm run fix && npm run publint",
"deploy": "npm run prepare && git add . && git commit -am 'New release' && git push && npm publish --access public"

@@ -61,9 +61,9 @@ },

"node-fetch": "^3.3.1",
"prettier": "^2.8.8",
"publint": "^0.1.13",
"prettier": "^3.0.0",
"publint": "^0.1.16",
"shx": "^0.3.4"
},
"dependencies": {
"optionalDependencies": {
"comlink": "^4.4.1"
}
}

@@ -102,2 +102,29 @@ # SQLite Wasm

## 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 Sqlite(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

@@ -104,0 +131,0 @@

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc