Skip to content

Commit 8f74f9c

Browse files
committed
Merge branch 'main' into feat/crud-transactions-warning
2 parents 29c7431 + 70b487e commit 8f74f9c

File tree

22 files changed

+85
-55
lines changed

22 files changed

+85
-55
lines changed

CHANGELOG.md

Lines changed: 26 additions & 0 deletions
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-09-30
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.3`](#powersync---v183)
19+
- [`powersync_attachments_helper` - `v0.6.7`](#powersync_attachments_helper---v067)
20+
21+
---
22+
23+
#### `powersync` - `v1.8.3`
24+
25+
- **FIX**: Pass maxReaders parameter to `PowerSyncDatabase.withFactory()`
26+
27+
#### `powersync_attachments_helper` - `v0.6.7`
28+
29+
- Update a dependency to the latest release.
30+
31+
632
## 2024-09-13
733

834
### Changes

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<a href="https://www.powersync.com" target="_blank"><img src="https://github.com/powersync-ja/.github/assets/7372448/d2538c43-c1a0-4c47-9a76-41462dba484f"/></a>
33
</p>
44

5-
*[PowerSync](https://www.powersync.com) is a Postgres-SQLite sync engine, which helps developers to create local-first real-time reactive apps that work seamlessly both online and offline.*
5+
*[PowerSync](https://www.powersync.com) is a sync engine for building local-first apps with instantly-responsive UI/UX and simplified state transfer. Syncs between SQLite on the client-side and Postgres or MongoDB on the server-side (MySQL coming soon).*
66

77
PowerSync SDK for Dart and Flutter
88
===========

demos/django-todolist/lib/api_client.dart

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
11
import 'dart:convert';
22
import 'package:http/http.dart' as http;
3-
import 'package:logging/logging.dart';
4-
5-
final log = Logger('powersync-django-todolist');
63

74
class ApiClient {
85
final String baseUrl;

demos/django-todolist/lib/powersync.dart

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ import './app_config.dart';
1111
import './models/schema.dart';
1212

1313
final log = Logger('powersync-django');
14+
final prefs = SharedPreferencesAsync();
1415

1516
/// Postgres Response codes that we cannot recover from by retrying.
1617
final List<RegExp> fatalResponseCodes = [
@@ -89,8 +90,7 @@ bool _dbInitialized = false;
8990

9091
/// id of the user currently logged in
9192
Future<String?> getUserId() async {
92-
final prefs = await SharedPreferences.getInstance();
93-
return prefs.getString('id');
93+
return await prefs.getString('id');
9494
}
9595

9696
Future<bool> isLoggedIn() async {
@@ -129,5 +129,6 @@ Future<void> openDatabase() async {
129129

130130
/// Explicit sign out - clear database and log out.
131131
Future<void> logout() async {
132+
await prefs.remove('id');
132133
await db.disconnectAndClear();
133134
}

demos/django-todolist/lib/widgets/login_page.dart

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ import 'package:flutter/material.dart';
33
import 'package:powersync_django_todolist_demo/api_client.dart';
44
import 'package:powersync_django_todolist_demo/app_config.dart';
55
import 'package:powersync_django_todolist_demo/powersync.dart';
6-
import 'package:shared_preferences/shared_preferences.dart';
76

87
import '../main.dart';
98

@@ -42,7 +41,6 @@ class _LoginPageState extends State<LoginPage> {
4241

4342
final payload = _parseJwt(session['access_token']);
4443
if (payload.containsKey('sub')) {
45-
final prefs = await SharedPreferences.getInstance();
4644
await prefs.setString('id', payload['sub'].toString());
4745

4846
//re-init PowerSync manually for first time sign in

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.2
13+
powersync: ^1.8.3
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.2
14+
powersync: ^1.8.3
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.2
14+
powersync: ^1.8.3
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.2
40+
powersync: ^1.8.3
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.6
13-
powersync: ^1.8.2
12+
powersync_attachments_helper: ^0.6.7
13+
powersync: ^1.8.3
1414
path_provider: ^2.1.1
1515
supabase_flutter: ^2.0.1
1616
path: ^1.8.3

0 commit comments

Comments
 (0)