Skip to content
This repository has been archived by the owner on Oct 18, 2024. It is now read-only.

update min SDK and deps #155

Merged
merged 1 commit into from
Jan 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/test-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
6 changes: 0 additions & 6 deletions analysis_options.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
6 changes: 3 additions & 3 deletions pubspec.yaml
Original file line number Diff line number Diff line change
@@ -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
24 changes: 12 additions & 12 deletions test/logging_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,7 @@ void main() {

test('children is empty', () {
final a = Logger.detached('a');
expect(a.children, {});
expect(a.children, <Object, Object>{});
});

test('have levels independent of the root level', () {
Expand Down Expand Up @@ -409,7 +409,7 @@ void main() {

test('logging methods store appropriate level', () {
root.level = Level.ALL;
final rootMessages = [];
final rootMessages = <String>[];
root.onRecord.listen((record) {
rootMessages.add('${record.level}: ${record.message}');
});
Expand Down Expand Up @@ -439,7 +439,7 @@ void main() {

test('logging methods store exception', () {
root.level = Level.ALL;
final rootMessages = [];
final rootMessages = <String>[];
root.onRecord.listen((r) {
rootMessages.add('${r.level}: ${r.message} ${r.error}');
});
Expand Down Expand Up @@ -485,9 +485,9 @@ void main() {

test('message logging - no hierarchy', () {
root.level = Level.WARNING;
final rootMessages = [];
final aMessages = [];
final cMessages = [];
final rootMessages = <String>[];
final aMessages = <String>[];
final cMessages = <String>[];
c.onRecord.listen((record) {
cMessages.add('${record.level}: ${record.message}');
});
Expand Down Expand Up @@ -536,9 +536,9 @@ void main() {

b.level = Level.WARNING;

final rootMessages = [];
final aMessages = [];
final cMessages = [];
final rootMessages = <String>[];
final aMessages = <String>[];
final cMessages = <String>[];
c.onRecord.listen((record) {
cMessages.add('${record.level}: ${record.message}');
});
Expand Down Expand Up @@ -602,7 +602,7 @@ void main() {

test('message logging - lazy functions', () {
root.level = Level.INFO;
final messages = [];
final messages = <String>[];
root.onRecord.listen((record) {
messages.add('${record.level}: ${record.message}');
});
Expand All @@ -624,8 +624,8 @@ void main() {

test('message logging - calls toString', () {
root.level = Level.INFO;
final messages = [];
final objects = [];
final messages = <String>[];
final objects = <Object?>[];
final object = Object();
root.onRecord.listen((record) {
messages.add('${record.level}: ${record.message}');
Expand Down