From ce0bcd75bed37a6d90732e949e82078013f0463d Mon Sep 17 00:00:00 2001 From: Steven Ontong Date: Thu, 19 Oct 2023 15:03:51 +0200 Subject: [PATCH] update async apis --- apps/supabase-todolist | 2 +- .../src/client/AbstractPowerSyncDatabase.ts | 4 +-- yarn.lock | 26 +------------------ 3 files changed, 4 insertions(+), 28 deletions(-) diff --git a/apps/supabase-todolist b/apps/supabase-todolist index 3e6c35e4..4892b88c 160000 --- a/apps/supabase-todolist +++ b/apps/supabase-todolist @@ -1 +1 @@ -Subproject commit 3e6c35e46e77f4ac7e5173db8dc52b227c1af769 +Subproject commit 4892b88c6a9773cc00630113f27635926fbcc968 diff --git a/packages/powersync-sdk-common/src/client/AbstractPowerSyncDatabase.ts b/packages/powersync-sdk-common/src/client/AbstractPowerSyncDatabase.ts index 70e6f70b..c9af43a7 100644 --- a/packages/powersync-sdk-common/src/client/AbstractPowerSyncDatabase.ts +++ b/packages/powersync-sdk-common/src/client/AbstractPowerSyncDatabase.ts @@ -358,7 +358,7 @@ export abstract class AbstractPowerSyncDatabase extends BaseObserver { const res = await callback({ ...tx }); - await tx.rollback(); + await tx.rollbackAsync(); return res; }, { timeoutMs: lockTimeout } @@ -370,7 +370,7 @@ export abstract class AbstractPowerSyncDatabase extends BaseObserver { const res = await callback(tx); - await tx.commit(); + await tx.commitAsync(); _.defer(() => this.syncStreamImplementation?.triggerCrudUpload()); return res; }, diff --git a/yarn.lock b/yarn.lock index 03203141..d552a964 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2134,15 +2134,6 @@ "@types/yargs" "^17.0.8" chalk "^4.0.0" -"@journeyapps/powersync-sdk-react-native@0.0.1-alpha.0": - version "0.0.1-alpha.0" - resolved "https://registry.npmjs.org/@journeyapps/powersync-sdk-react-native/-/powersync-sdk-react-native-0.0.1-alpha.0.tgz#f5cef94d61c9e910f1a197f8da147f996acdd78f" - integrity sha512-FcQW+ei899RO2vFXV4qF+tHCxAEdYmGFZCQEePtzXQ66KrMhpH5Pz31+97JAkFCw0TDsrq0l++4SDwvYV7JrQg== - dependencies: - "@journeyapps/powersync-react" "^0.0.1-alpha.0" - "@journeyapps/powersync-sdk-common" "^0.0.1-alpha.0" - async-lock "^1.4.0" - "@journeyapps/react-native-quick-sqlite@0.0.1", "@journeyapps/react-native-quick-sqlite@^0.0.1": version "0.0.1" resolved "https://registry.npmjs.org/@journeyapps/react-native-quick-sqlite/-/react-native-quick-sqlite-0.0.1.tgz#a5b731bfc658d6c8257ef3edebf243941a69a764" @@ -3191,13 +3182,6 @@ resolved "https://registry.npmjs.org/@types/stack-utils/-/stack-utils-2.0.1.tgz#20f18294f797f2209b5f65c8e3b5c8e8261d127c" integrity sha512-Hl219/BT5fLAaz6NDkSuhzasy49dwQS/DSdu4MdggFB8zcXv7vflBI3xp7FEmkmdDkBUI2bPUNeMttp2knYdxw== -"@types/uuid@3.4.0": - version "3.4.0" - resolved "https://registry.npmjs.org/@types/uuid/-/uuid-3.4.0.tgz#91639516fbb892ed3737a2bdc1b030d02b4a09c1" - integrity sha512-Vd+WmnrQKrrfVJ+9LWyOWqlBQJFsfi8rhKRm3ag3ZrOjY5SmzZkGmxbkgRIk9jpZt4dpvE21cmbBSp1dCV7/fw== - dependencies: - "@types/node" "*" - "@types/uuid@^3.0.0": version "3.4.11" resolved "https://registry.npmjs.org/@types/uuid/-/uuid-3.4.11.tgz#201bf1ca5756537886931aac6672c21c1a06f98a" @@ -3364,7 +3348,7 @@ ajv-keywords@^5.1.0: dependencies: fast-deep-equal "^3.1.3" -ajv@^8.0.0, ajv@^8.11.0, ajv@^8.9.0: +ajv@^8.0.0, ajv@^8.9.0: version "8.12.0" resolved "https://registry.npmjs.org/ajv/-/ajv-8.12.0.tgz#d1a0527323e22f53562c567c00991577dfbe19d1" integrity sha512-sRu1kpcO9yLtYxBKvqfTeh9KzZEwO3STyX1HT+4CaDzC6HpTGYhIhPIzj9XuKU7KYDwnaeh5hcOwjy1QuJzBPA== @@ -5107,14 +5091,6 @@ expo-asset@~8.10.1: path-browserify "^1.0.0" url-parse "^1.5.9" -expo-build-properties@~0.8.3: - version "0.8.3" - resolved "https://registry.npmjs.org/expo-build-properties/-/expo-build-properties-0.8.3.tgz#fbfa156e9619bebda71c66af9a26ebc3490b2365" - integrity sha512-kEDDuAadHqJTkvCGK4fXYHVrePiJO1DjyW95AicmwuGwQvGJydYFbuoauf9ybAU+4UH4arhbce8gHI3ZpIj3Jw== - dependencies: - ajv "^8.11.0" - semver "^7.5.3" - expo-constants@~14.4.2: version "14.4.2" resolved "https://registry.npmjs.org/expo-constants/-/expo-constants-14.4.2.tgz#cac5e8b524069545739b8d8595ce96cc5be6578c"