indexeddbshim 17.4.3 → 17.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/IDBFactory.d.ts +1 -3
- package/dist/IDBFactory.d.ts.map +1 -1
- package/dist/IDBTransaction.d.ts +1 -77
- package/dist/IDBTransaction.d.ts.map +1 -1
- package/dist/indexeddbshim-Key.js +1 -1
- package/dist/indexeddbshim-Key.min.js +1 -1
- package/dist/indexeddbshim-UnicodeIdentifiers-node.cjs +30 -2011
- package/dist/indexeddbshim-UnicodeIdentifiers-node.cjs.map +1 -1
- package/dist/indexeddbshim-UnicodeIdentifiers.js +22 -9
- package/dist/indexeddbshim-UnicodeIdentifiers.js.map +1 -1
- package/dist/indexeddbshim-UnicodeIdentifiers.min.js +3 -3
- package/dist/indexeddbshim-UnicodeIdentifiers.min.js.map +1 -1
- package/dist/indexeddbshim-node.cjs +30 -2011
- package/dist/indexeddbshim-node.cjs.map +1 -1
- package/dist/indexeddbshim-noninvasive.js +22 -9
- package/dist/indexeddbshim-noninvasive.js.map +1 -1
- package/dist/indexeddbshim-noninvasive.min.js +3 -3
- package/dist/indexeddbshim-noninvasive.min.js.map +1 -1
- package/dist/indexeddbshim.js +22 -9
- package/dist/indexeddbshim.js.map +1 -1
- package/dist/indexeddbshim.min.js +3 -3
- package/dist/indexeddbshim.min.js.map +1 -1
- package/dist/nodeWebSQL.d.ts +1 -1
- package/dist/nodeWebSQL.d.ts.map +1 -1
- package/package.json +4 -8
- package/src/IDBFactory.js +5 -7
- package/src/IDBTransaction.js +16 -1
- package/src/nodeWebSQL.js +5 -5
- package/dist/nodeSQLiteDatabase.d.ts +0 -64
- package/dist/nodeSQLiteDatabase.d.ts.map +0 -1
- package/src/nodeSQLiteDatabase.js +0 -314
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! indexeddbshim - v17.
|
|
1
|
+
/*! indexeddbshim - v17.6.0 - 9/1/2026 */
|
|
2
2
|
|
|
3
3
|
(function (global, factory) {
|
|
4
4
|
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
|
|
@@ -5390,7 +5390,7 @@
|
|
|
5390
5390
|
* __requestsFinished: boolean,
|
|
5391
5391
|
* __transFinishedCb: (err: boolean, cb: ((bool?: boolean) => void)) => void,
|
|
5392
5392
|
* __callTransFinishedCb: (err: boolean, cb: ((bool?: boolean) => void)) => void,
|
|
5393
|
-
* __transactionEndCallback: () => void,
|
|
5393
|
+
* __transactionEndCallback: (() => void)|undefined,
|
|
5394
5394
|
* __transactionFinished: boolean,
|
|
5395
5395
|
* __completed: boolean,
|
|
5396
5396
|
* __transFinishedCbFired: boolean,
|
|
@@ -5425,6 +5425,19 @@
|
|
|
5425
5425
|
* }} IDBTransactionFull
|
|
5426
5426
|
*/
|
|
5427
5427
|
|
|
5428
|
+
/**
|
|
5429
|
+
* @param {IDBTransactionFull} tx
|
|
5430
|
+
* @returns {void}
|
|
5431
|
+
*/
|
|
5432
|
+
function releaseFinishedTransaction(tx) {
|
|
5433
|
+
var pos = tx.db.__transactions.indexOf(tx);
|
|
5434
|
+
if (pos !== -1) {
|
|
5435
|
+
tx.db.__transactions.splice(pos, 1);
|
|
5436
|
+
}
|
|
5437
|
+
tx.__transactionEndCallback = undefined;
|
|
5438
|
+
tx.__requests = [];
|
|
5439
|
+
}
|
|
5440
|
+
|
|
5428
5441
|
/**
|
|
5429
5442
|
* The IndexedDB Transaction.
|
|
5430
5443
|
* @see https://dvcs.w3.org/hg/IndexedDB/raw-file/tip/Overview.html#idl-def-IDBTransaction
|
|
@@ -5989,6 +6002,7 @@
|
|
|
5989
6002
|
} finally {
|
|
5990
6003
|
activeTransactions.delete(me);
|
|
5991
6004
|
me.__storeHandles = {};
|
|
6005
|
+
releaseFinishedTransaction(me);
|
|
5992
6006
|
}
|
|
5993
6007
|
}
|
|
5994
6008
|
if (me.mode === 'readwrite' || me.mode === 'readonly') {
|
|
@@ -6275,6 +6289,7 @@
|
|
|
6275
6289
|
me.dispatchEvent(evt);
|
|
6276
6290
|
me.__storeHandles = {};
|
|
6277
6291
|
me.dispatchEvent(createEvent('__abort'));
|
|
6292
|
+
releaseFinishedTransaction(me);
|
|
6278
6293
|
}, 0);
|
|
6279
6294
|
return undefined;
|
|
6280
6295
|
}).catch(function (err) {
|
|
@@ -11262,9 +11277,7 @@
|
|
|
11262
11277
|
/**
|
|
11263
11278
|
* @typedef {import('websql-configurable/lib/websql/WebSQLDatabase.js').default & {
|
|
11264
11279
|
* _db: {
|
|
11265
|
-
*
|
|
11266
|
-
* close: (errBack: (err: Error) => void) => void
|
|
11267
|
-
* }
|
|
11280
|
+
* close: (errBack: (err: Error) => void) => void
|
|
11268
11281
|
* }
|
|
11269
11282
|
* }} DatabaseFull
|
|
11270
11283
|
*/
|
|
@@ -11342,7 +11355,7 @@
|
|
|
11342
11355
|
return;
|
|
11343
11356
|
}
|
|
11344
11357
|
dbs.forEach(function (db) {
|
|
11345
|
-
var sqliteDB = db._db
|
|
11358
|
+
var sqliteDB = db._db;
|
|
11346
11359
|
if (!sqliteDB || !sqliteDB.close) {
|
|
11347
11360
|
remaining--;
|
|
11348
11361
|
if (remaining === 0) {
|
|
@@ -11384,9 +11397,9 @@
|
|
|
11384
11397
|
databaseDeleted();
|
|
11385
11398
|
return;
|
|
11386
11399
|
}
|
|
11387
|
-
var _sqliteDB = latestSQLiteDBCached._db
|
|
11400
|
+
var _sqliteDB = latestSQLiteDBCached._db;
|
|
11388
11401
|
if (!_sqliteDB || !_sqliteDB.close) {
|
|
11389
|
-
console.error('The `openDatabase` implementation does not have the expected `._db.
|
|
11402
|
+
console.error('The `openDatabase` implementation does not have the expected `._db.close` method for closing the database');
|
|
11390
11403
|
return;
|
|
11391
11404
|
}
|
|
11392
11405
|
_sqliteDB.close(
|
|
@@ -12191,7 +12204,7 @@
|
|
|
12191
12204
|
var calledDbCreateError = false;
|
|
12192
12205
|
// Snapshotted *now*, synchronously, at call time -- not read later
|
|
12193
12206
|
// from inside the SQL query's callback below, which runs on a
|
|
12194
|
-
// deferred macrotask (see `
|
|
12207
|
+
// deferred macrotask (see `websql-configurable`'s `SQLiteDatabase#exec`) and so
|
|
12195
12208
|
// could otherwise race against (and lose to) an in-flight upgrade's
|
|
12196
12209
|
// own commit/abort handler clearing its `pendingVersionChanges`
|
|
12197
12210
|
// entry in the meantime -- which would make this method incorrectly
|