Skip to content

Commit f17ea6f

Browse files
authored
[Feature] Add warning if crud transactions are not completed (#172)
* Show warning if crud transactions are not completed * Test on native for upload tests * Fix crudMutex and uploading status * Add back retry delay for crudMutex * chore(release): publish packages - [email protected] - [email protected]
1 parent 70b487e commit f17ea6f

File tree

18 files changed

+200
-49
lines changed

18 files changed

+200
-49
lines changed

CHANGELOG.md

Lines changed: 27 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,32 @@
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+
## 2024-10-01
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` - `v1.8.4`](#powersync---v184)
19+
- [`powersync_attachments_helper` - `v0.6.8`](#powersync_attachments_helper---v068)
20+
21+
---
22+
23+
#### `powersync` - `v1.8.4`
24+
25+
- **FEAT**: Added a warning if connector `uploadData` functions don't process CRUD items completely.
26+
27+
#### `powersync_attachments_helper` - `v0.6.8`
28+
29+
- Update a dependency to the latest release.
30+
31+
632
## 2024-09-30
733

834
### Changes
@@ -22,7 +48,7 @@ Packages with other changes:
2248

2349
#### `powersync` - `v1.8.3`
2450

25-
- **FIX**: Pass maxReaders parameter to `PowerSyncDatabase.withFactory()`
51+
- **FIX**: Pass maxReaders parameter to `PowerSyncDatabase.withFactory()`.
2652

2753
#### `powersync_attachments_helper` - `v0.6.7`
2854

demos/django-todolist/pubspec.yaml

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

demos/supabase-anonymous-auth/pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ dependencies:
1111
flutter:
1212
sdk: flutter
1313

14-
powersync: ^1.8.3
14+
powersync: ^1.8.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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ dependencies:
1111
flutter:
1212
sdk: flutter
1313

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

demos/supabase-simple-chat/pubspec.yaml

Lines changed: 1 addition & 1 deletion
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.8.3
40+
powersync: ^1.8.4
4141
path_provider: ^2.1.1
4242
path: ^1.8.3
4343
logging: ^1.2.0

demos/supabase-todolist-drift/pubspec.yaml

Lines changed: 2 additions & 2 deletions
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.7
13-
powersync: ^1.8.3
12+
powersync_attachments_helper: ^0.6.8
13+
powersync: ^1.8.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

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

demos/supabase-todolist/pubspec.yaml

Lines changed: 2 additions & 2 deletions
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.7
14-
powersync: ^1.8.3
13+
powersync_attachments_helper: ^0.6.8
14+
powersync: ^1.8.4
1515
path_provider: ^2.1.1
1616
supabase_flutter: ^2.0.1
1717
path: ^1.8.3

packages/powersync/CHANGELOG.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
1+
## 1.8.4
2+
3+
- **FEAT**: Added a warning if connector `uploadData` functions don't process CRUD items completely.
4+
15
## 1.8.3
26

3-
- **FIX**: Pass maxReaders parameter to `PowerSyncDatabase.withFactory()`
7+
- **FIX**: Pass maxReaders parameter to `PowerSyncDatabase.withFactory()`.
48

59
## 1.8.2
610

packages/powersync/lib/src/bucket_storage.dart

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -270,6 +270,12 @@ class BucketStorage {
270270
});
271271
}
272272

273+
Future<CrudEntry?> nextCrudItem() async {
274+
var next = await _internalDb
275+
.getOptional('SELECT * FROM ps_crud ORDER BY id ASC LIMIT 1');
276+
return next == null ? null : CrudEntry.fromRow(next);
277+
}
278+
273279
Future<bool> hasCrud() async {
274280
final anyData = await select('SELECT 1 FROM ps_crud LIMIT 1');
275281
return anyData.isNotEmpty;

0 commit comments

Comments
 (0)