dexie 4.4.2-pr2297.4 → 4.4.3
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/README.md +8 -0
- package/dist/dexie.d.ts +1 -1
- package/dist/dexie.js +9 -48
- package/dist/dexie.js.map +1 -1
- package/dist/dexie.min.js +1 -1
- package/dist/dexie.min.js.map +1 -1
- package/dist/dexie.mjs +9 -48
- package/dist/dexie.mjs.map +1 -1
- package/dist/modern/dexie.min.mjs +1 -1
- package/dist/modern/dexie.min.mjs.map +1 -1
- package/dist/modern/dexie.mjs +9 -40
- package/dist/modern/dexie.mjs.map +1 -1
- package/package.json +1 -1
package/dist/dexie.mjs
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
*
|
|
5
5
|
* By David Fahlander, david.fahlander@gmail.com
|
|
6
6
|
*
|
|
7
|
-
* Version 4.4.
|
|
7
|
+
* Version 4.4.3, Wed May 27 2026
|
|
8
8
|
*
|
|
9
9
|
* https://dexie.org
|
|
10
10
|
*
|
|
@@ -184,8 +184,11 @@ function setByKeyPath(obj, keyPath, value) {
|
|
|
184
184
|
obj[currentKeyPath] = value;
|
|
185
185
|
else {
|
|
186
186
|
var innerObj = obj[currentKeyPath];
|
|
187
|
-
if (!innerObj || !hasOwn(obj, currentKeyPath))
|
|
187
|
+
if (!innerObj || !hasOwn(obj, currentKeyPath)) {
|
|
188
|
+
if (value === undefined)
|
|
189
|
+
return;
|
|
188
190
|
innerObj = obj[currentKeyPath] = {};
|
|
191
|
+
}
|
|
189
192
|
setByKeyPath(innerObj, remainingKeyPath, value);
|
|
190
193
|
}
|
|
191
194
|
}
|
|
@@ -1168,15 +1171,7 @@ function execInGlobalContext(cb) {
|
|
|
1168
1171
|
}
|
|
1169
1172
|
var rejection = DexiePromise.reject;
|
|
1170
1173
|
|
|
1171
|
-
function
|
|
1172
|
-
return ((ex === null || ex === void 0 ? void 0 : ex.name) === 'UnknownError' &&
|
|
1173
|
-
typeof (ex === null || ex === void 0 ? void 0 : ex.message) === 'string' &&
|
|
1174
|
-
ex.message.includes('inject key'));
|
|
1175
|
-
}
|
|
1176
|
-
var WEBKIT_INJECT_KEY_MAX_RETRIES$1 = 7;
|
|
1177
|
-
var WEBKIT_INJECT_KEY_BASE_DELAY_MS$1 = 100;
|
|
1178
|
-
function tempTransaction(db, mode, storeNames, fn, _webkitRetry) {
|
|
1179
|
-
if (_webkitRetry === void 0) { _webkitRetry = 0; }
|
|
1174
|
+
function tempTransaction(db, mode, storeNames, fn) {
|
|
1180
1175
|
if (!db.idbdb || (!db._state.openComplete && !PSD.letThrough && !db._vip)) {
|
|
1181
1176
|
if (db._state.openComplete) {
|
|
1182
1177
|
return rejection(new exceptions.DatabaseClosed(db._state.dbOpenError));
|
|
@@ -1222,24 +1217,11 @@ function tempTransaction(db, mode, storeNames, fn, _webkitRetry) {
|
|
|
1222
1217
|
return mode === 'readonly'
|
|
1223
1218
|
? result
|
|
1224
1219
|
: trans._completion.then(function () { return result; });
|
|
1225
|
-
})
|
|
1226
|
-
.catch(function (ex) {
|
|
1227
|
-
if (isWebKitInjectKeyError$1(ex) &&
|
|
1228
|
-
_webkitRetry < WEBKIT_INJECT_KEY_MAX_RETRIES$1) {
|
|
1229
|
-
var delay_1 = WEBKIT_INJECT_KEY_BASE_DELAY_MS$1 * Math.pow(1.5, _webkitRetry);
|
|
1230
|
-
if (_webkitRetry === 0) {
|
|
1231
|
-
console.warn('Dexie: WebKit "Cannot inject key" workaround — retrying transaction');
|
|
1232
|
-
}
|
|
1233
|
-
return new Promise(function (resolve) { return setTimeout(resolve, delay_1); }).then(function () {
|
|
1234
|
-
return tempTransaction(db, mode, storeNames, fn, _webkitRetry + 1);
|
|
1235
|
-
});
|
|
1236
|
-
}
|
|
1237
|
-
return rejection(ex);
|
|
1238
1220
|
});
|
|
1239
1221
|
}
|
|
1240
1222
|
}
|
|
1241
1223
|
|
|
1242
|
-
var DEXIE_VERSION = '4.4.
|
|
1224
|
+
var DEXIE_VERSION = '4.4.3';
|
|
1243
1225
|
var maxString = String.fromCharCode(65535);
|
|
1244
1226
|
var minKey = -Infinity;
|
|
1245
1227
|
var INVALID_KEY_ARGUMENT = 'Invalid key provided. Keys must be of type string, number, Date or Array<string | number | Date>.';
|
|
@@ -4691,13 +4673,6 @@ function awaitIterator(iterator) {
|
|
|
4691
4673
|
return step(callNext)();
|
|
4692
4674
|
}
|
|
4693
4675
|
|
|
4694
|
-
function isWebKitInjectKeyError(ex) {
|
|
4695
|
-
return ((ex === null || ex === void 0 ? void 0 : ex.name) === 'UnknownError' &&
|
|
4696
|
-
typeof (ex === null || ex === void 0 ? void 0 : ex.message) === 'string' &&
|
|
4697
|
-
ex.message.includes('inject key'));
|
|
4698
|
-
}
|
|
4699
|
-
var WEBKIT_INJECT_KEY_MAX_RETRIES = 7;
|
|
4700
|
-
var WEBKIT_INJECT_KEY_BASE_DELAY_MS = 100;
|
|
4701
4676
|
function extractTransactionArgs(mode, _tableArgs_, scopeFunc) {
|
|
4702
4677
|
var i = arguments.length;
|
|
4703
4678
|
if (i < 2)
|
|
@@ -4709,8 +4684,7 @@ function extractTransactionArgs(mode, _tableArgs_, scopeFunc) {
|
|
|
4709
4684
|
var tables = flatten(args);
|
|
4710
4685
|
return [mode, tables, scopeFunc];
|
|
4711
4686
|
}
|
|
4712
|
-
function enterTransactionScope(db, mode, storeNames, parentTransaction, scopeFunc
|
|
4713
|
-
if (_webkitRetry === void 0) { _webkitRetry = 0; }
|
|
4687
|
+
function enterTransactionScope(db, mode, storeNames, parentTransaction, scopeFunc) {
|
|
4714
4688
|
return DexiePromise.resolve().then(function () {
|
|
4715
4689
|
var transless = PSD.transless || PSD;
|
|
4716
4690
|
var trans = db._createTransaction(mode, storeNames, db._dbSchema, parentTransaction);
|
|
@@ -4776,19 +4750,6 @@ function enterTransactionScope(db, mode, storeNames, parentTransaction, scopeFun
|
|
|
4776
4750
|
return trans._completion.then(function () { return x; });
|
|
4777
4751
|
})
|
|
4778
4752
|
.catch(function (e) {
|
|
4779
|
-
if (!parentTransaction &&
|
|
4780
|
-
isWebKitInjectKeyError(e) &&
|
|
4781
|
-
_webkitRetry < WEBKIT_INJECT_KEY_MAX_RETRIES) {
|
|
4782
|
-
var delay_1 = WEBKIT_INJECT_KEY_BASE_DELAY_MS * Math.pow(1.5, _webkitRetry);
|
|
4783
|
-
if (_webkitRetry === 0) {
|
|
4784
|
-
console.warn('Dexie: WebKit "Cannot inject key" workaround — retrying transaction');
|
|
4785
|
-
}
|
|
4786
|
-
return new DexiePromise(function (resolve) {
|
|
4787
|
-
return setTimeout(resolve, delay_1);
|
|
4788
|
-
}).then(function () {
|
|
4789
|
-
return enterTransactionScope(db, mode, storeNames, parentTransaction, scopeFunc, _webkitRetry + 1);
|
|
4790
|
-
});
|
|
4791
|
-
}
|
|
4792
4753
|
trans._reject(e);
|
|
4793
4754
|
return rejection(e);
|
|
4794
4755
|
});
|
|
@@ -6366,7 +6327,7 @@ function liveQuery(querier) {
|
|
|
6366
6327
|
};
|
|
6367
6328
|
var ret = execute(ctx);
|
|
6368
6329
|
if (!startedListening) {
|
|
6369
|
-
globalEvents(
|
|
6330
|
+
globalEvents.storagemutated.subscribe(mutationListener);
|
|
6370
6331
|
startedListening = true;
|
|
6371
6332
|
}
|
|
6372
6333
|
Promise.resolve(ret).then(function (result) {
|