From 434ef9b880159f26f9139908fa27b71e55f97898 Mon Sep 17 00:00:00 2001 From: Nicolas Werner Date: Mon, 21 Oct 2024 12:57:01 +0200 Subject: [PATCH] chore: Upgrade dependencies The library annotations are a new lint and we have no need to specify a custom library name anywhere. The JS annoation on the library also did nothing, since it doesn't default to the library name in dart and only modifies the prefix of functions if you pass in a custom name. The sqflite_common_ffi I removed the upper constraint, which allows us to use a newer version if our dart version is new enough, but I left it at the original version because there is no need to require a higher minimum currently. --- lib/encryption.dart | 2 +- lib/matrix.dart | 2 +- lib/matrix_api_lite.dart | 3 ++- lib/msc_extensions/extension_recent_emoji/recent_emoji.dart | 3 ++- lib/msc_extensions/msc_1236_widgets/msc_1236_widgets.dart | 3 ++- .../msc_2835_uia_login/msc_2835_uia_login.dart | 3 ++- .../msc_3814_dehydrated_devices.dart | 4 +++- lib/src/utils/crypto/subtle.dart | 3 --- pubspec.yaml | 6 +++--- 9 files changed, 16 insertions(+), 13 deletions(-) diff --git a/lib/encryption.dart b/lib/encryption.dart index f534f836..1f3e1e61 100644 --- a/lib/encryption.dart +++ b/lib/encryption.dart @@ -17,7 +17,7 @@ */ /// Matrix SDK encryption specific extension -library encryption; +library; export 'encryption/encryption.dart'; export 'encryption/key_manager.dart'; diff --git a/lib/matrix.dart b/lib/matrix.dart index 6b271890..f7e30e06 100644 --- a/lib/matrix.dart +++ b/lib/matrix.dart @@ -17,7 +17,7 @@ */ /// Matrix SDK written in pure Dart. -library matrix; +library; export 'matrix_api_lite.dart'; diff --git a/lib/matrix_api_lite.dart b/lib/matrix_api_lite.dart index 0a028ca3..2fa9eab5 100644 --- a/lib/matrix_api_lite.dart +++ b/lib/matrix_api_lite.dart @@ -21,7 +21,8 @@ * SOFTWARE. */ -library matrix_api_lite; +/// Lightweight wrapper around the raw matrix API. +library; export 'matrix_api_lite/generated/model.dart'; export 'matrix_api_lite/matrix_api.dart'; diff --git a/lib/msc_extensions/extension_recent_emoji/recent_emoji.dart b/lib/msc_extensions/extension_recent_emoji/recent_emoji.dart index e0811dfc..4f8343e5 100644 --- a/lib/msc_extensions/extension_recent_emoji/recent_emoji.dart +++ b/lib/msc_extensions/extension_recent_emoji/recent_emoji.dart @@ -1,4 +1,5 @@ -library extension_recent_emoji; +/// Extension to synchronize the recently used widgets with Element clients +library; import 'package:matrix/matrix.dart'; diff --git a/lib/msc_extensions/msc_1236_widgets/msc_1236_widgets.dart b/lib/msc_extensions/msc_1236_widgets/msc_1236_widgets.dart index b694e1aa..be0510da 100644 --- a/lib/msc_extensions/msc_1236_widgets/msc_1236_widgets.dart +++ b/lib/msc_extensions/msc_1236_widgets/msc_1236_widgets.dart @@ -1,4 +1,5 @@ -library msc_1236_widgets; +/// Extensions related to widgets in a room. Widgets are not part of the Matrix specification yet. +library; import 'package:matrix/matrix.dart'; diff --git a/lib/msc_extensions/msc_2835_uia_login/msc_2835_uia_login.dart b/lib/msc_extensions/msc_2835_uia_login/msc_2835_uia_login.dart index 00a00f90..2fefc458 100644 --- a/lib/msc_extensions/msc_2835_uia_login/msc_2835_uia_login.dart +++ b/lib/msc_extensions/msc_2835_uia_login/msc_2835_uia_login.dart @@ -1,4 +1,5 @@ -library msc_2835_uia_login; +/// Experimental login method using User Interactive Authentication +library; import 'dart:convert'; diff --git a/lib/msc_extensions/msc_3814_dehydrated_devices/msc_3814_dehydrated_devices.dart b/lib/msc_extensions/msc_3814_dehydrated_devices/msc_3814_dehydrated_devices.dart index 67e5d81f..33a46718 100644 --- a/lib/msc_extensions/msc_3814_dehydrated_devices/msc_3814_dehydrated_devices.dart +++ b/lib/msc_extensions/msc_3814_dehydrated_devices/msc_3814_dehydrated_devices.dart @@ -1,4 +1,6 @@ -library msc_3814_dehydrated_devices; +/// Extensions for the experimental dehydrated devices MSC, which allows +/// receiving encrypted messages while you have no devices signed in. +library; import 'dart:convert'; import 'dart:math'; diff --git a/lib/src/utils/crypto/subtle.dart b/lib/src/utils/crypto/subtle.dart index 34997373..0b679790 100644 --- a/lib/src/utils/crypto/subtle.dart +++ b/lib/src/utils/crypto/subtle.dart @@ -1,9 +1,6 @@ // Copyright (c) 2020 Famedly GmbH // SPDX-License-Identifier: AGPL-3.0-or-later -@JS() -library subtle; - import 'dart:async'; import 'dart:js_util'; import 'dart:typed_data'; diff --git a/pubspec.yaml b/pubspec.yaml index 2aa10995..184b19b2 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -24,7 +24,7 @@ dependencies: image: ^4.0.15 js: ^0.6.3 markdown: ^7.1.1 - mime: ^1.0.0 + mime: ">=1.0.0 <3.0.0" olm: ^2.0.2 random_string: ^2.3.1 sdp_transform: ^0.3.2 @@ -40,7 +40,7 @@ dev_dependencies: enhanced_enum_generator: ^0.2.4 file: ">=6.1.1 <8.0.0" import_sorter: ^4.6.0 - lints: ^4.0.0 + lints: ^5.0.0 path: ^1.9.0 - sqflite_common_ffi: 2.3.2+1 # v2.3.3 doesn't support dart v3.2.x + sqflite_common_ffi: ^2.3.2+1 # sqflite_common_ffi aggressively requires newer dart versions test: ^1.15.7