Skip to content

Commit 7da6856

Browse files
geoextradshukertjr
andauthored
fix: Upgrade web_socket_channel for supporting web: ^1.0.0 and therefore WASM compilation on web (#992)
* Upgrade `web_socket_channel` and linting dependency of `realtime_client` * Migrate test in `supabase` package as well * Allow wider version range for compatibility * Upgrade linting for all packages in a non-breaking manner * Update packages/supabase/lib/src/auth_user.dart * Update packages/supabase/pubspec.yaml * Apply suggestions from code review * fix: minor type fix --------- Co-authored-by: Tyler <[email protected]>
1 parent 9655652 commit 7da6856

File tree

17 files changed

+43
-67
lines changed

17 files changed

+43
-67
lines changed

packages/functions_client/pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,5 @@ dependencies:
1313
yet_another_json_isolate: 2.0.1
1414

1515
dev_dependencies:
16-
lints: ^2.1.1
16+
lints: ^3.0.0
1717
test: ^1.16.4

packages/gotrue/lib/src/types/auth_exception.dart

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ class AuthException implements Exception {
2222
}
2323

2424
class AuthPKCEGrantCodeExchangeError extends AuthException {
25-
AuthPKCEGrantCodeExchangeError(String message) : super(message);
25+
AuthPKCEGrantCodeExchangeError(super.message);
2626
}
2727

2828
class AuthSessionMissingException extends AuthException {
@@ -38,8 +38,7 @@ class AuthRetryableFetchException extends AuthException {
3838
}
3939

4040
class AuthApiException extends AuthException {
41-
AuthApiException(String message, {String? statusCode})
42-
: super(message, statusCode: statusCode);
41+
AuthApiException(super.message, {super.statusCode});
4342
}
4443

4544
class AuthUnknownException extends AuthException {

packages/gotrue/lib/src/types/user_attributes.dart

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -77,16 +77,16 @@ class AdminUserAttributes extends UserAttributes {
7777
final String? banDuration;
7878

7979
AdminUserAttributes({
80-
String? email,
81-
String? phone,
82-
String? password,
83-
Object? data,
80+
super.email,
81+
super.phone,
82+
super.password,
83+
super.data,
8484
this.userMetadata,
8585
this.appMetadata,
8686
this.emailConfirm,
8787
this.phoneConfirm,
8888
this.banDuration,
89-
}) : super(email: email, phone: phone, password: password, data: data);
89+
});
9090

9191
@override
9292
Map<String, dynamic> toJson() {

packages/gotrue/pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ dependencies:
2020
dev_dependencies:
2121
dart_jsonwebtoken: ^2.4.1
2222
dotenv: ^4.1.0
23-
lints: ^2.1.1
23+
lints: ^3.0.0
2424
test: ^1.16.4
2525
otp: ^3.1.3
2626

packages/postgrest/lib/src/postgrest_filter_builder.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
part of 'postgrest_builder.dart';
22

33
class PostgrestFilterBuilder<T> extends PostgrestTransformBuilder<T> {
4-
PostgrestFilterBuilder(PostgrestBuilder<T, T, T> builder) : super(builder);
4+
PostgrestFilterBuilder(super.builder);
55

66
@override
77
PostgrestFilterBuilder<T> copyWithUrl(Uri url) =>

packages/postgrest/pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,5 +15,5 @@ dependencies:
1515

1616
dev_dependencies:
1717
collection: ^1.16.0
18-
lints: ^2.1.1
18+
lints: ^3.0.0
1919
test: ^1.21.4

packages/realtime_client/pubspec.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,9 @@ dependencies:
1212
collection: ^1.15.0
1313
http: '>=0.13.0 <2.0.0'
1414
meta: ^1.7.0
15-
web_socket_channel: ^2.3.0
15+
web_socket_channel: '>=2.3.0 <4.0.0'
1616

1717
dev_dependencies:
18-
lints: ^2.1.1
18+
lints: ^3.0.0
1919
mocktail: ^1.0.0
2020
test: ^1.16.5

packages/realtime_client/test/socket_test_stubs.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ class MockChannel extends Mock implements RealtimeChannel {}
1313
class MockPush extends Mock implements Push {}
1414

1515
class SocketWithMockedChannel extends RealtimeClient {
16-
SocketWithMockedChannel(String endPoint) : super(endPoint);
16+
SocketWithMockedChannel(super.endPoint);
1717

1818
Map<String, RealtimeChannel> mockedChannelLooker = {};
1919

packages/storage_client/lib/src/types.dart

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -212,13 +212,10 @@ class SignedUploadURLResponse extends SignedUrl {
212212
final String token;
213213

214214
const SignedUploadURLResponse({
215-
required String signedUrl,
216-
required String path,
215+
required super.signedUrl,
216+
required super.path,
217217
required this.token,
218-
}) : super(
219-
signedUrl: signedUrl,
220-
path: path,
221-
);
218+
});
222219
}
223220

224221
class StorageException implements Exception {

packages/storage_client/pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,5 +17,5 @@ dependencies:
1717

1818
dev_dependencies:
1919
test: ^1.21.4
20-
lints: ^2.1.1
20+
lints: ^3.0.0
2121
path: ^1.8.2

0 commit comments

Comments
 (0)