From b197b53458ed1d95c2ed1fdc2bd62af7400d5886 Mon Sep 17 00:00:00 2001 From: gkc Date: Sun, 4 Feb 2024 10:47:11 +0000 Subject: [PATCH 1/2] chore: Upgrade to at_commons new major version 4 chore: Upgrade other dependencies to latest of the same major version --- packages/at_contact/CHANGELOG.md | 2 ++ packages/at_contact/lib/at_contact.dart | 3 --- packages/at_contact/lib/src/at_contacts_impl.dart | 13 ++++++------- packages/at_contact/pubspec.yaml | 12 ++++++------ 4 files changed, 14 insertions(+), 16 deletions(-) diff --git a/packages/at_contact/CHANGELOG.md b/packages/at_contact/CHANGELOG.md index 1fa7de71..8f53849b 100644 --- a/packages/at_contact/CHANGELOG.md +++ b/packages/at_contact/CHANGELOG.md @@ -1,3 +1,5 @@ +## 3.0.9 +- **chore**: Upgrade to at_commons new major version 4 ## 3.0.8 - **Build**: Fix lint warnings from Dart 3 ## 3.0.7 diff --git a/packages/at_contact/lib/at_contact.dart b/packages/at_contact/lib/at_contact.dart index 4cee6747..a90cfc3c 100644 --- a/packages/at_contact/lib/at_contact.dart +++ b/packages/at_contact/lib/at_contact.dart @@ -1,6 +1,3 @@ -/// Support for doing something awesome. -/// -/// More dartdocs go here. library at_contact; export 'package:at_contact/src/at_contacts_impl.dart'; diff --git a/packages/at_contact/lib/src/at_contacts_impl.dart b/packages/at_contact/lib/src/at_contacts_impl.dart index 1affc996..ca6788c1 100644 --- a/packages/at_contact/lib/src/at_contacts_impl.dart +++ b/packages/at_contact/lib/src/at_contacts_impl.dart @@ -146,12 +146,12 @@ class AtContactsImpl implements AtContactsLibrary { .toLowerCase(); var scanList = await atClient!.getAtKeys(regex: regex); scanList.retainWhere((scanKeys) => - !scanKeys.key!.contains(AppConstants.GROUPS_LIST_KEY_PREFIX)); + !scanKeys.key.contains(AppConstants.GROUPS_LIST_KEY_PREFIX)); if (scanList.isEmpty) { return contactList; } for (final key in scanList) { - var atsign = reduceKey(key.key!); + var atsign = reduceKey(key.key); var atKey = _formAtKeyFromScanKeys(key); AtContact? contact; try { @@ -244,8 +244,7 @@ class AtContactsImpl implements AtContactsLibrary { var groupId = atGroup.groupId; var group = await getGroup(groupId); if (group == null) { - throw GroupNotExistsException( - 'No Group exists with Id $groupId'); + throw GroupNotExistsException('No Group exists with Id $groupId'); } var atKey = _formKey(KeyType.group, key: atGroup.groupId!); //update atGroup @@ -509,7 +508,7 @@ class AtContactsImpl implements AtContactsLibrary { ///Returns `true` if key doesn't contain library namespace. bool _isOldKey(AtKey atKey) { - return !atKey.key!.contains(AppConstants.LIBRARY_NAMESPACE); + return !atKey.key.contains(AppConstants.LIBRARY_NAMESPACE); } String reduceKey(String key) { @@ -601,8 +600,8 @@ class AtContactsImpl implements AtContactsLibrary { ///appends namespace for new format keys from scan key AtKey _formAtKeyFromScanKeys(AtKey key) { var atKey = key; - atKey.key = key.key! + '.' + key.namespace!; - atKey.metadata!.namespaceAware = false; + atKey.key = key.key + '.' + key.namespace!; + atKey.metadata.namespaceAware = false; return atKey; } diff --git a/packages/at_contact/pubspec.yaml b/packages/at_contact/pubspec.yaml index 9ba6eb14..bb8b241c 100644 --- a/packages/at_contact/pubspec.yaml +++ b/packages/at_contact/pubspec.yaml @@ -2,18 +2,18 @@ name: at_contact description: A Dart library for managing contact data that developers can use for their applications. documentation: https://docs.atsign.com/ -version: 3.0.8 +version: 3.0.9 repository: https://github.com/atsign-foundation/at_libraries homepage: https://atsign.com environment: sdk: '>=2.12.0 <4.0.0' dependencies: - intl: ^0.17.0 - at_client: ^3.0.27 - at_commons: ^3.0.17 - at_utils: ^3.0.10 - uuid: ^3.0.4 + intl: ^0.19.0 + at_client: ^3.0.74 + at_commons: ^4.0.1 + at_utils: ^3.0.16 + uuid: ^3.0.7 dev_dependencies: lints: ^1.0.1 From c6d586a0e468b8bd74a5b928eaff81de6b1e0ed9 Mon Sep 17 00:00:00 2001 From: gkc Date: Sun, 4 Feb 2024 11:30:49 +0000 Subject: [PATCH 2/2] chore: at_contact: change at_commons dependency to ^4.0.0 chore: at_contact: change at_client dependency to ^3.0.73 --- packages/at_contact/pubspec.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/at_contact/pubspec.yaml b/packages/at_contact/pubspec.yaml index bb8b241c..f45986fd 100644 --- a/packages/at_contact/pubspec.yaml +++ b/packages/at_contact/pubspec.yaml @@ -10,8 +10,8 @@ environment: dependencies: intl: ^0.19.0 - at_client: ^3.0.74 - at_commons: ^4.0.1 + at_client: ^3.0.73 + at_commons: ^4.0.0 at_utils: ^3.0.16 uuid: ^3.0.7