Skip to content

Commit 6f29c14

Browse files
committed
Update dependencies, with associated fixes.
1 parent aff84cd commit 6f29c14

File tree

12 files changed

+24
-44
lines changed

12 files changed

+24
-44
lines changed

demos/supabase-anonymous-auth/pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ publish_to: "none"
55
version: 1.0.1
66

77
environment:
8-
sdk: ">=2.19.1 <4.0.0"
8+
sdk: ^3.2.0
99

1010
dependencies:
1111
flutter:

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ publish_to: "none"
55
version: 1.0.1
66

77
environment:
8-
sdk: ">=2.19.1 <4.0.0"
8+
sdk: ^3.2.0
99

1010
dependencies:
1111
flutter:

demos/supabase-simple-chat/pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ publish_to: "none" # Remove this line if you wish to publish to pub.dev
1919
version: 1.0.0+1
2020

2121
environment:
22-
sdk: ">=3.1.2 <4.0.0"
22+
sdk: ^3.2.0
2323

2424
# Dependencies specify other packages that your package needs in order to work.
2525
# To automatically upgrade your package dependencies to the latest versions

demos/supabase-todolist/pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ publish_to: "none"
55
version: 1.0.1
66

77
environment:
8-
sdk: ">=2.19.1 <3.0.0"
8+
sdk: ^3.2.0
99

1010
dependencies:
1111
flutter:

packages/powersync/lib/src/isolate_completer.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ class PortResult<T> {
8787
return _result as T;
8888
} else {
8989
if (_error != null && stackTrace != null) {
90-
Error.throwWithStackTrace(_error!, stackTrace!);
90+
Error.throwWithStackTrace(_error, stackTrace!);
9191
} else {
9292
throw _error!;
9393
}

packages/powersync/lib/src/powersync_database.dart

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -491,6 +491,11 @@ class PowerSyncDatabase with SqliteQueries implements SqliteConnection {
491491
}
492492
}, debugContext: 'execute()');
493493
}
494+
495+
@override
496+
Future<bool> getAutoCommit() {
497+
return database.getAutoCommit();
498+
}
494499
}
495500

496501
class _PowerSyncDatabaseIsolateArgs {

packages/powersync/lib/src/powersync_update_notification.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import 'package:sqlite_async/sqlite_async.dart';
33
import 'schema_logic.dart';
44

55
class PowerSyncUpdateNotification extends UpdateNotification {
6-
PowerSyncUpdateNotification(Set<String> tables) : super(tables);
6+
PowerSyncUpdateNotification(super.tables);
77

88
factory PowerSyncUpdateNotification.fromRawTables(
99
Iterable<String> originalTables) {

packages/powersync/lib/src/schema.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,15 +77,15 @@ class Table {
7777
bool get validName {
7878
return !invalidSqliteCharacters.hasMatch(name) &&
7979
(_viewNameOverride == null ||
80-
!invalidSqliteCharacters.hasMatch(_viewNameOverride!));
80+
!invalidSqliteCharacters.hasMatch(_viewNameOverride));
8181
}
8282

8383
/// Check that there are no issues in the table definition.
8484
void validate() {
8585
if (invalidSqliteCharacters.hasMatch(name)) {
8686
throw AssertionError("Invalid characters in table name: $name");
8787
} else if (_viewNameOverride != null &&
88-
invalidSqliteCharacters.hasMatch(_viewNameOverride!)) {
88+
invalidSqliteCharacters.hasMatch(_viewNameOverride)) {
8989
throw AssertionError(
9090
"Invalid characters in view name: $_viewNameOverride");
9191
}
Lines changed: 1 addition & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,5 @@
1-
import 'dart:math';
2-
import 'dart:typed_data';
3-
41
import 'package:uuid/uuid.dart';
52
import 'package:uuid/data.dart';
63
import 'package:uuid/rng.dart';
74

8-
final _secureRandom = Random.secure();
9-
10-
/// Around 2x faster than CryptoRNG from package:uuid/rng.dart
11-
class FasterCryptoRNG extends RNG {
12-
const FasterCryptoRNG();
13-
14-
@override
15-
Uint8List generateInternal() {
16-
final b = Uint8List(16);
17-
18-
for (var i = 0; i < 16; i += 4) {
19-
var k = _secureRandom.nextInt(1 << 32);
20-
b[i] = k;
21-
b[i + 1] = k >> 8;
22-
b[i + 2] = k >> 16;
23-
b[i + 3] = k >> 24;
24-
}
25-
26-
return b;
27-
}
28-
}
29-
30-
const uuid = Uuid(goptions: GlobalOptions(FasterCryptoRNG()));
5+
final uuid = Uuid(goptions: GlobalOptions(CryptoRNG()));

packages/powersync/pubspec.yaml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,26 +4,26 @@ homepage: https://powersync.com
44
repository: https://github.com/powersync-ja/powersync.dart
55
description: PowerSync Flutter SDK - keep PostgreSQL databases in sync with on-device SQLite databases.
66
environment:
7-
sdk: ">=2.19.1 <4.0.0"
7+
sdk: ^3.2.3
88
dependencies:
99
# Needed because of sqlite3_flutter_libs
1010
flutter:
1111
sdk: flutter
1212

13-
sqlite_async: ^0.5.0
13+
sqlite_async: ^0.6.0
1414
sqlite3_flutter_libs: ^0.5.15
1515
http: ^1.1.0
16-
uuid: ^4.0.0
16+
uuid: ^4.2.0
1717
async: ^2.10.0
1818
logging: ^1.1.1
1919
collection: ^1.17.0
2020

2121
dev_dependencies:
22-
lints: ^2.0.0
23-
test: ^1.21.0
24-
test_api: ^0.6.1
22+
lints: ^3.0.0
23+
test: ^1.25.0
24+
test_api: ^0.7.0
2525
path_provider: ^2.0.13
26-
sqlite3: ^2.1.0
26+
sqlite3: ^2.3.0
2727
shelf: ^1.4.1
2828
shelf_router: ^1.1.4
2929
path: ^1.8.3

0 commit comments

Comments
 (0)