From db6139b6c59a9142d3aa0ec763e7b5e05742bd89 Mon Sep 17 00:00:00 2001 From: Sitaram Date: Wed, 15 Jun 2022 08:55:16 +0530 Subject: [PATCH] build: upgrade at_commons version to 3.0.17 --- at_commons/CHANGELOG.md | 2 ++ at_commons/lib/src/exception/at_exception_manager.dart | 4 ++-- at_commons/lib/src/exception/at_exception_stack.dart | 2 +- at_commons/lib/src/exception/at_exceptions.dart | 3 +-- at_commons/pubspec.yaml | 2 +- at_commons/test/at_key_test.dart | 10 ++++------ 6 files changed, 11 insertions(+), 12 deletions(-) diff --git a/at_commons/CHANGELOG.md b/at_commons/CHANGELOG.md index 5a587a77..6ab23538 100644 --- a/at_commons/CHANGELOG.md +++ b/at_commons/CHANGELOG.md @@ -1,3 +1,5 @@ +## 3.0.17 +- Introduce exception hierarchy and new AtException subclasses ## 3.0.16 - Hide at_client_exceptions.dart to prevent at_client_exception being referred from at_commons ## 3.0.15 diff --git a/at_commons/lib/src/exception/at_exception_manager.dart b/at_commons/lib/src/exception/at_exception_manager.dart index 24d97cba..ecc5a1b3 100644 --- a/at_commons/lib/src/exception/at_exception_manager.dart +++ b/at_commons/lib/src/exception/at_exception_manager.dart @@ -9,7 +9,7 @@ class AtExceptionManager { return atException; } // Else wrap the atException into AtClientException and return. - return (AtClientException.message(atException.message))..fromException(atException); - + return (AtClientException.message(atException.message)) + ..fromException(atException); } } diff --git a/at_commons/lib/src/exception/at_exception_stack.dart b/at_commons/lib/src/exception/at_exception_stack.dart index 14ac8ad8..335f37c1 100644 --- a/at_commons/lib/src/exception/at_exception_stack.dart +++ b/at_commons/lib/src/exception/at_exception_stack.dart @@ -37,7 +37,7 @@ class AtExceptionStack implements Comparable { if (intent == Intent.shareData) { return 'Failed to share data'; } - if(intent == Intent.decryptData) { + if (intent == Intent.decryptData) { return 'Failed to decrypt the data'; } return 'Failed to notify data'; diff --git a/at_commons/lib/src/exception/at_exceptions.dart b/at_commons/lib/src/exception/at_exceptions.dart index faf8c86a..1f308201 100644 --- a/at_commons/lib/src/exception/at_exceptions.dart +++ b/at_commons/lib/src/exception/at_exceptions.dart @@ -4,9 +4,8 @@ import 'package:at_commons/src/keystore/at_key.dart'; /// The class [AtException] and its subclasses represents various exceptions that can arise /// while using the @ protocol. class AtException implements Exception { - // ignore: prefer_typing_uninitialized_variables /// Represents error message that details the cause of the exception - var message; + String message; Intent? intent; diff --git a/at_commons/pubspec.yaml b/at_commons/pubspec.yaml index d66d305e..2812e79b 100644 --- a/at_commons/pubspec.yaml +++ b/at_commons/pubspec.yaml @@ -1,6 +1,6 @@ name: at_commons description: A library of Dart and Flutter utility classes that are used across other components of the @‎platform. -version: 3.0.16 +version: 3.0.17 repository: https://github.com/atsign-foundation/at_tools homepage: https://atsign.dev diff --git a/at_commons/test/at_key_test.dart b/at_commons/test/at_key_test.dart index f0a39ad6..fcea02e0 100644 --- a/at_commons/test/at_key_test.dart +++ b/at_commons/test/at_key_test.dart @@ -211,8 +211,7 @@ void main() { group('A group of tests to validate the public keys', () { test('validate a public key with namespace', () { var validationResult = AtKeyValidators.get().validate( - 'public:phone.me@alice', - ValidationContext()..atSign = '@alice'); + 'public:phone.me@alice', ValidationContext()..atSign = '@alice'); expect(validationResult.isValid, true); }); @@ -228,8 +227,8 @@ void main() { group('A group of tests to validate the self keys', () { test('validate a self key with namespace', () { - var validationResult = AtKeyValidators.get().validate( - 'phone.me@alice', ValidationContext()..atSign = '@alice'); + var validationResult = AtKeyValidators.get() + .validate('phone.me@alice', ValidationContext()..atSign = '@alice'); expect(validationResult.isValid, true); }); @@ -255,8 +254,7 @@ void main() { group('A group of tests to validate the shared keys', () { test('validate a shared key with namespace', () { var validationResult = AtKeyValidators.get().validate( - '@bob:phone.me@alice', - ValidationContext()..atSign = '@alice'); + '@bob:phone.me@alice', ValidationContext()..atSign = '@alice'); expect(validationResult.isValid, true); });