Skip to content

Commit d786e1e

Browse files
committed
Update dependencies, prepare release
1 parent 85ef110 commit d786e1e

12 files changed

Lines changed: 94 additions & 82 deletions

File tree

‎demos/supabase-anonymous-auth/lib/supabase.dart‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,6 @@ import './app_config.dart';
55
Future<void> loadSupabase() async {
66
await Supabase.initialize(
77
url: AppConfig.supabaseUrl,
8-
anonKey: AppConfig.supabaseAnonKey,
8+
publishableKey: AppConfig.supabaseAnonKey,
99
);
1010
}

‎demos/supabase-edge-function-auth/lib/supabase.dart‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,6 @@ import './app_config.dart';
55
Future<void> loadSupabase() async {
66
await Supabase.initialize(
77
url: AppConfig.supabaseUrl,
8-
anonKey: AppConfig.supabaseAnonKey,
8+
publishableKey: AppConfig.supabaseAnonKey,
99
);
1010
}

‎demos/supabase-simple-chat/lib/supabase.dart‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,6 @@ import './app_config.dart';
55
Future<void> loadSupabase() async {
66
await Supabase.initialize(
77
url: AppConfig.supabaseUrl,
8-
anonKey: AppConfig.supabaseAnonKey,
8+
publishableKey: AppConfig.supabaseAnonKey,
99
);
1010
}

‎demos/supabase-todolist-drift/lib/supabase.dart‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ part 'supabase.g.dart';
1212
Future<void> loadSupabase() async {
1313
await Supabase.initialize(
1414
url: AppConfig.supabaseUrl,
15-
anonKey: AppConfig.supabaseAnonKey,
15+
publishableKey: AppConfig.supabaseAnonKey,
1616
);
1717
}
1818

‎demos/supabase-todolist-optional-sync/lib/supabase.dart‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,6 @@ import './app_config.dart';
55
Future<void> loadSupabase() async {
66
await Supabase.initialize(
77
url: AppConfig.supabaseUrl,
8-
anonKey: AppConfig.supabaseAnonKey,
8+
publishableKey: AppConfig.supabaseAnonKey,
99
);
1010
}

‎demos/supabase-todolist/lib/supabase.dart‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,6 @@ import './app_config.dart';
55
Future<void> loadSupabase() async {
66
await Supabase.initialize(
77
url: AppConfig.supabaseUrl,
8-
anonKey: AppConfig.supabaseAnonKey,
8+
publishableKey: AppConfig.supabaseAnonKey,
99
);
1010
}

‎demos/supabase-trello/lib/protocol/powersync.dart‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@ class PowerSyncClient {
187187
Future<void> _loadSupabase() async {
188188
await Supabase.initialize(
189189
url: dotenv.env['SUPABASE_URL']!,
190-
anonKey: dotenv.env['SUPABASE_ANON_KEY']!,
190+
publishableKey: dotenv.env['SUPABASE_ANON_KEY']!,
191191
);
192192
}
193193

‎packages/powersync/CHANGELOG.md‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
1-
## 2.3.0 (unreleased)
1+
## 2.3.0
22

33
- Add `SyncOptions.httpClient` to `SyncOptions`. It can be set to make PowerSync use a custom HTTP client when connecting to the PowerSync Service.
4+
- Support `sqlite3_web` versions 0.9.x.
45

56
## 2.2.0
67

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
const String libraryVersion = '2.2.0';
1+
const String libraryVersion = '2.3.0';

‎packages/powersync/lib/src/web/worker.dart‎

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ import 'sync_worker.dart';
1414
import 'worker_utils.dart';
1515

1616
final _isSharedWorker = globalContext.has('SharedWorkerGlobalScope');
17+
final _isDedicatedWorker = globalContext.has('DedicatedWorkerGlobalScope');
1718

1819
void main() {
1920
final controller = PowerSyncAsyncSqliteController();
@@ -71,4 +72,14 @@ final class _Environment implements WorkerEnvironment {
7172
final Stream<MessageEvent> incomingMessages;
7273

7374
_Environment(this.connector, this.incomingMessages);
75+
76+
@override
77+
void close() {
78+
// Don't close shared workers when sqlite3_web asks us to: The worker is
79+
// also used for sync, not just for databases. So we shouldn't close it
80+
// just because a database has been closed.
81+
if (_isDedicatedWorker) {
82+
(globalContext as DedicatedWorkerGlobalScope).close();
83+
}
84+
}
7485
}

0 commit comments

Comments
 (0)