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/modern/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
|
*
|
|
@@ -147,8 +147,11 @@ function setByKeyPath(obj, keyPath, value) {
|
|
|
147
147
|
obj[currentKeyPath] = value;
|
|
148
148
|
else {
|
|
149
149
|
var innerObj = obj[currentKeyPath];
|
|
150
|
-
if (!innerObj || !hasOwn(obj, currentKeyPath))
|
|
150
|
+
if (!innerObj || !hasOwn(obj, currentKeyPath)) {
|
|
151
|
+
if (value === undefined)
|
|
152
|
+
return;
|
|
151
153
|
innerObj = obj[currentKeyPath] = {};
|
|
154
|
+
}
|
|
152
155
|
setByKeyPath(innerObj, remainingKeyPath, value);
|
|
153
156
|
}
|
|
154
157
|
}
|
|
@@ -1118,14 +1121,7 @@ function execInGlobalContext(cb) {
|
|
|
1118
1121
|
}
|
|
1119
1122
|
var rejection = DexiePromise.reject;
|
|
1120
1123
|
|
|
1121
|
-
function
|
|
1122
|
-
return (ex?.name === 'UnknownError' &&
|
|
1123
|
-
typeof ex?.message === 'string' &&
|
|
1124
|
-
ex.message.includes('inject key'));
|
|
1125
|
-
}
|
|
1126
|
-
const WEBKIT_INJECT_KEY_MAX_RETRIES$1 = 7;
|
|
1127
|
-
const WEBKIT_INJECT_KEY_BASE_DELAY_MS$1 = 100;
|
|
1128
|
-
function tempTransaction(db, mode, storeNames, fn, _webkitRetry = 0) {
|
|
1124
|
+
function tempTransaction(db, mode, storeNames, fn) {
|
|
1129
1125
|
if (!db.idbdb || (!db._state.openComplete && !PSD.letThrough && !db._vip)) {
|
|
1130
1126
|
if (db._state.openComplete) {
|
|
1131
1127
|
return rejection(new exceptions.DatabaseClosed(db._state.dbOpenError));
|
|
@@ -1169,22 +1165,11 @@ function tempTransaction(db, mode, storeNames, fn, _webkitRetry = 0) {
|
|
|
1169
1165
|
return mode === 'readonly'
|
|
1170
1166
|
? result
|
|
1171
1167
|
: trans._completion.then(() => result);
|
|
1172
|
-
})
|
|
1173
|
-
.catch((ex) => {
|
|
1174
|
-
if (isWebKitInjectKeyError$1(ex) &&
|
|
1175
|
-
_webkitRetry < WEBKIT_INJECT_KEY_MAX_RETRIES$1) {
|
|
1176
|
-
const delay = WEBKIT_INJECT_KEY_BASE_DELAY_MS$1 * Math.pow(1.5, _webkitRetry);
|
|
1177
|
-
if (_webkitRetry === 0) {
|
|
1178
|
-
console.warn('Dexie: WebKit "Cannot inject key" workaround — retrying transaction');
|
|
1179
|
-
}
|
|
1180
|
-
return new Promise((resolve) => setTimeout(resolve, delay)).then(() => tempTransaction(db, mode, storeNames, fn, _webkitRetry + 1));
|
|
1181
|
-
}
|
|
1182
|
-
return rejection(ex);
|
|
1183
1168
|
});
|
|
1184
1169
|
}
|
|
1185
1170
|
}
|
|
1186
1171
|
|
|
1187
|
-
const DEXIE_VERSION = '4.4.
|
|
1172
|
+
const DEXIE_VERSION = '4.4.3';
|
|
1188
1173
|
const maxString = String.fromCharCode(65535);
|
|
1189
1174
|
const minKey = -Infinity;
|
|
1190
1175
|
const INVALID_KEY_ARGUMENT = 'Invalid key provided. Keys must be of type string, number, Date or Array<string | number | Date>.';
|
|
@@ -4472,13 +4457,6 @@ function awaitIterator(iterator) {
|
|
|
4472
4457
|
return step(callNext)();
|
|
4473
4458
|
}
|
|
4474
4459
|
|
|
4475
|
-
function isWebKitInjectKeyError(ex) {
|
|
4476
|
-
return (ex?.name === 'UnknownError' &&
|
|
4477
|
-
typeof ex?.message === 'string' &&
|
|
4478
|
-
ex.message.includes('inject key'));
|
|
4479
|
-
}
|
|
4480
|
-
const WEBKIT_INJECT_KEY_MAX_RETRIES = 7;
|
|
4481
|
-
const WEBKIT_INJECT_KEY_BASE_DELAY_MS = 100;
|
|
4482
4460
|
function extractTransactionArgs(mode, _tableArgs_, scopeFunc) {
|
|
4483
4461
|
var i = arguments.length;
|
|
4484
4462
|
if (i < 2)
|
|
@@ -4490,7 +4468,7 @@ function extractTransactionArgs(mode, _tableArgs_, scopeFunc) {
|
|
|
4490
4468
|
var tables = flatten(args);
|
|
4491
4469
|
return [mode, tables, scopeFunc];
|
|
4492
4470
|
}
|
|
4493
|
-
function enterTransactionScope(db, mode, storeNames, parentTransaction, scopeFunc
|
|
4471
|
+
function enterTransactionScope(db, mode, storeNames, parentTransaction, scopeFunc) {
|
|
4494
4472
|
return DexiePromise.resolve().then(() => {
|
|
4495
4473
|
const transless = PSD.transless || PSD;
|
|
4496
4474
|
const trans = db._createTransaction(mode, storeNames, db._dbSchema, parentTransaction);
|
|
@@ -4552,15 +4530,6 @@ function enterTransactionScope(db, mode, storeNames, parentTransaction, scopeFun
|
|
|
4552
4530
|
return trans._completion.then(() => x);
|
|
4553
4531
|
})
|
|
4554
4532
|
.catch((e) => {
|
|
4555
|
-
if (!parentTransaction &&
|
|
4556
|
-
isWebKitInjectKeyError(e) &&
|
|
4557
|
-
_webkitRetry < WEBKIT_INJECT_KEY_MAX_RETRIES) {
|
|
4558
|
-
const delay = WEBKIT_INJECT_KEY_BASE_DELAY_MS * Math.pow(1.5, _webkitRetry);
|
|
4559
|
-
if (_webkitRetry === 0) {
|
|
4560
|
-
console.warn('Dexie: WebKit "Cannot inject key" workaround — retrying transaction');
|
|
4561
|
-
}
|
|
4562
|
-
return new DexiePromise((resolve) => setTimeout(resolve, delay)).then(() => enterTransactionScope(db, mode, storeNames, parentTransaction, scopeFunc, _webkitRetry + 1));
|
|
4563
|
-
}
|
|
4564
4533
|
trans._reject(e);
|
|
4565
4534
|
return rejection(e);
|
|
4566
4535
|
});
|
|
@@ -6142,7 +6111,7 @@ function liveQuery(querier) {
|
|
|
6142
6111
|
};
|
|
6143
6112
|
const ret = execute(ctx);
|
|
6144
6113
|
if (!startedListening) {
|
|
6145
|
-
globalEvents(
|
|
6114
|
+
globalEvents.storagemutated.subscribe(mutationListener);
|
|
6146
6115
|
startedListening = true;
|
|
6147
6116
|
}
|
|
6148
6117
|
Promise.resolve(ret).then((result) => {
|