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 (factory) {
4
4
  typeof define === 'function' && define.amd ? define(factory) :
@@ -5626,6 +5626,10 @@
5626
5626
  var q,
5627
5627
  i = -1;
5628
5628
 
5629
+ // On a standard driver, `keepAliveAndWait` issues a SQL query, which
5630
+ // is a macrotask. Otherwise it issues ten microtasks.
5631
+ var keepAliveAttempts = isStandardDriver ? 1 : 10;
5632
+
5629
5633
  /**
5630
5634
  * A continuation that must still be able to observe the
5631
5635
  * transaction as safe to extend (e.g., re-checking whether an
@@ -5661,9 +5665,9 @@
5661
5665
  });
5662
5666
  } catch (err) {
5663
5667
  // The driver has already finalized the transaction (or otherwise
5664
- // rejected the call) -- nothing left to hold open, so fall back
5665
- // to a plain microtask hop for the continuation itself.
5666
- queueMicrotask(cb);
5668
+ // rejected the call) -- nothing left to hold open. We explicitly
5669
+ // abort the transaction here.
5670
+ me.__abortTransaction(/** @type {Error|DOMException} */err);
5667
5671
  }
5668
5672
  }
5669
5673
 
@@ -5870,9 +5874,11 @@
5870
5874
  * consumer of that same handler (e.g. one that resolves a
5871
5875
  * promise from within `onsuccess` and only attaches `oncomplete`
5872
5876
  * afterward) ever gets a turn to run, so it can miss `complete`
5873
- * entirely. `readonly` requests don't hold a real SQL
5874
- * transaction open, though, so there's no file-lock/connection
5875
- * collision risk in waiting the same bounded amount here.
5877
+ * afterward) ever gets a turn to run, so it can miss `complete`
5878
+ * entirely. On a non-standard driver, `readonly` requests don't hold
5879
+ * a real SQL transaction open, so there's no file-lock/connection
5880
+ * collision risk. On a standard driver, the wait now issues real SQL
5881
+ * inside the read transaction, so this does carry a slight risk.
5876
5882
  * @param {number} attemptsLeft
5877
5883
  * @returns {void}
5878
5884
  */
@@ -5907,7 +5913,7 @@
5907
5913
  }
5908
5914
  i++;
5909
5915
  if (i >= me.__requests.length) {
5910
- checkQueueEntry(10);
5916
+ checkQueueEntry(keepAliveAttempts);
5911
5917
  return;
5912
5918
  }
5913
5919
  runQueuedRequest();
@@ -5944,7 +5950,7 @@
5944
5950
  }
5945
5951
  i++;
5946
5952
  if (i >= me.__requests.length) {
5947
- checkQueueEntry(10);
5953
+ checkQueueEntry(keepAliveAttempts);
5948
5954
  return;
5949
5955
  }
5950
5956
  keepAliveAndWait(function () {