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/dexie.mjs 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
  *
@@ -1278,7 +1278,7 @@ function tempTransaction(db, mode, storeNames, fn) {
1278
1278
  }
1279
1279
  }
1280
1280
 
1281
- var DEXIE_VERSION = '4.0.1-alpha.20';
1281
+ var DEXIE_VERSION = '4.0.1-alpha.21+test1';
1282
1282
  var maxString = String.fromCharCode(65535);
1283
1283
  var minKey = -Infinity;
1284
1284
  var INVALID_KEY_ARGUMENT = "Invalid key provided. Keys must be of type string, number, Date or Array<string | number | Date>.";
@@ -4595,9 +4595,6 @@ var observabilityMiddleware = {
4595
4595
  ? req.obsSet = {}
4596
4596
  : subscr;
4597
4597
  if (isLiveQuery) {
4598
- var signal = PSD.signal;
4599
- if (signal && signal.aborted)
4600
- throw new exceptions.Abort();
4601
4598
  var getRangeSet = function (indexName) {
4602
4599
  var part = "idb://".concat(dbName, "/").concat(tableName, "/").concat(indexName);
4603
4600
  return (obsSet[part] ||
@@ -4950,15 +4947,10 @@ var cacheMiddleware = {
4950
4947
  var dbName = core.schema.name;
4951
4948
  var coreMW = __assign(__assign({}, core), { transaction: function (stores, mode, options) {
4952
4949
  var idbtrans = core.transaction(stores, mode, options);
4953
- var txs = PSD.txs;
4954
- if (txs || mode === 'readwrite') {
4955
- if (txs)
4956
- txs.push(idbtrans);
4950
+ if (mode === 'readwrite') {
4957
4951
  var ac_1 = new AbortController();
4958
4952
  var signal = ac_1.signal;
4959
4953
  var endTransaction = function (wasCommitted) { return function () {
4960
- if (txs)
4961
- delArrayItem(txs, idbtrans);
4962
4954
  ac_1.abort();
4963
4955
  if (mode === 'readwrite') {
4964
4956
  var affectedSubscribers_1 = new Set();
@@ -5080,13 +5072,7 @@ var cacheMiddleware = {
5080
5072
  });
5081
5073
  cacheEntry = {
5082
5074
  obsSet: req.obsSet,
5083
- promise: promise.catch(function (error) {
5084
- if (req.trans.aborted) {
5085
- var trans = coreMW.transaction([tableName], 'readonly');
5086
- return tableMW.query(__assign(__assign({}, req), { trans: trans }));
5087
- }
5088
- return Promise.reject(error);
5089
- }),
5075
+ promise: promise,
5090
5076
  subscribers: new Set(),
5091
5077
  type: 'query',
5092
5078
  req: req,
@@ -5476,7 +5462,6 @@ function liveQuery(querier) {
5476
5462
  }
5477
5463
  var closed = false;
5478
5464
  var abortController;
5479
- var txs = [];
5480
5465
  var accumMuts = {};
5481
5466
  var currentObs = {};
5482
5467
  var subscription = {
@@ -5491,13 +5476,6 @@ function liveQuery(querier) {
5491
5476
  abortController.abort();
5492
5477
  if (startedListening)
5493
5478
  globalEvents.storagemutated.unsubscribe(mutationListener);
5494
- txs.forEach(function (idbtrans) {
5495
- idbtrans.aborted = true;
5496
- try {
5497
- idbtrans.abort();
5498
- }
5499
- catch (_a) { }
5500
- });
5501
5479
  },
5502
5480
  };
5503
5481
  observer.start && observer.start(subscription);
@@ -5522,19 +5500,8 @@ function liveQuery(querier) {
5522
5500
  if (abortController)
5523
5501
  abortController.abort();
5524
5502
  abortController = new AbortController();
5525
- if (txs.length) {
5526
- txs.forEach(function (idbtrans) {
5527
- idbtrans.aborted = true;
5528
- try {
5529
- idbtrans.abort();
5530
- }
5531
- catch (_a) { }
5532
- });
5533
- txs.length = 0;
5534
- }
5535
5503
  var ctx = {
5536
5504
  subscr: subscr,
5537
- txs: txs,
5538
5505
  signal: abortController.signal,
5539
5506
  requery: doQuery,
5540
5507
  trans: null