From c4d28dc8eb64dd94f35f6aba2a62f421ae1141a9 Mon Sep 17 00:00:00 2001 From: Simon Binder Date: Thu, 2 Oct 2025 15:39:48 +0200 Subject: [PATCH 1/7] Warning on old attachments package --- packages/powersync_attachments_helper/README.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/packages/powersync_attachments_helper/README.md b/packages/powersync_attachments_helper/README.md index dbd65bef..9ae81747 100644 --- a/packages/powersync_attachments_helper/README.md +++ b/packages/powersync_attachments_helper/README.md @@ -2,6 +2,12 @@ [PowerSync Attachments Helper](https://pub.dev/packages/powersync_attachments_helper) is a package that assist in keeping files in sync with local and remote storage. +> [!WARNING] +> There is a new attachments helper library in the core PowerSync package, available under +> `package:powersync_core/attachments/attachments.dart`. While this package will continue to receive +> bugfixes, new feature development will only happen in the other package. + + ## Features - Handles syncing uploads, downloads and deletes between local and remote storage. From c0423b1962d1415d41fc9e9bc37e50ce8c56604a Mon Sep 17 00:00:00 2001 From: Simon Binder Date: Thu, 2 Oct 2025 15:42:01 +0200 Subject: [PATCH 2/7] chore(release): publish packages - powersync_attachments_helper@0.6.20 - powersync@1.16.0 - powersync_core@1.6.0 - powersync_flutter_libs@0.4.12 - powersync_sqlcipher@0.1.12 --- CHANGELOG.md | 39 +++++++++++++++++++ demos/benchmarks/pubspec.yaml | 2 +- demos/django-todolist/pubspec.yaml | 2 +- demos/firebase-nodejs-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 +- demos/supabase-trello/pubspec.yaml | 2 +- packages/powersync/CHANGELOG.md | 7 ++++ packages/powersync/pubspec.yaml | 6 +-- .../powersync_attachments_helper/CHANGELOG.md | 4 ++ .../powersync_attachments_helper/pubspec.yaml | 4 +- packages/powersync_core/CHANGELOG.md | 8 ++++ packages/powersync_core/lib/src/version.dart | 2 +- packages/powersync_core/pubspec.yaml | 2 +- packages/powersync_flutter_libs/CHANGELOG.md | 4 ++ packages/powersync_flutter_libs/pubspec.yaml | 2 +- packages/powersync_sqlcipher/CHANGELOG.md | 7 ++++ .../powersync_sqlcipher/example/pubspec.yaml | 2 +- packages/powersync_sqlcipher/pubspec.yaml | 6 +-- 23 files changed, 93 insertions(+), 24 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9937c109..a9d0ccfc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,45 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## 2025-10-02 + +### Changes + +--- + +Packages with breaking changes: + + - There are no breaking changes in this release. + +Packages with other changes: + + - [`powersync_attachments_helper` - `v0.6.20`](#powersync_attachments_helper---v0620) + - [`powersync` - `v1.16.0`](#powersync---v1160) + - [`powersync_core` - `v1.6.0`](#powersync_core---v160) + - [`powersync_flutter_libs` - `v0.4.12`](#powersync_flutter_libs---v0412) + - [`powersync_sqlcipher` - `v0.1.12`](#powersync_sqlcipher---v0112) + +--- + +#### `powersync_attachments_helper` - `v0.6.20` + + - Add note about new attachment queue system in core package. + +#### `powersync` - `v1.16.0` +#### `powersync_core` - `v1.6.0` +#### `powersync_sqlcipher` - `v0.1.12` + +- Add `getCrudTransactions()` returning a stream of completed transactions for uploads. +- Add experimental support for [sync streams](https://docs.powersync.com/usage/sync-streams). +- Add new attachments helper implementation in `package:powersync_core/attachments/attachments.dart`. +- Add SwiftPM support. +- Add support for compiling `powersync_core` with `build_web_compilers`. + +#### `powersync_flutter_libs` - `v0.4.12` + + - Update core extension. + - Add support for SwiftPM. + ## 2025-08-18 ### Changes diff --git a/demos/benchmarks/pubspec.yaml b/demos/benchmarks/pubspec.yaml index b2e1f55a..104a1c23 100644 --- a/demos/benchmarks/pubspec.yaml +++ b/demos/benchmarks/pubspec.yaml @@ -10,7 +10,7 @@ environment: dependencies: flutter: sdk: flutter - powersync: ^1.15.2 + powersync: ^1.16.0 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 9b187637..e5fa09ca 100644 --- a/demos/django-todolist/pubspec.yaml +++ b/demos/django-todolist/pubspec.yaml @@ -10,7 +10,7 @@ environment: dependencies: flutter: sdk: flutter - powersync: ^1.15.2 + powersync: ^1.16.0 path_provider: ^2.1.1 path: ^1.8.3 logging: ^1.2.0 diff --git a/demos/firebase-nodejs-todolist/pubspec.yaml b/demos/firebase-nodejs-todolist/pubspec.yaml index 46436e8f..43537393 100644 --- a/demos/firebase-nodejs-todolist/pubspec.yaml +++ b/demos/firebase-nodejs-todolist/pubspec.yaml @@ -11,7 +11,7 @@ dependencies: flutter: sdk: flutter - powersync: ^1.15.2 + powersync: ^1.16.0 path_provider: ^2.1.1 supabase_flutter: ^2.0.1 path: ^1.8.3 diff --git a/demos/supabase-anonymous-auth/pubspec.yaml b/demos/supabase-anonymous-auth/pubspec.yaml index db67696d..7eaae283 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.15.2 + powersync: ^1.16.0 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 2dd12558..5dfb7fd2 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.15.2 + powersync: ^1.16.0 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 a65519af..3d3626f2 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.15.2 + powersync: ^1.16.0 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 cf0c3f4f..8ccc7e7e 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.19 - powersync: ^1.15.2 + powersync_attachments_helper: ^0.6.20 + powersync: ^1.16.0 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 a914651c..76b69edf 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.15.2 + powersync: ^1.16.0 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 53d61b7a..4d5c201a 100644 --- a/demos/supabase-todolist/pubspec.yaml +++ b/demos/supabase-todolist/pubspec.yaml @@ -10,8 +10,8 @@ environment: dependencies: flutter: sdk: flutter - powersync: ^1.15.2 - powersync_core: ^1.5.2 + powersync: ^1.16.0 + powersync_core: ^1.6.0 path_provider: ^2.1.1 supabase_flutter: ^2.0.1 path: ^1.8.3 diff --git a/demos/supabase-trello/pubspec.yaml b/demos/supabase-trello/pubspec.yaml index 15a7dccf..3a1327e0 100644 --- a/demos/supabase-trello/pubspec.yaml +++ b/demos/supabase-trello/pubspec.yaml @@ -36,7 +36,7 @@ dependencies: random_name_generator: ^1.5.0 flutter_dotenv: ^5.2.1 logging: ^1.3.0 - powersync: ^1.15.2 + powersync: ^1.16.0 sqlite_async: ^0.12.0 path_provider: ^2.1.5 supabase_flutter: ^2.8.3 diff --git a/packages/powersync/CHANGELOG.md b/packages/powersync/CHANGELOG.md index 9cd53047..43179ad3 100644 --- a/packages/powersync/CHANGELOG.md +++ b/packages/powersync/CHANGELOG.md @@ -1,3 +1,10 @@ +## 1.16.0 + +- Add `getCrudTransactions()` returning a stream of completed transactions for uploads. +- Add experimental support for [sync streams](https://docs.powersync.com/usage/sync-streams). +- Add new attachments helper implementation in `package:powersync_core/attachments/attachments.dart`. +- Add SwiftPM support. + ## 1.15.2 - Fix excessive memory consumption during large sync. diff --git a/packages/powersync/pubspec.yaml b/packages/powersync/pubspec.yaml index ad31d0d3..bd39106e 100644 --- a/packages/powersync/pubspec.yaml +++ b/packages/powersync/pubspec.yaml @@ -1,5 +1,5 @@ name: powersync -version: 1.15.2 +version: 1.16.0 homepage: https://powersync.com repository: https://github.com/powersync-ja/powersync.dart description: PowerSync Flutter SDK. Sync Postgres, MongoDB or MySQL with SQLite in your Flutter app @@ -12,8 +12,8 @@ dependencies: sdk: flutter sqlite3_flutter_libs: ^0.5.39 - powersync_core: ^1.5.2 - powersync_flutter_libs: ^0.4.11 + powersync_core: ^1.6.0 + powersync_flutter_libs: ^0.4.12 collection: ^1.17.0 dev_dependencies: diff --git a/packages/powersync_attachments_helper/CHANGELOG.md b/packages/powersync_attachments_helper/CHANGELOG.md index 0aa268e3..f80b8798 100644 --- a/packages/powersync_attachments_helper/CHANGELOG.md +++ b/packages/powersync_attachments_helper/CHANGELOG.md @@ -1,3 +1,7 @@ +## 0.6.20 + + - Add note about new attachment queue system in core package. + ## 0.6.19 - Remove direct dependency on `sqlite_async`. diff --git a/packages/powersync_attachments_helper/pubspec.yaml b/packages/powersync_attachments_helper/pubspec.yaml index b705cf09..63854d43 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.19 +version: 0.6.20 repository: https://github.com/powersync-ja/powersync.dart homepage: https://www.powersync.com/ environment: @@ -10,7 +10,7 @@ dependencies: flutter: sdk: flutter - powersync_core: ^1.5.2 + powersync_core: ^1.6.0 logging: ^1.2.0 path_provider: ^2.0.13 diff --git a/packages/powersync_core/CHANGELOG.md b/packages/powersync_core/CHANGELOG.md index ddd78a42..1aabefb6 100644 --- a/packages/powersync_core/CHANGELOG.md +++ b/packages/powersync_core/CHANGELOG.md @@ -1,3 +1,11 @@ +## 1.6.0 + +- Add `getCrudTransactions()` returning a stream of completed transactions for uploads. +- Add experimental support for [sync streams](https://docs.powersync.com/usage/sync-streams). +- Add new attachments helper implementation in `package:powersync_core/attachments/attachments.dart`. +- Add SwiftPM support. +- Add support for compiling `powersync_core` with `build_web_compilers`. + ## 1.5.2 - Fix excessive memory consumption during large sync. diff --git a/packages/powersync_core/lib/src/version.dart b/packages/powersync_core/lib/src/version.dart index 26361d4c..05cb9eb9 100644 --- a/packages/powersync_core/lib/src/version.dart +++ b/packages/powersync_core/lib/src/version.dart @@ -1 +1 @@ -const String libraryVersion = '1.5.2'; +const String libraryVersion = '1.6.0'; diff --git a/packages/powersync_core/pubspec.yaml b/packages/powersync_core/pubspec.yaml index 929b2d5e..f85058c3 100644 --- a/packages/powersync_core/pubspec.yaml +++ b/packages/powersync_core/pubspec.yaml @@ -1,5 +1,5 @@ name: powersync_core -version: 1.5.2 +version: 1.6.0 homepage: https://powersync.com repository: https://github.com/powersync-ja/powersync.dart description: PowerSync Dart SDK - sync engine for building local-first apps. diff --git a/packages/powersync_flutter_libs/CHANGELOG.md b/packages/powersync_flutter_libs/CHANGELOG.md index e344e77b..79e23a87 100644 --- a/packages/powersync_flutter_libs/CHANGELOG.md +++ b/packages/powersync_flutter_libs/CHANGELOG.md @@ -1,3 +1,7 @@ +## 0.4.12 + + - Update core extension, add support for SwiftPM. + ## 0.4.11 - Update PowerSync core extension to version 0.4.4. diff --git a/packages/powersync_flutter_libs/pubspec.yaml b/packages/powersync_flutter_libs/pubspec.yaml index 2515531c..a6afea23 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.11 +version: 0.4.12 repository: https://github.com/powersync-ja/powersync.dart homepage: https://www.powersync.com/ diff --git a/packages/powersync_sqlcipher/CHANGELOG.md b/packages/powersync_sqlcipher/CHANGELOG.md index b037c1eb..c0bcd85f 100644 --- a/packages/powersync_sqlcipher/CHANGELOG.md +++ b/packages/powersync_sqlcipher/CHANGELOG.md @@ -1,3 +1,10 @@ +## 0.1.12 + +- Add `getCrudTransactions()` returning a stream of completed transactions for uploads. +- Add experimental support for [sync streams](https://docs.powersync.com/usage/sync-streams). +- Add new attachments helper implementation in `package:powersync_core/attachments/attachments.dart`. +- Add SwiftPM support. + ## 0.1.11+1 - Fix excessive memory consumption during large sync. diff --git a/packages/powersync_sqlcipher/example/pubspec.yaml b/packages/powersync_sqlcipher/example/pubspec.yaml index d7746f71..7dc9c0c9 100644 --- a/packages/powersync_sqlcipher/example/pubspec.yaml +++ b/packages/powersync_sqlcipher/example/pubspec.yaml @@ -13,7 +13,7 @@ dependencies: path: ^1.9.1 path_provider: ^2.1.5 - powersync_sqlcipher: ^0.1.11+1 + powersync_sqlcipher: ^0.1.12 dev_dependencies: flutter_test: diff --git a/packages/powersync_sqlcipher/pubspec.yaml b/packages/powersync_sqlcipher/pubspec.yaml index 6aa109dc..f2bc78eb 100644 --- a/packages/powersync_sqlcipher/pubspec.yaml +++ b/packages/powersync_sqlcipher/pubspec.yaml @@ -1,5 +1,5 @@ name: powersync_sqlcipher -version: 0.1.11+1 +version: 0.1.12 homepage: https://powersync.com repository: https://github.com/powersync-ja/powersync.dart description: PowerSync Flutter SDK - sync engine for building local-first apps. @@ -12,8 +12,8 @@ dependencies: flutter: sdk: flutter - powersync_core: ^1.5.2 - powersync_flutter_libs: ^0.4.11 + powersync_core: ^1.6.0 + powersync_flutter_libs: ^0.4.12 sqlcipher_flutter_libs: ^0.6.4 sqlite3_web: ^0.3.0 From a355528fa9430196aea815ddbbaa2b91580560fd Mon Sep 17 00:00:00 2001 From: benitav Date: Fri, 3 Oct 2025 15:20:26 +0200 Subject: [PATCH 3/7] Improve discoverability, wording polish and fix inaccuracies --- .../powersync_attachments_helper/README.md | 18 ++++++++++++------ packages/powersync_core/doc/attachments.md | 6 ++---- 2 files changed, 14 insertions(+), 10 deletions(-) diff --git a/packages/powersync_attachments_helper/README.md b/packages/powersync_attachments_helper/README.md index 9ae81747..fdd46803 100644 --- a/packages/powersync_attachments_helper/README.md +++ b/packages/powersync_attachments_helper/README.md @@ -1,11 +1,19 @@ # PowerSync Attachments Helper for Dart/Flutter -[PowerSync Attachments Helper](https://pub.dev/packages/powersync_attachments_helper) is a package that assist in keeping files in sync with local and remote storage. +[PowerSync Attachments Helper](https://pub.dev/packages/powersync_attachments_helper) is a package that assists in keeping files in sync between local and remote storage. > [!WARNING] -> There is a new attachments helper library in the core PowerSync package, available under -> `package:powersync_core/attachments/attachments.dart`. While this package will continue to receive -> bugfixes, new feature development will only happen in the other package. +> This package will eventually be replaced by a new attachments helper library in the core PowerSync package, available through: +> ```dart +> package:powersync_core/attachments/attachments.dart +> ``` +> +> The `powersync_core/attachments` library is in alpha and brings improved APIs and functionality that is more in line with our other SDKs, such as the ability to write your own local storage implementation. +> +> Check out the [docs here](/packages/powersync_core/doc/attachments.md) to get started. +> +> While the `powersync_attachments_helper` package will still get bug fixes if you need them, +> new features will only be developed on `powersync_core/attachments`. ## Features @@ -89,5 +97,3 @@ initializeAttachmentQueue(PowerSyncDatabase db) async { await attachmentQueue.init(); } ``` - -See our [Supabase Flutter To-Do List example app](../../demos/supabase-todolist/README.md) for a concrete implementation of the above. diff --git a/packages/powersync_core/doc/attachments.md b/packages/powersync_core/doc/attachments.md index aad9b5cb..67383942 100644 --- a/packages/powersync_core/doc/attachments.md +++ b/packages/powersync_core/doc/attachments.md @@ -5,7 +5,7 @@ PowerSync. Embedding this data directly in your source databases is [inefficient and not recommended](https://docs.powersync.com/usage/use-case-examples/attachments). Instead, the PowerSync SDK for Dart and Flutter provides utilities you can use to _reference_ this binary data -in your primary data model, and then download it from a secondary data store such as S3. +in your local database, and then download it from a secondary data store such as Supabase Storage or S3. Because binary data is not directly stored in the source database in this model, we call these files _attachments_. ## Alpha release @@ -31,8 +31,7 @@ The attachments' state is stored in a local-only attachments table. ### Example implementation -See the [supabase todolist](https://github.com/powersync-ja/powersync.dart/tree/main/demos/supabase-todolist) demo for -a basic example of attachment syncing. +See the [supabase-todolist](https://github.com/powersync-ja/powersync.dart/tree/main/demos/supabase-todolist) demo for a basic example of attachment syncing. ### Setup @@ -77,7 +76,6 @@ final attachmentQueue = AttachmentQueue( ``` Here, - - An instance of `LocalStorageAdapter`, such as the `IOLocalStorage` provided by the SDK, is responsible for storing attachment contents locally. - An instance of `RemoteStorageAdapter` is responsible for downloading and uploading attachment contents to the secondary From ae910b0d58f7bb6c366e652cceb1d9dee8e5c4cc Mon Sep 17 00:00:00 2001 From: benitav Date: Mon, 6 Oct 2025 10:56:45 +0200 Subject: [PATCH 4/7] Add benefits and better link --- packages/powersync_attachments_helper/README.md | 2 +- packages/powersync_core/doc/attachments.md | 16 +++++++++++++--- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/packages/powersync_attachments_helper/README.md b/packages/powersync_attachments_helper/README.md index fdd46803..c9b5f532 100644 --- a/packages/powersync_attachments_helper/README.md +++ b/packages/powersync_attachments_helper/README.md @@ -10,7 +10,7 @@ > > The `powersync_core/attachments` library is in alpha and brings improved APIs and functionality that is more in line with our other SDKs, such as the ability to write your own local storage implementation. > -> Check out the [docs here](/packages/powersync_core/doc/attachments.md) to get started. +> Check out the [docs here](https://pub.dev/documentation/powersync_core/latest/topics/attachments-topic.html) to get started. > > While the `powersync_attachments_helper` package will still get bug fixes if you need them, > new features will only be developed on `powersync_core/attachments`. diff --git a/packages/powersync_core/doc/attachments.md b/packages/powersync_core/doc/attachments.md index 67383942..555cda7b 100644 --- a/packages/powersync_core/doc/attachments.md +++ b/packages/powersync_core/doc/attachments.md @@ -5,16 +5,26 @@ PowerSync. Embedding this data directly in your source databases is [inefficient and not recommended](https://docs.powersync.com/usage/use-case-examples/attachments). Instead, the PowerSync SDK for Dart and Flutter provides utilities you can use to _reference_ this binary data -in your local database, and then download it from a secondary data store such as Supabase Storage or S3. +in your regular database schema, and then download it from a secondary data store such as Supabase Storage or S3. Because binary data is not directly stored in the source database in this model, we call these files _attachments_. + +> [!NOTE] +> These attachment utilities are recommended over our legacy [PowerSync Attachments Helper](https://pub.dev/packages/powersync_attachments_helper) package. The new utilities provide cleaner APIs that are more aligned with similar helpers in our other SDKs, and include improved features such as: +> - Support for writing your own local storage implementation +> - Support for dynamic nested directories and custom per-attachment file extensions out of the box +> - Ability to add optional `metaData` to attachments +> - No longer depends on `dart:io` +> +> If you are new to handling attachments, we recommend starting with these utilities. If you currently use the legacy `powersync_attachments_helper` package, a fairly simple migration would be to adopt the new utilities with a different table name and drop the legacy package. This means existing attachments are lost, but they should be downloaded again. + ## Alpha release -The attachment helpers described in this document are currently in an alpha state, intended for testing. +The attachment utilities described in this document are currently in an alpha state, intended for testing. Expect breaking changes and instability as development continues. The attachments API is marked as `@experimental` for this reason. -Do not rely on these libraries for production use. +Do not rely on these utilities for production use. ## Usage From 227f416c0576fe04cbfc6768060ff96fc08bc420 Mon Sep 17 00:00:00 2001 From: Simon Binder Date: Mon, 6 Oct 2025 10:58:59 +0200 Subject: [PATCH 5/7] Fix decoding subscriptions from status --- packages/powersync_core/lib/src/web/sync_worker_protocol.dart | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/powersync_core/lib/src/web/sync_worker_protocol.dart b/packages/powersync_core/lib/src/web/sync_worker_protocol.dart index 950cd1d6..0448fe5a 100644 --- a/packages/powersync_core/lib/src/web/sync_worker_protocol.dart +++ b/packages/powersync_core/lib/src/web/sync_worker_protocol.dart @@ -328,8 +328,8 @@ extension type SerializedSyncStatus._(JSObject _) implements JSObject { }, streamSubscriptions: switch (streamSubscriptions) { null => null, - final serialized => (json.decode(serialized) as List) - .map((e) => CoreActiveStreamSubscription.fromJson( + final serialized => (json.decode(serialized) as List?) + ?.map((e) => CoreActiveStreamSubscription.fromJson( e as Map)) .toList(), }, From 4f4da24e580dec6b1d29a5e0907b83ba7c55e3d8 Mon Sep 17 00:00:00 2001 From: Simon Binder Date: Mon, 6 Oct 2025 10:51:52 +0200 Subject: [PATCH 6/7] Attachments docs: Point to uses in example --- demos/supabase-todolist/lib/attachments/queue.dart | 9 --------- packages/powersync_core/doc/attachments.md | 5 +++++ 2 files changed, 5 insertions(+), 9 deletions(-) diff --git a/demos/supabase-todolist/lib/attachments/queue.dart b/demos/supabase-todolist/lib/attachments/queue.dart index 80460daf..8f036c85 100644 --- a/demos/supabase-todolist/lib/attachments/queue.dart +++ b/demos/supabase-todolist/lib/attachments/queue.dart @@ -53,12 +53,3 @@ Future savePhotoAttachment( }, ); } - -Future deletePhotoAttachment(String fileId) async { - return await attachmentQueue.deleteFile( - attachmentId: fileId, - updateHook: (context, attachment) async { - // Optionally update relationships in the same transaction - }, - ); -} diff --git a/packages/powersync_core/doc/attachments.md b/packages/powersync_core/doc/attachments.md index 555cda7b..6919430f 100644 --- a/packages/powersync_core/doc/attachments.md +++ b/packages/powersync_core/doc/attachments.md @@ -43,6 +43,11 @@ The attachments' state is stored in a local-only attachments table. See the [supabase-todolist](https://github.com/powersync-ja/powersync.dart/tree/main/demos/supabase-todolist) demo for a basic example of attachment syncing. +In particular, relevant snippets from that example are: + +- The attachment queue is set up [here](https://github.com/powersync-ja/powersync.dart/blob/98d73e2f157a697786373fef755576505abc74a5/demos/supabase-todolist/lib/attachments/queue.dart#L16-L36), using conditional imports to store attachments in the file system on native platforms and in-memory for web. +- When a new attachment is added, `saveFile` is called [here](https://github.com/powersync-ja/powersync.dart/blob/98d73e2f157a697786373fef755576505abc74a5/demos/supabase-todolist/lib/attachments/queue.dart#L38-L55) and automatically updates references in the main schema to reference the attachment. + ### Setup First, add a table storing local attachment state to your database schema. From 1c904a89947c6e17164a02b6243628c29acfd017 Mon Sep 17 00:00:00 2001 From: Simon Binder Date: Mon, 6 Oct 2025 15:08:46 +0200 Subject: [PATCH 7/7] chore(release): publish packages - powersync@1.16.1 - powersync_core@1.6.1 - powersync_sqlcipher@0.1.13 --- CHANGELOG.md | 33 +++++++++++++++++++ demos/benchmarks/pubspec.yaml | 2 +- demos/django-todolist/pubspec.yaml | 2 +- demos/firebase-nodejs-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 | 2 +- .../pubspec.yaml | 2 +- demos/supabase-todolist/pubspec.yaml | 4 +-- demos/supabase-trello/pubspec.yaml | 2 +- packages/powersync/CHANGELOG.md | 4 +++ packages/powersync/pubspec.yaml | 4 +-- .../powersync_attachments_helper/pubspec.yaml | 2 +- packages/powersync_core/CHANGELOG.md | 6 ++++ packages/powersync_core/lib/src/version.dart | 2 +- packages/powersync_core/pubspec.yaml | 2 +- packages/powersync_sqlcipher/CHANGELOG.md | 4 +++ .../powersync_sqlcipher/example/pubspec.yaml | 2 +- packages/powersync_sqlcipher/pubspec.yaml | 4 +-- 20 files changed, 66 insertions(+), 19 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a9d0ccfc..e76e3a6a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,39 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## 2025-10-06 + +### Changes + +--- + +Packages with breaking changes: + + - There are no breaking changes in this release. + +Packages with other changes: + + - [`powersync` - `v1.16.1`](#powersync---v1161) + - [`powersync_core` - `v1.6.1`](#powersync_core---v161) + - [`powersync_sqlcipher` - `v0.1.13`](#powersync_sqlcipher---v0113) + +--- + +#### `powersync` - `v1.16.1` + + - Web: Fix decoding sync streams on status. + +#### `powersync_core` - `v1.6.1` + + - Web: Fix decoding sync streams on status. + + - **DOCS**: Point to uses in example. ([4f4da24e](https://github.com/powersync-ja/powersync.dart/commit/4f4da24e580dec6b1d29a5e0907b83ba7c55e3d8)) + +#### `powersync_sqlcipher` - `v0.1.13` + + - Web: Fix decoding sync streams on status. + + ## 2025-10-02 ### Changes diff --git a/demos/benchmarks/pubspec.yaml b/demos/benchmarks/pubspec.yaml index 104a1c23..aea63c20 100644 --- a/demos/benchmarks/pubspec.yaml +++ b/demos/benchmarks/pubspec.yaml @@ -10,7 +10,7 @@ environment: dependencies: flutter: sdk: flutter - powersync: ^1.16.0 + powersync: ^1.16.1 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 e5fa09ca..4c1cacff 100644 --- a/demos/django-todolist/pubspec.yaml +++ b/demos/django-todolist/pubspec.yaml @@ -10,7 +10,7 @@ environment: dependencies: flutter: sdk: flutter - powersync: ^1.16.0 + powersync: ^1.16.1 path_provider: ^2.1.1 path: ^1.8.3 logging: ^1.2.0 diff --git a/demos/firebase-nodejs-todolist/pubspec.yaml b/demos/firebase-nodejs-todolist/pubspec.yaml index 43537393..de6ea1fe 100644 --- a/demos/firebase-nodejs-todolist/pubspec.yaml +++ b/demos/firebase-nodejs-todolist/pubspec.yaml @@ -11,7 +11,7 @@ dependencies: flutter: sdk: flutter - powersync: ^1.16.0 + powersync: ^1.16.1 path_provider: ^2.1.1 supabase_flutter: ^2.0.1 path: ^1.8.3 diff --git a/demos/supabase-anonymous-auth/pubspec.yaml b/demos/supabase-anonymous-auth/pubspec.yaml index 7eaae283..b4f44bcb 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.16.0 + powersync: ^1.16.1 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 5dfb7fd2..f1f5ddcb 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.16.0 + powersync: ^1.16.1 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 3d3626f2..463278d2 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.16.0 + powersync: ^1.16.1 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 8ccc7e7e..051931b2 100644 --- a/demos/supabase-todolist-drift/pubspec.yaml +++ b/demos/supabase-todolist-drift/pubspec.yaml @@ -10,7 +10,7 @@ dependencies: flutter: sdk: flutter powersync_attachments_helper: ^0.6.20 - powersync: ^1.16.0 + powersync: ^1.16.1 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 76b69edf..477f3d02 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.16.0 + powersync: ^1.16.1 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 4d5c201a..2175e2b4 100644 --- a/demos/supabase-todolist/pubspec.yaml +++ b/demos/supabase-todolist/pubspec.yaml @@ -10,8 +10,8 @@ environment: dependencies: flutter: sdk: flutter - powersync: ^1.16.0 - powersync_core: ^1.6.0 + powersync: ^1.16.1 + powersync_core: ^1.6.1 path_provider: ^2.1.1 supabase_flutter: ^2.0.1 path: ^1.8.3 diff --git a/demos/supabase-trello/pubspec.yaml b/demos/supabase-trello/pubspec.yaml index 3a1327e0..a609124e 100644 --- a/demos/supabase-trello/pubspec.yaml +++ b/demos/supabase-trello/pubspec.yaml @@ -36,7 +36,7 @@ dependencies: random_name_generator: ^1.5.0 flutter_dotenv: ^5.2.1 logging: ^1.3.0 - powersync: ^1.16.0 + powersync: ^1.16.1 sqlite_async: ^0.12.0 path_provider: ^2.1.5 supabase_flutter: ^2.8.3 diff --git a/packages/powersync/CHANGELOG.md b/packages/powersync/CHANGELOG.md index 43179ad3..4f30cb92 100644 --- a/packages/powersync/CHANGELOG.md +++ b/packages/powersync/CHANGELOG.md @@ -1,3 +1,7 @@ +## 1.16.1 + + - Web: Fix decoding sync streams on status. + ## 1.16.0 - Add `getCrudTransactions()` returning a stream of completed transactions for uploads. diff --git a/packages/powersync/pubspec.yaml b/packages/powersync/pubspec.yaml index bd39106e..26fffc25 100644 --- a/packages/powersync/pubspec.yaml +++ b/packages/powersync/pubspec.yaml @@ -1,5 +1,5 @@ name: powersync -version: 1.16.0 +version: 1.16.1 homepage: https://powersync.com repository: https://github.com/powersync-ja/powersync.dart description: PowerSync Flutter SDK. Sync Postgres, MongoDB or MySQL with SQLite in your Flutter app @@ -12,7 +12,7 @@ dependencies: sdk: flutter sqlite3_flutter_libs: ^0.5.39 - powersync_core: ^1.6.0 + powersync_core: ^1.6.1 powersync_flutter_libs: ^0.4.12 collection: ^1.17.0 diff --git a/packages/powersync_attachments_helper/pubspec.yaml b/packages/powersync_attachments_helper/pubspec.yaml index 63854d43..971228f9 100644 --- a/packages/powersync_attachments_helper/pubspec.yaml +++ b/packages/powersync_attachments_helper/pubspec.yaml @@ -10,7 +10,7 @@ dependencies: flutter: sdk: flutter - powersync_core: ^1.6.0 + powersync_core: ^1.6.1 logging: ^1.2.0 path_provider: ^2.0.13 diff --git a/packages/powersync_core/CHANGELOG.md b/packages/powersync_core/CHANGELOG.md index 1aabefb6..4ba23772 100644 --- a/packages/powersync_core/CHANGELOG.md +++ b/packages/powersync_core/CHANGELOG.md @@ -1,3 +1,9 @@ +## 1.6.1 + + - Web: Fix decoding sync streams on status. + + - **DOCS**: Point to uses in example. ([4f4da24e](https://github.com/powersync-ja/powersync.dart/commit/4f4da24e580dec6b1d29a5e0907b83ba7c55e3d8)) + ## 1.6.0 - Add `getCrudTransactions()` returning a stream of completed transactions for uploads. diff --git a/packages/powersync_core/lib/src/version.dart b/packages/powersync_core/lib/src/version.dart index 05cb9eb9..211139eb 100644 --- a/packages/powersync_core/lib/src/version.dart +++ b/packages/powersync_core/lib/src/version.dart @@ -1 +1 @@ -const String libraryVersion = '1.6.0'; +const String libraryVersion = '1.6.1'; diff --git a/packages/powersync_core/pubspec.yaml b/packages/powersync_core/pubspec.yaml index f85058c3..723cd4e9 100644 --- a/packages/powersync_core/pubspec.yaml +++ b/packages/powersync_core/pubspec.yaml @@ -1,5 +1,5 @@ name: powersync_core -version: 1.6.0 +version: 1.6.1 homepage: https://powersync.com repository: https://github.com/powersync-ja/powersync.dart description: PowerSync Dart SDK - sync engine for building local-first apps. diff --git a/packages/powersync_sqlcipher/CHANGELOG.md b/packages/powersync_sqlcipher/CHANGELOG.md index c0bcd85f..33b9cb2f 100644 --- a/packages/powersync_sqlcipher/CHANGELOG.md +++ b/packages/powersync_sqlcipher/CHANGELOG.md @@ -1,3 +1,7 @@ +## 0.1.13 + + - Web: Fix decoding sync streams on status. + ## 0.1.12 - Add `getCrudTransactions()` returning a stream of completed transactions for uploads. diff --git a/packages/powersync_sqlcipher/example/pubspec.yaml b/packages/powersync_sqlcipher/example/pubspec.yaml index 7dc9c0c9..753aa73a 100644 --- a/packages/powersync_sqlcipher/example/pubspec.yaml +++ b/packages/powersync_sqlcipher/example/pubspec.yaml @@ -13,7 +13,7 @@ dependencies: path: ^1.9.1 path_provider: ^2.1.5 - powersync_sqlcipher: ^0.1.12 + powersync_sqlcipher: ^0.1.13 dev_dependencies: flutter_test: diff --git a/packages/powersync_sqlcipher/pubspec.yaml b/packages/powersync_sqlcipher/pubspec.yaml index f2bc78eb..b73913c2 100644 --- a/packages/powersync_sqlcipher/pubspec.yaml +++ b/packages/powersync_sqlcipher/pubspec.yaml @@ -1,5 +1,5 @@ name: powersync_sqlcipher -version: 0.1.12 +version: 0.1.13 homepage: https://powersync.com repository: https://github.com/powersync-ja/powersync.dart description: PowerSync Flutter SDK - sync engine for building local-first apps. @@ -12,7 +12,7 @@ dependencies: flutter: sdk: flutter - powersync_core: ^1.6.0 + powersync_core: ^1.6.1 powersync_flutter_libs: ^0.4.12 sqlcipher_flutter_libs: ^0.6.4 sqlite3_web: ^0.3.0