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) :
@@ -5613,6 +5613,10 @@
5613
5613
  var q,
5614
5614
  i = -1;
5615
5615
 
5616
+ // On a standard driver, `keepAliveAndWait` issues a SQL query, which
5617
+ // is a macrotask. Otherwise it issues ten microtasks.
5618
+ var keepAliveAttempts = isStandardDriver ? 1 : 10;
5619
+
5616
5620
  /**
5617
5621
  * A continuation that must still be able to observe the
5618
5622
  * transaction as safe to extend (e.g., re-checking whether an
@@ -5648,9 +5652,9 @@
5648
5652
  });
5649
5653
  } catch (err) {
5650
5654
  // The driver has already finalized the transaction (or otherwise
5651
- // rejected the call) -- nothing left to hold open, so fall back
5652
- // to a plain microtask hop for the continuation itself.
5653
- queueMicrotask(cb);
5655
+ // rejected the call) -- nothing left to hold open. We explicitly
5656
+ // abort the transaction here.
5657
+ me.__abortTransaction(/** @type {Error|DOMException} */err);
5654
5658
  }
5655
5659
  }
5656
5660
 
@@ -5857,9 +5861,11 @@
5857
5861
  * consumer of that same handler (e.g. one that resolves a
5858
5862
  * promise from within `onsuccess` and only attaches `oncomplete`
5859
5863
  * afterward) ever gets a turn to run, so it can miss `complete`
5860
- * entirely. `readonly` requests don't hold a real SQL
5861
- * transaction open, though, so there's no file-lock/connection
5862
- * collision risk in waiting the same bounded amount here.
5864
+ * afterward) ever gets a turn to run, so it can miss `complete`
5865
+ * entirely. On a non-standard driver, `readonly` requests don't hold
5866
+ * a real SQL transaction open, so there's no file-lock/connection
5867
+ * collision risk. On a standard driver, the wait now issues real SQL
5868
+ * inside the read transaction, so this does carry a slight risk.
5863
5869
  * @param {number} attemptsLeft
5864
5870
  * @returns {void}
5865
5871
  */
@@ -5894,7 +5900,7 @@
5894
5900
  }
5895
5901
  i++;
5896
5902
  if (i >= me.__requests.length) {
5897
- checkQueueEntry(10);
5903
+ checkQueueEntry(keepAliveAttempts);
5898
5904
  return;
5899
5905
  }
5900
5906
  runQueuedRequest();
@@ -5931,7 +5937,7 @@
5931
5937
  }
5932
5938
  i++;
5933
5939
  if (i >= me.__requests.length) {
5934
- checkQueueEntry(10);
5940
+ checkQueueEntry(keepAliveAttempts);
5935
5941
  return;
5936
5942
  }
5937
5943
  keepAliveAndWait(function () {