indexeddbshim 17.5.0 → 17.7.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/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 +482 -363
- package/dist/indexeddbshim-UnicodeIdentifiers-node.cjs.map +1 -1
- package/dist/indexeddbshim-UnicodeIdentifiers.js +609 -486
- package/dist/indexeddbshim-UnicodeIdentifiers.js.map +1 -1
- package/dist/indexeddbshim-UnicodeIdentifiers.min.js +4 -4
- package/dist/indexeddbshim-UnicodeIdentifiers.min.js.map +1 -1
- package/dist/indexeddbshim-node.cjs +482 -363
- package/dist/indexeddbshim-node.cjs.map +1 -1
- package/dist/indexeddbshim-noninvasive.js +609 -486
- package/dist/indexeddbshim-noninvasive.js.map +1 -1
- package/dist/indexeddbshim-noninvasive.min.js +4 -4
- package/dist/indexeddbshim-noninvasive.min.js.map +1 -1
- package/dist/indexeddbshim.js +609 -486
- package/dist/indexeddbshim.js.map +1 -1
- package/dist/indexeddbshim.min.js +4 -4
- package/dist/indexeddbshim.min.js.map +1 -1
- package/package.json +6 -6
- package/src/IDBTransaction.js +16 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "indexeddbshim",
|
|
3
|
-
"version": "17.
|
|
3
|
+
"version": "17.7.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"author": "Parashuram <code@nparashuram.com>",
|
|
6
6
|
"contributors": [
|
|
@@ -170,8 +170,8 @@
|
|
|
170
170
|
"canvas": "^3.2.3",
|
|
171
171
|
"eventtargeter": "0.12.0",
|
|
172
172
|
"sync-promise-expanded": "^2.0.0",
|
|
173
|
-
"typeson": "10.
|
|
174
|
-
"typeson-registry": "14.
|
|
173
|
+
"typeson": "10.3.0",
|
|
174
|
+
"typeson-registry": "14.5.0",
|
|
175
175
|
"websql-configurable": "^4.0.0"
|
|
176
176
|
},
|
|
177
177
|
"devDependencies": {
|
|
@@ -185,7 +185,7 @@
|
|
|
185
185
|
"@rollup/plugin-json": "^6.1.0",
|
|
186
186
|
"@rollup/plugin-node-resolve": "^16.0.3",
|
|
187
187
|
"@rollup/plugin-terser": "^1.0.0",
|
|
188
|
-
"@types/node": "^26.4.
|
|
188
|
+
"@types/node": "^26.4.1",
|
|
189
189
|
"@types/websql": "^0.0.30",
|
|
190
190
|
"@unicode/unicode-17.0.0": "^2.0.2",
|
|
191
191
|
"babel-plugin-add-module-exports": "1.0.4",
|
|
@@ -199,8 +199,8 @@
|
|
|
199
199
|
"coveradge": "^0.8.2",
|
|
200
200
|
"delay-cli": "^3.0.0",
|
|
201
201
|
"eslint": "^10.9.1",
|
|
202
|
-
"eslint-config-ash-nazg": "^43.1.
|
|
203
|
-
"globals": "^17.
|
|
202
|
+
"eslint-config-ash-nazg": "^43.1.6",
|
|
203
|
+
"globals": "^17.12.0",
|
|
204
204
|
"is-date-object": "1.1.0",
|
|
205
205
|
"isomorphic-fetch": "^3.0.0",
|
|
206
206
|
"jsdom": "^30.0.1",
|
package/src/IDBTransaction.js
CHANGED
|
@@ -56,7 +56,7 @@ const readonlyProperties = ['objectStoreNames', 'mode', 'durability', 'db', 'err
|
|
|
56
56
|
* __requestsFinished: boolean,
|
|
57
57
|
* __transFinishedCb: (err: boolean, cb: ((bool?: boolean) => void)) => void,
|
|
58
58
|
* __callTransFinishedCb: (err: boolean, cb: ((bool?: boolean) => void)) => void,
|
|
59
|
-
* __transactionEndCallback: () => void,
|
|
59
|
+
* __transactionEndCallback: (() => void)|undefined,
|
|
60
60
|
* __transactionFinished: boolean,
|
|
61
61
|
* __completed: boolean,
|
|
62
62
|
* __transFinishedCbFired: boolean,
|
|
@@ -91,6 +91,19 @@ const readonlyProperties = ['objectStoreNames', 'mode', 'durability', 'db', 'err
|
|
|
91
91
|
* }} IDBTransactionFull
|
|
92
92
|
*/
|
|
93
93
|
|
|
94
|
+
/**
|
|
95
|
+
* @param {IDBTransactionFull} tx
|
|
96
|
+
* @returns {void}
|
|
97
|
+
*/
|
|
98
|
+
function releaseFinishedTransaction (tx) {
|
|
99
|
+
const pos = tx.db.__transactions.indexOf(tx);
|
|
100
|
+
if (pos !== -1) {
|
|
101
|
+
tx.db.__transactions.splice(pos, 1);
|
|
102
|
+
}
|
|
103
|
+
tx.__transactionEndCallback = undefined;
|
|
104
|
+
tx.__requests = [];
|
|
105
|
+
}
|
|
106
|
+
|
|
94
107
|
/**
|
|
95
108
|
* The IndexedDB Transaction.
|
|
96
109
|
* @see https://dvcs.w3.org/hg/IndexedDB/raw-file/tip/Overview.html#idl-def-IDBTransaction
|
|
@@ -645,6 +658,7 @@ IDBTransaction.prototype.__executeRequests = function () {
|
|
|
645
658
|
} finally {
|
|
646
659
|
activeTransactions.delete(me);
|
|
647
660
|
me.__storeHandles = {};
|
|
661
|
+
releaseFinishedTransaction(me);
|
|
648
662
|
}
|
|
649
663
|
}
|
|
650
664
|
if (me.mode === 'readwrite' || me.mode === 'readonly') {
|
|
@@ -928,6 +942,7 @@ IDBTransaction.prototype.__abortTransaction = function (err) {
|
|
|
928
942
|
me.dispatchEvent(evt);
|
|
929
943
|
me.__storeHandles = {};
|
|
930
944
|
me.dispatchEvent(createEvent('__abort'));
|
|
945
|
+
releaseFinishedTransaction(me);
|
|
931
946
|
}, 0);
|
|
932
947
|
return undefined;
|
|
933
948
|
}).catch((err) => {
|