Skip to content

Commit 786d2ba

Browse files
authored
Merge branch 'main' into drift-demo-with-riverpod
2 parents 8f71e97 + 83b82c9 commit 786d2ba

39 files changed

+834
-333
lines changed

CHANGELOG.md

+68
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,74 @@
33
All notable changes to this project will be documented in this file.
44
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
55

6+
## 2025-04-24
7+
8+
### Changes
9+
10+
---
11+
12+
Packages with breaking changes:
13+
14+
- There are no breaking changes in this release.
15+
16+
Packages with other changes:
17+
18+
- [`powersync_core` - `v1.2.4`](#powersync_core---v124)
19+
- [`powersync_attachments_helper` - `v0.6.18+6`](#powersync_attachments_helper---v06186)
20+
- [`powersync_sqlcipher` - `v0.1.5+4`](#powersync_sqlcipher---v0154)
21+
- [`powersync` - `v1.12.4`](#powersync---v1124)
22+
23+
Packages with dependency updates only:
24+
25+
> 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.
26+
27+
- `powersync_attachments_helper` - `v0.6.18+6`
28+
- `powersync_sqlcipher` - `v0.1.5+4`
29+
- `powersync` - `v1.12.4`
30+
31+
---
32+
33+
#### `powersync_core` - `v1.2.4`
34+
35+
- Fix deadlock when `connect()` is called immediately after opening a database.
36+
37+
38+
## 2025-04-22
39+
40+
### Changes
41+
42+
---
43+
44+
Packages with breaking changes:
45+
46+
- There are no breaking changes in this release.
47+
48+
Packages with other changes:
49+
50+
- [`powersync_core` - `v1.2.3`](#powersync_core---v123)
51+
- [`powersync_attachments_helper` - `v0.6.18+5`](#powersync_attachments_helper---v06185)
52+
- [`powersync_sqlcipher` - `v0.1.5+3`](#powersync_sqlcipher---v0153)
53+
- [`powersync` - `v1.12.3`](#powersync---v1123)
54+
55+
Packages with dependency updates only:
56+
57+
> 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.
58+
59+
- `powersync_attachments_helper` - `v0.6.18+5`
60+
- `powersync_sqlcipher` - `v0.1.5+3`
61+
- `powersync` - `v1.12.3`
62+
63+
---
64+
65+
#### `powersync_core` - `v1.2.3`
66+
67+
- Introduce locks to avoid duplicate sync streams when multiple instances of the same database are opened.
68+
- Refactor connect / disconnect internally.
69+
- Warn when multiple instances of the same database are opened.
70+
- Fix race condition causing data not to be applied while an upload is in progress.
71+
- Web: Fix token invalidation logic when a sync worker is used.
72+
73+
674
## 2025-03-11
775

876
### Changes

README.md

+8-8
Original file line numberDiff line numberDiff line change
@@ -6,19 +6,19 @@ _[PowerSync](https://www.powersync.com) is a sync engine for building local-firs
66

77
# PowerSync SDK for Dart and Flutter
88

9-
| package | build | pub | likes | popularity | pub points |
10-
| -------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------ |
11-
| [powersync](https://github.com/powersync-ja/powersync.dart/tree/master/packages/powersync) | [![build](https://github.com/powersync-ja/powersync.dart/actions/workflows/packages.yml/badge.svg?branch=master)](https://github.com/powersync-ja/powersync.dart/actions?query=workflow%3Apackages) | [![pub package](https://img.shields.io/pub/v/powersync.svg)](https://pub.dev/packages/powersync) | [![likes](https://img.shields.io/pub/likes/powersync?logo=dart)](https://pub.dev/packages/powersync/score) | [![popularity](https://img.shields.io/pub/popularity/powersync?logo=dart)](https://pub.dev/packages/powersync/score) | [![pub points](https://img.shields.io/pub/points/powersync?logo=dart)](https://pub.dev/packages/powersync/score) |
12-
| [powersync_core](https://github.com/powersync-ja/powersync.dart/tree/master/packages/powersync_core) | [![build](https://github.com/powersync-ja/powersync.dart/actions/workflows/packages.yml/badge.svg?branch=master)](https://github.com/powersync-ja/powersync.dart/actions?query=workflow%3Apackages) | [![pub package](https://img.shields.io/pub/v/powersync_core.svg)](https://pub.dev/packages/powersync_core) | [![likes](https://img.shields.io/pub/likes/powersync_core?logo=dart)](https://pub.dev/packages/powersync_core/score) | [![popularity](https://img.shields.io/pub/popularity/powersync_core?logo=dart)](https://pub.dev/packages/powersync_core/score) | [![pub points](https://img.shields.io/pub/points/powersync_core?logo=dart)](https://pub.dev/packages/powersync_core/score) |
13-
| [powersync_sqlcipher](https://github.com/powersync-ja/powersync.dart/tree/master/packages/powersync_sqlcipher) | [![build](https://github.com/powersync-ja/powersync.dart/actions/workflows/packages.yml/badge.svg?branch=master)](https://github.com/powersync-ja/powersync.dart/actions?query=workflow%3Apackages) | [![pub package](https://img.shields.io/pub/v/powersync_sqlcipher.svg)](https://pub.dev/packages/powersync_sqlcipher) | [![likes](https://img.shields.io/pub/likes/powersync_sqlcipher?logo=dart)](https://pub.dev/packages/powersync_sqlcipher/score) | [![popularity](https://img.shields.io/pub/popularity/powersync_sqlcipher?logo=dart)](https://pub.dev/packages/powersync_sqlcipher/score) | [![pub points](https://img.shields.io/pub/points/powersync_sqlcipher?logo=dart)](https://pub.dev/packages/powersync_sqlcipher/score) |
14-
| [powersync_attachments_helper](https://github.com/powersync-ja/powersync.dart/tree/master/packages/powersync_attachments_helper) | [![build](https://github.com/powersync-ja/powersync.dart/actions/workflows/packages.yml/badge.svg?branch=master)](https://github.com/powersync-ja/powersync.dart/actions?query=workflow%3Apackages) | [![pub package](https://img.shields.io/pub/v/powersync_attachments_helper.svg)](https://pub.dev/packages/powersync_attachments_helper) | [![likes](https://img.shields.io/pub/likes/powersync_attachments_helper?logo=dart)](https://pub.dev/packages/powersync_attachments_helper/score) | [![popularity](https://img.shields.io/pub/popularity/powersync_attachments_helper?logo=dart)](https://pub.dev/packages/powersync_attachments_helper/score) | [![pub points](https://img.shields.io/pub/points/powersync_attachments_helper?logo=dart)](https://pub.dev/packages/powersync_attachments_helper/score) |
15-
| [powersync_flutter_libs](https://github.com/powersync-ja/powersync.dart/tree/master/packages/powersync_flutter_libs) | [![build](https://github.com/powersync-ja/powersync.dart/actions/workflows/packages.yml/badge.svg?branch=master)](https://github.com/powersync-ja/powersync.dart/actions?query=workflow%3Apackages) | [![pub package](https://img.shields.io/pub/v/powersync_flutter_libs.svg)](https://pub.dev/packages/powersync_flutter_libs) | [![likes](https://img.shields.io/pub/likes/powersync_flutter_libs?logo=dart)](https://pub.dev/packages/powersync_flutter_libs/score) | [![popularity](https://img.shields.io/pub/popularity/powersync_flutter_libs?logo=dart)](https://pub.dev/packages/powersync_flutter_libs/score) | [![pub points](https://img.shields.io/pub/points/powersync_flutter_libs?logo=dart)](https://pub.dev/packages/powersync_flutter_libs/score) |
9+
| package | build | pub | likes | pub points |
10+
|--------------------------------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------|
11+
| [powersync](https://github.com/powersync-ja/powersync.dart/tree/main/packages/powersync) | [![build](https://github.com/powersync-ja/powersync.dart/actions/workflows/check.yml/badge.svg?branch=main)](https://github.com/powersync-ja/powersync.dart/actions?query=workflow%3Apackages) | [![pub package](https://img.shields.io/pub/v/powersync.svg)](https://pub.dev/packages/powersync) | [![likes](https://img.shields.io/pub/likes/powersync?logo=dart)](https://pub.dev/packages/powersync/score) | [![pub points](https://img.shields.io/pub/points/powersync?logo=dart)](https://pub.dev/packages/powersync/score) |
12+
| [powersync_core](https://github.com/powersync-ja/powersync.dart/tree/main/packages/powersync_core) | [![build](https://github.com/powersync-ja/powersync.dart/actions/workflows/check.yml/badge.svg?branch=main)](https://github.com/powersync-ja/powersync.dart/actions?query=workflow%3Apackages) | [![pub package](https://img.shields.io/pub/v/powersync_core.svg)](https://pub.dev/packages/powersync_core) | [![likes](https://img.shields.io/pub/likes/powersync_core?logo=dart)](https://pub.dev/packages/powersync_core/score) | [![pub points](https://img.shields.io/pub/points/powersync_core?logo=dart)](https://pub.dev/packages/powersync_core/score) |
13+
| [powersync_sqlcipher](https://github.com/powersync-ja/powersync.dart/tree/main/packages/powersync_sqlcipher) | [![build](https://github.com/powersync-ja/powersync.dart/actions/workflows/check.yml/badge.svg?branch=main)](https://github.com/powersync-ja/powersync.dart/actions?query=workflow%3Apackages) | [![pub package](https://img.shields.io/pub/v/powersync_sqlcipher.svg)](https://pub.dev/packages/powersync_sqlcipher) | [![likes](https://img.shields.io/pub/likes/powersync_sqlcipher?logo=dart)](https://pub.dev/packages/powersync_sqlcipher/score) | [![pub points](https://img.shields.io/pub/points/powersync_sqlcipher?logo=dart)](https://pub.dev/packages/powersync_sqlcipher/score) |
14+
| [powersync_attachments_helper](https://github.com/powersync-ja/powersync.dart/tree/main/packages/powersync_attachments_helper) | [![build](https://github.com/powersync-ja/powersync.dart/actions/workflows/check.yml/badge.svg?branch=main)](https://github.com/powersync-ja/powersync.dart/actions?query=workflow%3Apackages) | [![pub package](https://img.shields.io/pub/v/powersync_attachments_helper.svg)](https://pub.dev/packages/powersync_attachments_helper) | [![likes](https://img.shields.io/pub/likes/powersync_attachments_helper?logo=dart)](https://pub.dev/packages/powersync_attachments_helper/score) | [![pub points](https://img.shields.io/pub/points/powersync_attachments_helper?logo=dart)](https://pub.dev/packages/powersync_attachments_helper/score) |
15+
| [powersync_flutter_libs](https://github.com/powersync-ja/powersync.dart/tree/main/packages/powersync_flutter_libs) | [![build](https://github.com/powersync-ja/powersync.dart/actions/workflows/check.yml/badge.svg?branch=main)](https://github.com/powersync-ja/powersync.dart/actions?query=workflow%3Apackages) | [![pub package](https://img.shields.io/pub/v/powersync_flutter_libs.svg)](https://pub.dev/packages/powersync_flutter_libs) | [![likes](https://img.shields.io/pub/likes/powersync_flutter_libs?logo=dart)](https://pub.dev/packages/powersync_flutter_libs/score) | [![pub points](https://img.shields.io/pub/points/powersync_flutter_libs?logo=dart)](https://pub.dev/packages/powersync_flutter_libs/score) |
1616

1717
#### Usage
1818

1919
This monorepo uses [melos](https://melos.invertase.dev/) to handle command and package management.
2020

21-
For detailed usage, check out the inner [powersync](https://github.com/powersync-ja/powersync.dart/tree/master/packages/powersync), [powersync_core](https://github.com/powersync-ja/powersync.dart/tree/master/packages/powersync_core), [powersync_sqlcipher](https://github.com/powersync-ja/powersync.dart/tree/master/packages/powersync_sqlcipher) and [attachments helper](https://github.com/powersync-ja/powersync.dart/tree/master/packages/powersync_attachments_helper) packages.
21+
For detailed usage, check out the inner [powersync](https://github.com/powersync-ja/powersync.dart/tree/main/packages/powersync), [powersync_core](https://github.com/powersync-ja/powersync.dart/tree/main/packages/powersync_core), [powersync_sqlcipher](https://github.com/powersync-ja/powersync.dart/tree/main/packages/powersync_sqlcipher) and [attachments helper](https://github.com/powersync-ja/powersync.dart/tree/main/packages/powersync_attachments_helper) packages.
2222

2323
To configure the monorepo for development run `melos prepare` after cloning
2424

demos/benchmarks/pubspec.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ environment:
1010
dependencies:
1111
flutter:
1212
sdk: flutter
13-
powersync: ^1.12.2
13+
powersync: ^1.12.4
1414
path_provider: ^2.1.1
1515
path: ^1.8.3
1616
logging: ^1.2.0

demos/django-todolist/pubspec.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ environment:
1010
dependencies:
1111
flutter:
1212
sdk: flutter
13-
powersync: ^1.12.2
13+
powersync: ^1.12.4
1414
path_provider: ^2.1.1
1515
path: ^1.8.3
1616
logging: ^1.2.0

demos/firebase-nodejs-todolist/pubspec.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ dependencies:
1111
flutter:
1212
sdk: flutter
1313

14-
powersync: ^1.12.2
14+
powersync: ^1.12.4
1515
path_provider: ^2.1.1
1616
supabase_flutter: ^2.0.1
1717
path: ^1.8.3

demos/supabase-anonymous-auth/pubspec.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ dependencies:
1111
flutter:
1212
sdk: flutter
1313

14-
powersync: ^1.12.2
14+
powersync: ^1.12.4
1515
path_provider: ^2.1.1
1616
supabase_flutter: ^2.0.2
1717
path: ^1.8.3

demos/supabase-edge-function-auth/pubspec.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ dependencies:
1111
flutter:
1212
sdk: flutter
1313

14-
powersync: ^1.12.2
14+
powersync: ^1.12.4
1515
path_provider: ^2.1.1
1616
supabase_flutter: ^2.0.2
1717
path: ^1.8.3

demos/supabase-simple-chat/pubspec.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ dependencies:
3737

3838
supabase_flutter: ^2.0.2
3939
timeago: ^3.6.0
40-
powersync: ^1.12.2
40+
powersync: ^1.12.4
4141
path_provider: ^2.1.1
4242
path: ^1.8.3
4343
logging: ^1.2.0

demos/supabase-todolist-drift/pubspec.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ environment:
99
dependencies:
1010
flutter:
1111
sdk: flutter
12-
powersync_attachments_helper: ^0.6.18+4
13-
powersync: ^1.12.2
12+
powersync_attachments_helper: ^0.6.18+6
13+
powersync: ^1.12.4
1414
path_provider: ^2.1.1
1515
supabase_flutter: ^2.0.1
1616
path: ^1.8.3

demos/supabase-todolist-optional-sync/pubspec.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ environment:
1010
dependencies:
1111
flutter:
1212
sdk: flutter
13-
powersync: ^1.12.2
13+
powersync: ^1.12.4
1414
path_provider: ^2.1.1
1515
supabase_flutter: ^2.0.1
1616
path: ^1.8.3

demos/supabase-todolist/pubspec.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ environment:
1010
dependencies:
1111
flutter:
1212
sdk: flutter
13-
powersync_attachments_helper: ^0.6.18+4
14-
powersync: ^1.12.2
13+
powersync_attachments_helper: ^0.6.18+6
14+
powersync: ^1.12.4
1515
path_provider: ^2.1.1
1616
supabase_flutter: ^2.0.1
1717
path: ^1.8.3

demos/supabase-trello/pubspec.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ dependencies:
3636
random_name_generator: ^1.5.0
3737
flutter_dotenv: ^5.2.1
3838
logging: ^1.3.0
39-
powersync: ^1.12.2
39+
powersync: ^1.12.4
4040
sqlite_async: ^0.11.0
4141
path_provider: ^2.1.5
4242
supabase_flutter: ^2.8.3

packages/powersync/CHANGELOG.md

+14
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,17 @@
1+
## 1.12.4
2+
3+
- Update a dependency to the latest release.
4+
5+
## 1.12.3
6+
7+
This updates `powersync_core` to version `1.2.3`, which includes these changes:
8+
9+
- Introduce locks to avoid duplicate sync streams when multiple instances of the same database are opened.
10+
- Refactor connect / disconnect internally.
11+
- Warn when multiple instances of the same database are opened.
12+
- Fix race condition causing data not to be applied while an upload is in progress.
13+
- Web: Fix token invalidation logic when a sync worker is used.
14+
115
## 1.12.2
216

317
- Update a dependency to the latest release.

packages/powersync/pubspec.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name: powersync
2-
version: 1.12.2
2+
version: 1.12.4
33
homepage: https://powersync.com
44
repository: https://github.com/powersync-ja/powersync.dart
55
description: PowerSync Flutter SDK. Sync Postgres, MongoDB or MySQL with SQLite in your Flutter app
@@ -12,7 +12,7 @@ dependencies:
1212
sdk: flutter
1313

1414
sqlite3_flutter_libs: ^0.5.23
15-
powersync_core: ^1.2.2
15+
powersync_core: ^1.2.4
1616
powersync_flutter_libs: ^0.4.7
1717
collection: ^1.17.0
1818

packages/powersync_attachments_helper/CHANGELOG.md

+8
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
1+
## 0.6.18+6
2+
3+
- Update a dependency to the latest release.
4+
5+
## 0.6.18+5
6+
7+
- Update a dependency to the latest release.
8+
19
## 0.6.18+4
210

311
- Update a dependency to the latest release.

packages/powersync_attachments_helper/pubspec.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: powersync_attachments_helper
22
description: A helper library for handling attachments when using PowerSync.
3-
version: 0.6.18+4
3+
version: 0.6.18+6
44
repository: https://github.com/powersync-ja/powersync.dart
55
homepage: https://www.powersync.com/
66
environment:
@@ -10,7 +10,7 @@ dependencies:
1010
flutter:
1111
sdk: flutter
1212

13-
powersync_core: ^1.2.2
13+
powersync_core: ^1.2.4
1414
logging: ^1.2.0
1515
sqlite_async: ^0.11.0
1616
path_provider: ^2.0.13

packages/powersync_core/CHANGELOG.md

+12
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,15 @@
1+
## 1.2.4
2+
3+
- Fix deadlock when `connect()` is called immediately after opening a database.
4+
5+
## 1.2.3
6+
7+
- Introduce locks to avoid duplicate sync streams when multiple instances of the same database are opened.
8+
- Refactor connect / disconnect internally.
9+
- Warn when multiple instances of the same database are opened.
10+
- Fix race condition causing data not to be applied while an upload is in progress.
11+
- Web: Fix token invalidation logic when a sync worker is used.
12+
113
## 1.2.2
214

315
- Fix handling token invalidation on the web.

packages/powersync_core/lib/src/abort_controller.dart

+4
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,10 @@ class AbortController {
1414
return _abortRequested.future;
1515
}
1616

17+
Future<void> get onCompletion {
18+
return _abortCompleter.future;
19+
}
20+
1721
/// Abort, and wait until aborting is complete.
1822
Future<void> abort() async {
1923
aborted = true;

0 commit comments

Comments
 (0)