@sqlite.org/sqlite-wasm
Advanced tools
Comparing version 3.42.0-build7 to 3.43.0-build1
{ | ||
"name": "@sqlite.org/sqlite-wasm", | ||
"version": "3.42.0-build7", | ||
"version": "3.43.0-build1", | ||
"description": "SQLite Wasm conveniently wrapped as an ES Module.", | ||
@@ -60,4 +60,4 @@ "keywords": [ | ||
"node-fetch": "^3.3.2", | ||
"prettier": "^3.0.1", | ||
"publint": "^0.2.0", | ||
"prettier": "^3.0.2", | ||
"publint": "^0.2.2", | ||
"shx": "^0.3.4" | ||
@@ -64,0 +64,0 @@ }, |
@@ -54,2 +54,5 @@ # SQLite Wasm | ||
The `db` object above implements the | ||
[Object Oriented API #1](https://sqlite.org/wasm/doc/tip/api-oo1.md). | ||
### In a worker (with OPFS if available): | ||
@@ -122,3 +125,3 @@ | ||
const sqlite = new Sqlite(filename, sqliteWorkerPath); | ||
const sqlite = new SqliteClient(filename, sqliteWorkerPath); | ||
await sqlite.init(); | ||
@@ -125,0 +128,0 @@ |
@@ -38,2 +38,5 @@ /* | ||
Firefox v111 and Safari 16.4, both released in March 2023, also | ||
include this. | ||
We cannot change to the sync forms at this point without breaking | ||
@@ -913,3 +916,3 @@ clients who use Chrome v104-ish or higher. truncate(), getSize(), | ||
if ( | ||
'timed-out' === | ||
'not-equal' !== | ||
Atomics.wait( | ||
@@ -922,2 +925,17 @@ state.sabOPView, | ||
) { | ||
/* Maintenance note: we compare against 'not-equal' because | ||
https://github.com/tomayac/sqlite-wasm/issues/12 | ||
is reporting that this occassionally, under high loads, | ||
returns 'ok', which leads to the whichOp being 0 (which | ||
isn't a valid operation ID and leads to an exception, | ||
along with a corresponding ugly console log | ||
message). Unfortunately, the conditions for that cannot | ||
be reliably reproduced. The only place in our code which | ||
writes a 0 to the state.opIds.whichOp SharedArrayBuffer | ||
index is a few lines down from here, and that instance | ||
is required in order for clear communication between | ||
the sync half of this proxy and this half. | ||
*/ | ||
await releaseImplicitLocks(); | ||
@@ -924,0 +942,0 @@ continue; |
@@ -97,6 +97,5 @@ /* | ||
} else if (2 === arguments.length) { | ||
msg = { | ||
type: arguments[0], | ||
args: arguments[1], | ||
}; | ||
msg = Object.create(null); | ||
msg.type = arguments[0]; | ||
msg.args = arguments[1]; | ||
} else { | ||
@@ -142,5 +141,14 @@ toss('Invalid arugments for sqlite3Worker1Promiser()-created factory.'); | ||
worker: function () { | ||
return new Worker('sqlite3-worker1-bundler-friendly.mjs', { | ||
type: 'module', | ||
}); | ||
let theJs = 'sqlite3-worker1.js'; | ||
if (this.currentScript) { | ||
const src = this.currentScript.src.split('/'); | ||
src.pop(); | ||
theJs = src.join('/') + '/' + theJs; | ||
} else if (globalThis.location) { | ||
const urlParams = new URL(globalThis.location.href).searchParams; | ||
if (urlParams.has('sqlite3.dir')) { | ||
theJs = urlParams.get('sqlite3.dir') + '/' + theJs; | ||
} | ||
} | ||
return new Worker(theJs + globalThis.location.search); | ||
}.bind({ | ||
@@ -147,0 +155,0 @@ currentScript: globalThis?.document?.currentScript, |
@@ -97,6 +97,5 @@ /* | ||
} else if (2 === arguments.length) { | ||
msg = { | ||
type: arguments[0], | ||
args: arguments[1], | ||
}; | ||
msg = Object.create(null); | ||
msg.type = arguments[0]; | ||
msg.args = arguments[1]; | ||
} else { | ||
@@ -103,0 +102,0 @@ toss('Invalid arugments for sqlite3Worker1Promiser()-created factory.'); |
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
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
2824100
52708
187