@powersync/common 1.57.2 → 1.57.3

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/bundle.mjs CHANGED
@@ -2388,12 +2388,16 @@ class ControlledExecutor {
2388
2388
  }
2389
2389
  async execute(param) {
2390
2390
  this.runningTask = this.task(param);
2391
- await this.runningTask;
2392
- this.runningTask = undefined;
2393
- if (this.pendingTaskParam) {
2394
- const pendingParam = this.pendingTaskParam;
2395
- this.pendingTaskParam = undefined;
2396
- this.execute(pendingParam);
2391
+ try {
2392
+ await this.runningTask;
2393
+ }
2394
+ finally {
2395
+ this.runningTask = undefined;
2396
+ if (this.pendingTaskParam) {
2397
+ const pendingParam = this.pendingTaskParam;
2398
+ this.pendingTaskParam = undefined;
2399
+ this.execute(pendingParam);
2400
+ }
2397
2401
  }
2398
2402
  }
2399
2403
  }
@@ -10973,7 +10977,7 @@ function requireDist () {
10973
10977
 
10974
10978
  var distExports = requireDist();
10975
10979
 
10976
- var version = "1.57.2";
10980
+ var version = "1.57.3";
10977
10981
  var PACKAGE = {
10978
10982
  version: version};
10979
10983
 
@@ -11846,6 +11850,7 @@ class AbstractStreamingSyncImplementation extends BaseObserver {
11846
11850
  async _uploadAllCrud(signal) {
11847
11851
  return this.obtainLock({
11848
11852
  type: LockType.CRUD,
11853
+ signal,
11849
11854
  callback: async () => {
11850
11855
  /**
11851
11856
  * Keep track of the first item in the CRUD queue for the last `uploadCrud` iteration.
@@ -13470,7 +13475,7 @@ SELECT * FROM crud_entries;
13470
13475
  }
13471
13476
  /**
13472
13477
  * Open a read-only transaction.
13473
- * Read transactions can run concurrently to a write transaction.
13478
+ * When multiple connections are available, read transactions can run concurrently to a write transaction.
13474
13479
  * Changes from any write transaction are not visible to read transactions started before it.
13475
13480
  *
13476
13481
  * @param callback - Function to execute within the transaction