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/README.md
CHANGED
|
@@ -247,6 +247,14 @@ Source: [Dexie Cloud To-do app](https://github.com/dexie/Dexie.js/tree/master/sa
|
|
|
247
247
|
|
|
248
248
|
Live demo: https://dexie.github.io/Dexie.js/dexie-cloud-todo-app/
|
|
249
249
|
|
|
250
|
+
## Legacy Addons (dexie-observable, dexie-syncable)
|
|
251
|
+
|
|
252
|
+
> **⚠️ These packages are legacy and no longer maintained.**
|
|
253
|
+
|
|
254
|
+
If you find references to `dexie-observable` or `dexie-syncable` in tutorials, blog posts, or old code, be aware that these are **deprecated** sync solutions. They are not compatible with Dexie Cloud and should not be used in new projects.
|
|
255
|
+
|
|
256
|
+
**For local-first sync, use [`dexie-cloud-addon`](https://dexie.org/cloud/) instead.** It is the modern, actively maintained solution for offline-first apps with real-time sync.
|
|
257
|
+
|
|
250
258
|
## Samples
|
|
251
259
|
|
|
252
260
|
https://dexie.org/docs/Samples
|
package/dist/dexie.d.ts
CHANGED
package/dist/dexie.js
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
|
*
|
|
@@ -190,8 +190,11 @@
|
|
|
190
190
|
obj[currentKeyPath] = value;
|
|
191
191
|
else {
|
|
192
192
|
var innerObj = obj[currentKeyPath];
|
|
193
|
-
if (!innerObj || !hasOwn(obj, currentKeyPath))
|
|
193
|
+
if (!innerObj || !hasOwn(obj, currentKeyPath)) {
|
|
194
|
+
if (value === undefined)
|
|
195
|
+
return;
|
|
194
196
|
innerObj = obj[currentKeyPath] = {};
|
|
197
|
+
}
|
|
195
198
|
setByKeyPath(innerObj, remainingKeyPath, value);
|
|
196
199
|
}
|
|
197
200
|
}
|
|
@@ -1174,15 +1177,7 @@
|
|
|
1174
1177
|
}
|
|
1175
1178
|
var rejection = DexiePromise.reject;
|
|
1176
1179
|
|
|
1177
|
-
function
|
|
1178
|
-
return ((ex === null || ex === void 0 ? void 0 : ex.name) === 'UnknownError' &&
|
|
1179
|
-
typeof (ex === null || ex === void 0 ? void 0 : ex.message) === 'string' &&
|
|
1180
|
-
ex.message.includes('inject key'));
|
|
1181
|
-
}
|
|
1182
|
-
var WEBKIT_INJECT_KEY_MAX_RETRIES$1 = 7;
|
|
1183
|
-
var WEBKIT_INJECT_KEY_BASE_DELAY_MS$1 = 100;
|
|
1184
|
-
function tempTransaction(db, mode, storeNames, fn, _webkitRetry) {
|
|
1185
|
-
if (_webkitRetry === void 0) { _webkitRetry = 0; }
|
|
1180
|
+
function tempTransaction(db, mode, storeNames, fn) {
|
|
1186
1181
|
if (!db.idbdb || (!db._state.openComplete && !PSD.letThrough && !db._vip)) {
|
|
1187
1182
|
if (db._state.openComplete) {
|
|
1188
1183
|
return rejection(new exceptions.DatabaseClosed(db._state.dbOpenError));
|
|
@@ -1228,24 +1223,11 @@
|
|
|
1228
1223
|
return mode === 'readonly'
|
|
1229
1224
|
? result
|
|
1230
1225
|
: trans._completion.then(function () { return result; });
|
|
1231
|
-
})
|
|
1232
|
-
.catch(function (ex) {
|
|
1233
|
-
if (isWebKitInjectKeyError$1(ex) &&
|
|
1234
|
-
_webkitRetry < WEBKIT_INJECT_KEY_MAX_RETRIES$1) {
|
|
1235
|
-
var delay_1 = WEBKIT_INJECT_KEY_BASE_DELAY_MS$1 * Math.pow(1.5, _webkitRetry);
|
|
1236
|
-
if (_webkitRetry === 0) {
|
|
1237
|
-
console.warn('Dexie: WebKit "Cannot inject key" workaround — retrying transaction');
|
|
1238
|
-
}
|
|
1239
|
-
return new Promise(function (resolve) { return setTimeout(resolve, delay_1); }).then(function () {
|
|
1240
|
-
return tempTransaction(db, mode, storeNames, fn, _webkitRetry + 1);
|
|
1241
|
-
});
|
|
1242
|
-
}
|
|
1243
|
-
return rejection(ex);
|
|
1244
1226
|
});
|
|
1245
1227
|
}
|
|
1246
1228
|
}
|
|
1247
1229
|
|
|
1248
|
-
var DEXIE_VERSION = '4.4.
|
|
1230
|
+
var DEXIE_VERSION = '4.4.3';
|
|
1249
1231
|
var maxString = String.fromCharCode(65535);
|
|
1250
1232
|
var minKey = -Infinity;
|
|
1251
1233
|
var INVALID_KEY_ARGUMENT = 'Invalid key provided. Keys must be of type string, number, Date or Array<string | number | Date>.';
|
|
@@ -4697,13 +4679,6 @@
|
|
|
4697
4679
|
return step(callNext)();
|
|
4698
4680
|
}
|
|
4699
4681
|
|
|
4700
|
-
function isWebKitInjectKeyError(ex) {
|
|
4701
|
-
return ((ex === null || ex === void 0 ? void 0 : ex.name) === 'UnknownError' &&
|
|
4702
|
-
typeof (ex === null || ex === void 0 ? void 0 : ex.message) === 'string' &&
|
|
4703
|
-
ex.message.includes('inject key'));
|
|
4704
|
-
}
|
|
4705
|
-
var WEBKIT_INJECT_KEY_MAX_RETRIES = 7;
|
|
4706
|
-
var WEBKIT_INJECT_KEY_BASE_DELAY_MS = 100;
|
|
4707
4682
|
function extractTransactionArgs(mode, _tableArgs_, scopeFunc) {
|
|
4708
4683
|
var i = arguments.length;
|
|
4709
4684
|
if (i < 2)
|
|
@@ -4715,8 +4690,7 @@
|
|
|
4715
4690
|
var tables = flatten(args);
|
|
4716
4691
|
return [mode, tables, scopeFunc];
|
|
4717
4692
|
}
|
|
4718
|
-
function enterTransactionScope(db, mode, storeNames, parentTransaction, scopeFunc
|
|
4719
|
-
if (_webkitRetry === void 0) { _webkitRetry = 0; }
|
|
4693
|
+
function enterTransactionScope(db, mode, storeNames, parentTransaction, scopeFunc) {
|
|
4720
4694
|
return DexiePromise.resolve().then(function () {
|
|
4721
4695
|
var transless = PSD.transless || PSD;
|
|
4722
4696
|
var trans = db._createTransaction(mode, storeNames, db._dbSchema, parentTransaction);
|
|
@@ -4782,19 +4756,6 @@
|
|
|
4782
4756
|
return trans._completion.then(function () { return x; });
|
|
4783
4757
|
})
|
|
4784
4758
|
.catch(function (e) {
|
|
4785
|
-
if (!parentTransaction &&
|
|
4786
|
-
isWebKitInjectKeyError(e) &&
|
|
4787
|
-
_webkitRetry < WEBKIT_INJECT_KEY_MAX_RETRIES) {
|
|
4788
|
-
var delay_1 = WEBKIT_INJECT_KEY_BASE_DELAY_MS * Math.pow(1.5, _webkitRetry);
|
|
4789
|
-
if (_webkitRetry === 0) {
|
|
4790
|
-
console.warn('Dexie: WebKit "Cannot inject key" workaround — retrying transaction');
|
|
4791
|
-
}
|
|
4792
|
-
return new DexiePromise(function (resolve) {
|
|
4793
|
-
return setTimeout(resolve, delay_1);
|
|
4794
|
-
}).then(function () {
|
|
4795
|
-
return enterTransactionScope(db, mode, storeNames, parentTransaction, scopeFunc, _webkitRetry + 1);
|
|
4796
|
-
});
|
|
4797
|
-
}
|
|
4798
4759
|
trans._reject(e);
|
|
4799
4760
|
return rejection(e);
|
|
4800
4761
|
});
|
|
@@ -6372,7 +6333,7 @@
|
|
|
6372
6333
|
};
|
|
6373
6334
|
var ret = execute(ctx);
|
|
6374
6335
|
if (!startedListening) {
|
|
6375
|
-
globalEvents(
|
|
6336
|
+
globalEvents.storagemutated.subscribe(mutationListener);
|
|
6376
6337
|
startedListening = true;
|
|
6377
6338
|
}
|
|
6378
6339
|
Promise.resolve(ret).then(function (result) {
|