From fec2c2ff999356a7a82ca9b49d8bd7193e513ab2 Mon Sep 17 00:00:00 2001 From: Ralf Kistner Date: Thu, 7 Nov 2024 16:21:50 +0200 Subject: [PATCH 1/3] Add broken test for remove operations. --- .../powersync/test/bucket_storage_test.dart | 28 +++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/packages/powersync/test/bucket_storage_test.dart b/packages/powersync/test/bucket_storage_test.dart index e6213513..8b3cac41 100644 --- a/packages/powersync/test/bucket_storage_test.dart +++ b/packages/powersync/test/bucket_storage_test.dart @@ -227,6 +227,34 @@ void main() { await expectNoAssets(); }); + test('put | put remove', () async { + await bucketStorage.saveSyncData(SyncDataBatch([ + SyncBucketData(bucket: 'bucket1', data: [putAsset1_1]), + ])); + + await syncLocalChecked(Checkpoint(lastOpId: '1', checksums: [ + BucketChecksum(bucket: 'bucket1', checksum: 1), + ])); + + expect( + await powersync.execute( + "SELECT id, description, make FROM assets WHERE id = 'O1'"), + equals([ + {'id': 'O1', 'description': 'bar', 'make': null} + ])); + + await bucketStorage.saveSyncData(SyncDataBatch([ + SyncBucketData(bucket: 'bucket1', data: [putAsset1_3]), + SyncBucketData(bucket: 'bucket1', data: [removeAsset1_5]) + ])); + + await syncLocalChecked(Checkpoint(lastOpId: '5', checksums: [ + BucketChecksum(bucket: 'bucket1', checksum: 9), + ])); + + await expectNoAssets(); + }); + test('should use subkeys', () async { // subkeys cause this to be treated as a separate entity in the oplog, // but same entity in the local db. From ab35c6278be98c865536b6b8855e4934a76ca714 Mon Sep 17 00:00:00 2001 From: Ralf Kistner Date: Mon, 11 Nov 2024 12:26:11 +0200 Subject: [PATCH 2/3] powersync-sqlite-core 0.3.6 --- packages/powersync_flutter_libs/android/build.gradle | 2 +- .../powersync_flutter_libs/ios/powersync_flutter_libs.podspec | 2 +- .../powersync_flutter_libs/macos/powersync_flutter_libs.podspec | 2 +- scripts/download_core_binary_demos.dart | 2 +- scripts/init_powersync_core_binary.dart | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/packages/powersync_flutter_libs/android/build.gradle b/packages/powersync_flutter_libs/android/build.gradle index e0b13d6f..fcbdb6f4 100644 --- a/packages/powersync_flutter_libs/android/build.gradle +++ b/packages/powersync_flutter_libs/android/build.gradle @@ -50,5 +50,5 @@ android { } dependencies { - implementation 'co.powersync:powersync-sqlite-core:0.3.4' + implementation 'co.powersync:powersync-sqlite-core:0.3.6' } diff --git a/packages/powersync_flutter_libs/ios/powersync_flutter_libs.podspec b/packages/powersync_flutter_libs/ios/powersync_flutter_libs.podspec index 08ba5f2d..405fd5ff 100644 --- a/packages/powersync_flutter_libs/ios/powersync_flutter_libs.podspec +++ b/packages/powersync_flutter_libs/ios/powersync_flutter_libs.podspec @@ -22,7 +22,7 @@ A new Flutter FFI plugin project. s.dependency 'Flutter' s.platform = :ios, '11.0' - s.dependency "powersync-sqlite-core", "~> 0.3.4" + s.dependency "powersync-sqlite-core", "~> 0.3.6" # Flutter.framework does not contain a i386 slice. s.pod_target_xcconfig = { 'DEFINES_MODULE' => 'YES', 'EXCLUDED_ARCHS[sdk=iphonesimulator*]' => 'i386' } diff --git a/packages/powersync_flutter_libs/macos/powersync_flutter_libs.podspec b/packages/powersync_flutter_libs/macos/powersync_flutter_libs.podspec index bdf50dde..5130bb3b 100644 --- a/packages/powersync_flutter_libs/macos/powersync_flutter_libs.podspec +++ b/packages/powersync_flutter_libs/macos/powersync_flutter_libs.podspec @@ -21,7 +21,7 @@ A new Flutter FFI plugin project. s.source_files = 'Classes/**/*' s.dependency 'FlutterMacOS' - s.dependency "powersync-sqlite-core", "~> 0.3.4" + s.dependency "powersync-sqlite-core", "~> 0.3.6" s.platform = :osx, '10.11' s.pod_target_xcconfig = { 'DEFINES_MODULE' => 'YES' } diff --git a/scripts/download_core_binary_demos.dart b/scripts/download_core_binary_demos.dart index 123ee1f1..96b15e37 100644 --- a/scripts/download_core_binary_demos.dart +++ b/scripts/download_core_binary_demos.dart @@ -3,7 +3,7 @@ import 'dart:io'; final coreUrl = - 'https://github.com/powersync-ja/powersync-sqlite-core/releases/download/v0.3.4'; + 'https://github.com/powersync-ja/powersync-sqlite-core/releases/download/v0.3.6'; void main() async { final powersyncLibsLinuxPath = "packages/powersync_flutter_libs/linux"; diff --git a/scripts/init_powersync_core_binary.dart b/scripts/init_powersync_core_binary.dart index a8a57384..05b06380 100644 --- a/scripts/init_powersync_core_binary.dart +++ b/scripts/init_powersync_core_binary.dart @@ -6,7 +6,7 @@ import 'dart:io'; import 'package:melos/melos.dart'; final sqliteUrl = - 'https://github.com/powersync-ja/powersync-sqlite-core/releases/download/v0.3.4'; + 'https://github.com/powersync-ja/powersync-sqlite-core/releases/download/v0.3.6'; void main() async { final sqliteCoreFilename = getLibraryForPlatform(); From d3c93c1426e2855c9e2f5bc929e92f7d3337d7fa Mon Sep 17 00:00:00 2001 From: Ralf Kistner Date: Mon, 11 Nov 2024 12:39:03 +0200 Subject: [PATCH 3/3] chore(release): publish packages - powersync_flutter_libs@0.4.3 - powersync@1.9.3 - powersync_attachments_helper@0.6.15+2 --- CHANGELOG.md | 30 +++++++++++++++++++ demos/benchmarks/pubspec.yaml | 2 +- demos/django-todolist/pubspec.yaml | 2 +- demos/supabase-anonymous-auth/pubspec.yaml | 2 +- .../supabase-edge-function-auth/pubspec.yaml | 2 +- demos/supabase-simple-chat/pubspec.yaml | 2 +- demos/supabase-todolist-drift/pubspec.yaml | 4 +-- .../pubspec.yaml | 2 +- demos/supabase-todolist/pubspec.yaml | 4 +-- packages/powersync/CHANGELOG.md | 4 +++ packages/powersync/lib/src/version.dart | 2 +- packages/powersync/pubspec.yaml | 4 +-- .../powersync_attachments_helper/CHANGELOG.md | 4 +++ .../powersync_attachments_helper/pubspec.yaml | 4 +-- packages/powersync_flutter_libs/CHANGELOG.md | 4 +++ packages/powersync_flutter_libs/pubspec.yaml | 2 +- 16 files changed, 58 insertions(+), 16 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f005e678..c49add44 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,36 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## 2024-11-11 + +### Changes + +--- + +Packages with breaking changes: + + - There are no breaking changes in this release. + +Packages with other changes: + + - [`powersync_flutter_libs` - `v0.4.3`](#powersync_flutter_libs---v043) + - [`powersync` - `v1.9.3`](#powersync---v193) + - [`powersync_attachments_helper` - `v0.6.15+2`](#powersync_attachments_helper---v06152) + +Packages with dependency updates only: + +> Packages listed below depend on other packages in this workspace that have had changes. Their versions have been incremented to bump the minimum dependency versions of the packages they depend upon in this project. + + - `powersync` - `v1.9.3` + - `powersync_attachments_helper` - `v0.6.15+2` + +--- + +#### `powersync_flutter_libs` - `v0.4.3` + + - powersync-sqlite-core 0.3.6 - fixes dangling rows issue + + ## 2024-11-06 ### Changes diff --git a/demos/benchmarks/pubspec.yaml b/demos/benchmarks/pubspec.yaml index d8127db7..8e360c04 100644 --- a/demos/benchmarks/pubspec.yaml +++ b/demos/benchmarks/pubspec.yaml @@ -10,7 +10,7 @@ environment: dependencies: flutter: sdk: flutter - powersync: ^1.8.6 + powersync: ^1.9.3 path_provider: ^2.1.1 path: ^1.8.3 logging: ^1.2.0 diff --git a/demos/django-todolist/pubspec.yaml b/demos/django-todolist/pubspec.yaml index ed4705c4..096120d1 100644 --- a/demos/django-todolist/pubspec.yaml +++ b/demos/django-todolist/pubspec.yaml @@ -10,7 +10,7 @@ environment: dependencies: flutter: sdk: flutter - powersync: ^1.9.2 + powersync: ^1.9.3 path_provider: ^2.1.1 path: ^1.8.3 logging: ^1.2.0 diff --git a/demos/supabase-anonymous-auth/pubspec.yaml b/demos/supabase-anonymous-auth/pubspec.yaml index 347b187d..2e7b1a14 100644 --- a/demos/supabase-anonymous-auth/pubspec.yaml +++ b/demos/supabase-anonymous-auth/pubspec.yaml @@ -11,7 +11,7 @@ dependencies: flutter: sdk: flutter - powersync: ^1.9.2 + powersync: ^1.9.3 path_provider: ^2.1.1 supabase_flutter: ^2.0.2 path: ^1.8.3 diff --git a/demos/supabase-edge-function-auth/pubspec.yaml b/demos/supabase-edge-function-auth/pubspec.yaml index 16b84696..9a576368 100644 --- a/demos/supabase-edge-function-auth/pubspec.yaml +++ b/demos/supabase-edge-function-auth/pubspec.yaml @@ -11,7 +11,7 @@ dependencies: flutter: sdk: flutter - powersync: ^1.9.2 + powersync: ^1.9.3 path_provider: ^2.1.1 supabase_flutter: ^2.0.2 path: ^1.8.3 diff --git a/demos/supabase-simple-chat/pubspec.yaml b/demos/supabase-simple-chat/pubspec.yaml index a67fc121..3e563cf8 100644 --- a/demos/supabase-simple-chat/pubspec.yaml +++ b/demos/supabase-simple-chat/pubspec.yaml @@ -37,7 +37,7 @@ dependencies: supabase_flutter: ^2.0.2 timeago: ^3.6.0 - powersync: ^1.9.2 + powersync: ^1.9.3 path_provider: ^2.1.1 path: ^1.8.3 logging: ^1.2.0 diff --git a/demos/supabase-todolist-drift/pubspec.yaml b/demos/supabase-todolist-drift/pubspec.yaml index a75c0958..22418c30 100644 --- a/demos/supabase-todolist-drift/pubspec.yaml +++ b/demos/supabase-todolist-drift/pubspec.yaml @@ -9,8 +9,8 @@ environment: dependencies: flutter: sdk: flutter - powersync_attachments_helper: ^0.6.15+1 - powersync: ^1.9.2 + powersync_attachments_helper: ^0.6.15+2 + powersync: ^1.9.3 path_provider: ^2.1.1 supabase_flutter: ^2.0.1 path: ^1.8.3 diff --git a/demos/supabase-todolist-optional-sync/pubspec.yaml b/demos/supabase-todolist-optional-sync/pubspec.yaml index 2b92d08c..27c10b42 100644 --- a/demos/supabase-todolist-optional-sync/pubspec.yaml +++ b/demos/supabase-todolist-optional-sync/pubspec.yaml @@ -10,7 +10,7 @@ environment: dependencies: flutter: sdk: flutter - powersync: ^1.9.2 + powersync: ^1.9.3 path_provider: ^2.1.1 supabase_flutter: ^2.0.1 path: ^1.8.3 diff --git a/demos/supabase-todolist/pubspec.yaml b/demos/supabase-todolist/pubspec.yaml index d421c2b7..c13903d8 100644 --- a/demos/supabase-todolist/pubspec.yaml +++ b/demos/supabase-todolist/pubspec.yaml @@ -10,8 +10,8 @@ environment: dependencies: flutter: sdk: flutter - powersync_attachments_helper: ^0.6.15+1 - powersync: ^1.9.2 + powersync_attachments_helper: ^0.6.15+2 + powersync: ^1.9.3 path_provider: ^2.1.1 supabase_flutter: ^2.0.1 path: ^1.8.3 diff --git a/packages/powersync/CHANGELOG.md b/packages/powersync/CHANGELOG.md index 991d86de..43b2adf0 100644 --- a/packages/powersync/CHANGELOG.md +++ b/packages/powersync/CHANGELOG.md @@ -1,3 +1,7 @@ +## 1.9.3 + + - Update a dependency to the latest release. + ## 1.9.2 - [Web] Automatically flush IndexedDB storage to fix durability issues diff --git a/packages/powersync/lib/src/version.dart b/packages/powersync/lib/src/version.dart index 30da80f3..f3ee1336 100644 --- a/packages/powersync/lib/src/version.dart +++ b/packages/powersync/lib/src/version.dart @@ -1 +1 @@ -const String libraryVersion = '1.9.2'; +const String libraryVersion = '1.9.3'; diff --git a/packages/powersync/pubspec.yaml b/packages/powersync/pubspec.yaml index 1d736c54..e7d7b91a 100644 --- a/packages/powersync/pubspec.yaml +++ b/packages/powersync/pubspec.yaml @@ -1,5 +1,5 @@ name: powersync -version: 1.9.2 +version: 1.9.3 homepage: https://powersync.com repository: https://github.com/powersync-ja/powersync.dart description: PowerSync Flutter SDK - sync engine for building local-first apps. @@ -16,7 +16,7 @@ dependencies: sqlite3: ^2.4.6 universal_io: ^2.0.0 sqlite3_flutter_libs: ^0.5.23 - powersync_flutter_libs: ^0.4.2 + powersync_flutter_libs: ^0.4.3 meta: ^1.0.0 http: ^1.1.0 uuid: ^4.2.0 diff --git a/packages/powersync_attachments_helper/CHANGELOG.md b/packages/powersync_attachments_helper/CHANGELOG.md index a1c57c77..74acae9b 100644 --- a/packages/powersync_attachments_helper/CHANGELOG.md +++ b/packages/powersync_attachments_helper/CHANGELOG.md @@ -1,3 +1,7 @@ +## 0.6.15+2 + + - Update a dependency to the latest release. + ## 0.6.15+1 - Update a dependency to the latest release. diff --git a/packages/powersync_attachments_helper/pubspec.yaml b/packages/powersync_attachments_helper/pubspec.yaml index 54bf1eb7..53779451 100644 --- a/packages/powersync_attachments_helper/pubspec.yaml +++ b/packages/powersync_attachments_helper/pubspec.yaml @@ -1,6 +1,6 @@ name: powersync_attachments_helper description: A helper library for handling attachments when using PowerSync. -version: 0.6.15+1 +version: 0.6.15+2 repository: https://github.com/powersync-ja/powersync.dart homepage: https://www.powersync.com/ environment: @@ -10,7 +10,7 @@ dependencies: flutter: sdk: flutter - powersync: ^1.9.2 + powersync: ^1.9.3 logging: ^1.2.0 sqlite_async: ^0.11.0 path_provider: ^2.0.13 diff --git a/packages/powersync_flutter_libs/CHANGELOG.md b/packages/powersync_flutter_libs/CHANGELOG.md index d14eb195..ac0e0449 100644 --- a/packages/powersync_flutter_libs/CHANGELOG.md +++ b/packages/powersync_flutter_libs/CHANGELOG.md @@ -1,3 +1,7 @@ +## 0.4.3 + + - powersync-sqlite-core 0.3.6 - fixes dangling rows issue + ## 0.4.2 - Update a dependency to the latest release. diff --git a/packages/powersync_flutter_libs/pubspec.yaml b/packages/powersync_flutter_libs/pubspec.yaml index cb50688b..125e54dc 100644 --- a/packages/powersync_flutter_libs/pubspec.yaml +++ b/packages/powersync_flutter_libs/pubspec.yaml @@ -1,6 +1,6 @@ name: powersync_flutter_libs description: PowerSync core binaries for the PowerSync Flutter SDK. Needs to be included for Flutter apps. -version: 0.4.2 +version: 0.4.3 repository: https://github.com/powersync-ja/powersync.dart homepage: https://www.powersync.com/