diff --git a/.github/workflows/test-package.yml b/.github/workflows/test-package.yml index 1535d97..1e34fae 100644 --- a/.github/workflows/test-package.yml +++ b/.github/workflows/test-package.yml @@ -19,7 +19,7 @@ jobs: strategy: fail-fast: false matrix: - sdk: [stable] + sdk: [dev] steps: - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 - uses: dart-lang/setup-dart@ca7e6fee45ffbd82b555a7ebfc236d2c86439f5b @@ -44,7 +44,7 @@ jobs: matrix: # Add macos-latest and/or windows-latest if relevant for this package. os: [ubuntu-latest] - sdk: [2.19.0, stable, beta] + sdk: [3.2, dev] steps: - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 - uses: dart-lang/setup-dart@ca7e6fee45ffbd82b555a7ebfc236d2c86439f5b diff --git a/CHANGELOG.md b/CHANGELOG.md index 872f9f0..41843d8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +## 1.2.1-wip + +* Require Dart 3.2 + ## 1.2.0 * Add notification when the log level is changed. Logger `onLevelChanged` broadcasts a stream of level values. diff --git a/analysis_options.yaml b/analysis_options.yaml index a0097f6..7c004e0 100644 --- a/analysis_options.yaml +++ b/analysis_options.yaml @@ -11,27 +11,21 @@ linter: - avoid_classes_with_only_static_members - avoid_private_typedef_functions - avoid_redundant_argument_values - - avoid_returning_null_for_future - avoid_returning_this - avoid_unused_constructor_parameters - avoid_void_async - cancel_subscriptions - - comment_references - join_return_with_assignment - literal_only_boolean_expressions - missing_whitespace_between_adjacent_strings - no_adjacent_strings_in_list - no_runtimeType_toString - package_api_docs - - prefer_const_constructors - prefer_const_declarations - prefer_expression_function_bodies - prefer_final_locals - - prefer_relative_imports - - test_types_in_equals - unnecessary_await_in_return - unnecessary_raw_strings - use_if_null_to_convert_nulls_to_bools - use_raw_strings - use_string_buffers - - use_super_parameters diff --git a/pubspec.yaml b/pubspec.yaml index 3a5eebb..6d05e98 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,13 +1,13 @@ name: logging -version: 1.2.0 +version: 1.2.1-wip description: >- Provides APIs for debugging and error logging, similar to loggers in other languages, such as the Closure JS Logger and java.util.logging.Logger. repository: https://github.com/dart-lang/logging environment: - sdk: '>=2.19.0 <4.0.0' + sdk: ^3.2.0 dev_dependencies: - dart_flutter_team_lints: ^1.0.0 + dart_flutter_team_lints: ^2.0.0 test: ^1.16.0 diff --git a/test/logging_test.dart b/test/logging_test.dart index 0c9bd66..7edabb0 100644 --- a/test/logging_test.dart +++ b/test/logging_test.dart @@ -240,7 +240,7 @@ void main() { test('children is empty', () { final a = Logger.detached('a'); - expect(a.children, {}); + expect(a.children, {}); }); test('have levels independent of the root level', () { @@ -409,7 +409,7 @@ void main() { test('logging methods store appropriate level', () { root.level = Level.ALL; - final rootMessages = []; + final rootMessages = []; root.onRecord.listen((record) { rootMessages.add('${record.level}: ${record.message}'); }); @@ -439,7 +439,7 @@ void main() { test('logging methods store exception', () { root.level = Level.ALL; - final rootMessages = []; + final rootMessages = []; root.onRecord.listen((r) { rootMessages.add('${r.level}: ${r.message} ${r.error}'); }); @@ -485,9 +485,9 @@ void main() { test('message logging - no hierarchy', () { root.level = Level.WARNING; - final rootMessages = []; - final aMessages = []; - final cMessages = []; + final rootMessages = []; + final aMessages = []; + final cMessages = []; c.onRecord.listen((record) { cMessages.add('${record.level}: ${record.message}'); }); @@ -536,9 +536,9 @@ void main() { b.level = Level.WARNING; - final rootMessages = []; - final aMessages = []; - final cMessages = []; + final rootMessages = []; + final aMessages = []; + final cMessages = []; c.onRecord.listen((record) { cMessages.add('${record.level}: ${record.message}'); }); @@ -602,7 +602,7 @@ void main() { test('message logging - lazy functions', () { root.level = Level.INFO; - final messages = []; + final messages = []; root.onRecord.listen((record) { messages.add('${record.level}: ${record.message}'); }); @@ -624,8 +624,8 @@ void main() { test('message logging - calls toString', () { root.level = Level.INFO; - final messages = []; - final objects = []; + final messages = []; + final objects = []; final object = Object(); root.onRecord.listen((record) { messages.add('${record.level}: ${record.message}');