indexeddbshim 19.0.4 → 19.0.5

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.
@@ -1,4 +1,4 @@
1
- /*! indexeddbshim - v19.0.4 - 9/17/2026 */
1
+ /*! indexeddbshim - v19.0.5 - 9/17/2026 */
2
2
 
3
3
  (function (global, factory) {
4
4
  typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
@@ -5621,6 +5621,10 @@
5621
5621
  var q,
5622
5622
  i = -1;
5623
5623
 
5624
+ // On a standard driver, `keepAliveAndWait` issues a SQL query, which
5625
+ // is a macrotask. Otherwise it issues ten microtasks.
5626
+ var keepAliveAttempts = isStandardDriver ? 1 : 10;
5627
+
5624
5628
  /**
5625
5629
  * A continuation that must still be able to observe the
5626
5630
  * transaction as safe to extend (e.g., re-checking whether an
@@ -5656,9 +5660,9 @@
5656
5660
  });
5657
5661
  } catch (err) {
5658
5662
  // The driver has already finalized the transaction (or otherwise
5659
- // rejected the call) -- nothing left to hold open, so fall back
5660
- // to a plain microtask hop for the continuation itself.
5661
- queueMicrotask(cb);
5663
+ // rejected the call) -- nothing left to hold open. We explicitly
5664
+ // abort the transaction here.
5665
+ me.__abortTransaction(/** @type {Error|DOMException} */err);
5662
5666
  }
5663
5667
  }
5664
5668
 
@@ -5865,9 +5869,11 @@
5865
5869
  * consumer of that same handler (e.g. one that resolves a
5866
5870
  * promise from within `onsuccess` and only attaches `oncomplete`
5867
5871
  * afterward) ever gets a turn to run, so it can miss `complete`
5868
- * entirely. `readonly` requests don't hold a real SQL
5869
- * transaction open, though, so there's no file-lock/connection
5870
- * collision risk in waiting the same bounded amount here.
5872
+ * afterward) ever gets a turn to run, so it can miss `complete`
5873
+ * entirely. On a non-standard driver, `readonly` requests don't hold
5874
+ * a real SQL transaction open, so there's no file-lock/connection
5875
+ * collision risk. On a standard driver, the wait now issues real SQL
5876
+ * inside the read transaction, so this does carry a slight risk.
5871
5877
  * @param {number} attemptsLeft
5872
5878
  * @returns {void}
5873
5879
  */
@@ -5902,7 +5908,7 @@
5902
5908
  }
5903
5909
  i++;
5904
5910
  if (i >= me.__requests.length) {
5905
- checkQueueEntry(10);
5911
+ checkQueueEntry(keepAliveAttempts);
5906
5912
  return;
5907
5913
  }
5908
5914
  runQueuedRequest();
@@ -5939,7 +5945,7 @@
5939
5945
  }
5940
5946
  i++;
5941
5947
  if (i >= me.__requests.length) {
5942
- checkQueueEntry(10);
5948
+ checkQueueEntry(keepAliveAttempts);
5943
5949
  return;
5944
5950
  }
5945
5951
  keepAliveAndWait(function () {