@powersync/react-native 1.32.0 → 1.33.0
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/index.js +3 -7
- package/dist/index.js.map +1 -1
- package/lib/sync/stream/ReactNativeStreamingSyncImplementation.d.ts +1 -2
- package/lib/sync/stream/ReactNativeStreamingSyncImplementation.js +2 -6
- package/lib/sync/stream/ReactNativeStreamingSyncImplementation.js.map +1 -1
- package/package.json +4 -5
- package/src/sync/stream/ReactNativeStreamingSyncImplementation.ts +3 -7
package/dist/index.js
CHANGED
|
@@ -3,7 +3,6 @@
|
|
|
3
3
|
var common = require('@powersync/common');
|
|
4
4
|
var react = require('@powersync/react');
|
|
5
5
|
var reactNative = require('react-native');
|
|
6
|
-
var asyncMutex = require('async-mutex');
|
|
7
6
|
|
|
8
7
|
function getDefaultExportFromCjs (x) {
|
|
9
8
|
return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
|
|
@@ -19258,8 +19257,8 @@ class ReactNativeStreamingSyncImplementation extends common.AbstractStreamingSyn
|
|
|
19258
19257
|
return;
|
|
19259
19258
|
}
|
|
19260
19259
|
this.locks = new Map();
|
|
19261
|
-
this.locks.set(common.LockType.CRUD, new
|
|
19262
|
-
this.locks.set(common.LockType.SYNC, new
|
|
19260
|
+
this.locks.set(common.LockType.CRUD, new common.Mutex());
|
|
19261
|
+
this.locks.set(common.LockType.SYNC, new common.Mutex());
|
|
19263
19262
|
if (identifier) {
|
|
19264
19263
|
LOCKS.set(identifier, this.locks);
|
|
19265
19264
|
}
|
|
@@ -19270,11 +19269,8 @@ class ReactNativeStreamingSyncImplementation extends common.AbstractStreamingSyn
|
|
|
19270
19269
|
throw new Error(`Lock type ${lockOptions.type} not found`);
|
|
19271
19270
|
}
|
|
19272
19271
|
return lock.runExclusive(async () => {
|
|
19273
|
-
if (lockOptions.signal?.aborted) {
|
|
19274
|
-
throw new Error('Aborted');
|
|
19275
|
-
}
|
|
19276
19272
|
return lockOptions.callback();
|
|
19277
|
-
});
|
|
19273
|
+
}, lockOptions.signal);
|
|
19278
19274
|
}
|
|
19279
19275
|
}
|
|
19280
19276
|
|