Skip to content

Commit

Permalink
Merge pull request #512 from atsign-foundation/gkc/chore/upgrade-at-c…
Browse files Browse the repository at this point in the history
…ontact-to-at-commons-4

chore: Upgrade at_contact to at_commons new major version 4
  • Loading branch information
gkc authored Feb 6, 2024
2 parents 237f42f + c6d586a commit 5d85029
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 16 deletions.
2 changes: 2 additions & 0 deletions packages/at_contact/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down
3 changes: 0 additions & 3 deletions packages/at_contact/lib/at_contact.dart
Original file line number Diff line number Diff line change
@@ -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';
Expand Down
13 changes: 6 additions & 7 deletions packages/at_contact/lib/src/at_contacts_impl.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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) {
Expand Down Expand Up @@ -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;
}

Expand Down
12 changes: 6 additions & 6 deletions packages/at_contact/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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.73
at_commons: ^4.0.0
at_utils: ^3.0.16
uuid: ^3.0.7

dev_dependencies:
lints: ^1.0.1
Expand Down

0 comments on commit 5d85029

Please sign in to comment.