dexie 4.0.1-alpha.20 → 4.0.1-alpha.21

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/README.md ADDED
@@ -0,0 +1,46 @@
1
+ ## Can't find dexie.js?
2
+ Dexie's dist files are no longer checked in to github except temporarily when tagging
3
+ a release version (just so that bower will continue to work). The reason for this is because
4
+ checking in dist files bloats the commit history and makes it error prone to contribute to the
5
+ repo. To support bower though, we have to continue checking in dist files when releasing,
6
+ but that is now handled by the release.sh script, who also removes them directly afterwards.
7
+
8
+ If you still just want to download dexie.js to include in a test HTML page, go
9
+ to the following download site:
10
+
11
+ ### Download
12
+ [dexie.min.js](https://unpkg.com/dexie/dist/dexie.min.js)
13
+
14
+ [dexie.min.js.map](https://unpkg.com/dexie/dist/dexie.min.js.map)
15
+
16
+ ### Typings
17
+ [dexie.d.ts](https://unpkg.com/dexie/dist/dexie.d.ts)
18
+
19
+ ### Optional Stuff
20
+ [dexie.js (non-minified version)](https://unpkg.com/dexie/dist/dexie.js)
21
+
22
+ [dexie.js.map](https://unpkg.com/dexie/dist/dexie.js.map)
23
+
24
+ [dexie.min.js.gz (Minified and gzipped)](https://unpkg.com/dexie/dist/dexie.min.js.gz)
25
+
26
+ ## Install from NPM
27
+ ```
28
+ npm install dexie
29
+ ```
30
+
31
+ ## How to build
32
+ 1. cd to dexie package
33
+ 2. npm install
34
+ 3. npm run build
35
+
36
+ ## Contributing to Dexie.js?
37
+
38
+ Watch:
39
+ ```
40
+ npm run watch
41
+ ```
42
+
43
+ Test:
44
+ ```
45
+ npm test
46
+ ```
package/dist/dexie.d.ts CHANGED
@@ -4,7 +4,7 @@
4
4
  *
5
5
  * By David Fahlander, david.fahlander@gmail.com
6
6
  *
7
- * Version 4.0.1-alpha.20, Mon Jun 12 2023
7
+ * Version 4.0.1-alpha.21+test1, Wed Jun 14 2023
8
8
  *
9
9
  * https://dexie.org
10
10
  *
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.0.1-alpha.20, Mon Jun 12 2023
7
+ * Version 4.0.1-alpha.21+test1, Wed Jun 14 2023
8
8
  *
9
9
  * https://dexie.org
10
10
  *
@@ -1284,7 +1284,7 @@
1284
1284
  }
1285
1285
  }
1286
1286
 
1287
- var DEXIE_VERSION = '4.0.1-alpha.20';
1287
+ var DEXIE_VERSION = '4.0.1-alpha.21+test1';
1288
1288
  var maxString = String.fromCharCode(65535);
1289
1289
  var minKey = -Infinity;
1290
1290
  var INVALID_KEY_ARGUMENT = "Invalid key provided. Keys must be of type string, number, Date or Array<string | number | Date>.";
@@ -4601,9 +4601,6 @@
4601
4601
  ? req.obsSet = {}
4602
4602
  : subscr;
4603
4603
  if (isLiveQuery) {
4604
- var signal = PSD.signal;
4605
- if (signal && signal.aborted)
4606
- throw new exceptions.Abort();
4607
4604
  var getRangeSet = function (indexName) {
4608
4605
  var part = "idb://".concat(dbName, "/").concat(tableName, "/").concat(indexName);
4609
4606
  return (obsSet[part] ||
@@ -4956,15 +4953,10 @@
4956
4953
  var dbName = core.schema.name;
4957
4954
  var coreMW = __assign(__assign({}, core), { transaction: function (stores, mode, options) {
4958
4955
  var idbtrans = core.transaction(stores, mode, options);
4959
- var txs = PSD.txs;
4960
- if (txs || mode === 'readwrite') {
4961
- if (txs)
4962
- txs.push(idbtrans);
4956
+ if (mode === 'readwrite') {
4963
4957
  var ac_1 = new AbortController();
4964
4958
  var signal = ac_1.signal;
4965
4959
  var endTransaction = function (wasCommitted) { return function () {
4966
- if (txs)
4967
- delArrayItem(txs, idbtrans);
4968
4960
  ac_1.abort();
4969
4961
  if (mode === 'readwrite') {
4970
4962
  var affectedSubscribers_1 = new Set();
@@ -5086,13 +5078,7 @@
5086
5078
  });
5087
5079
  cacheEntry = {
5088
5080
  obsSet: req.obsSet,
5089
- promise: promise.catch(function (error) {
5090
- if (req.trans.aborted) {
5091
- var trans = coreMW.transaction([tableName], 'readonly');
5092
- return tableMW.query(__assign(__assign({}, req), { trans: trans }));
5093
- }
5094
- return Promise.reject(error);
5095
- }),
5081
+ promise: promise,
5096
5082
  subscribers: new Set(),
5097
5083
  type: 'query',
5098
5084
  req: req,
@@ -5482,7 +5468,6 @@
5482
5468
  }
5483
5469
  var closed = false;
5484
5470
  var abortController;
5485
- var txs = [];
5486
5471
  var accumMuts = {};
5487
5472
  var currentObs = {};
5488
5473
  var subscription = {
@@ -5497,13 +5482,6 @@
5497
5482
  abortController.abort();
5498
5483
  if (startedListening)
5499
5484
  globalEvents.storagemutated.unsubscribe(mutationListener);
5500
- txs.forEach(function (idbtrans) {
5501
- idbtrans.aborted = true;
5502
- try {
5503
- idbtrans.abort();
5504
- }
5505
- catch (_a) { }
5506
- });
5507
5485
  },
5508
5486
  };
5509
5487
  observer.start && observer.start(subscription);
@@ -5528,19 +5506,8 @@
5528
5506
  if (abortController)
5529
5507
  abortController.abort();
5530
5508
  abortController = new AbortController();
5531
- if (txs.length) {
5532
- txs.forEach(function (idbtrans) {
5533
- idbtrans.aborted = true;
5534
- try {
5535
- idbtrans.abort();
5536
- }
5537
- catch (_a) { }
5538
- });
5539
- txs.length = 0;
5540
- }
5541
5509
  var ctx = {
5542
5510
  subscr: subscr,
5543
- txs: txs,
5544
5511
  signal: abortController.signal,
5545
5512
  requery: doQuery,
5546
5513
  trans: null