diff --git a/pkgs/cli_config/CHANGELOG.md b/pkgs/cli_config/CHANGELOG.md index 61fc32ce0..37b4626bc 100644 --- a/pkgs/cli_config/CHANGELOG.md +++ b/pkgs/cli_config/CHANGELOG.md @@ -1,6 +1,7 @@ -## 0.1.2-wip +## 0.1.2 - Add usage docs to the readme. +- Require Dart 3.0. ## 0.1.1 diff --git a/pkgs/cli_config/analysis_options.yaml b/pkgs/cli_config/analysis_options.yaml index 2d557097c..69c31d7be 100644 --- a/pkgs/cli_config/analysis_options.yaml +++ b/pkgs/cli_config/analysis_options.yaml @@ -7,16 +7,7 @@ analyzer: linter: rules: - - always_declare_return_types - - avoid_dynamic_calls - - camel_case_types - - depend_on_referenced_packages - - directives_ordering - prefer_const_declarations - prefer_expression_function_bodies - prefer_final_in_for_each - prefer_final_locals - - prefer_relative_imports - - prefer_single_quotes - - sort_pub_dependencies - - unawaited_futures diff --git a/pkgs/cli_config/lib/src/config.dart b/pkgs/cli_config/lib/src/config.dart index 6c7278f96..e0e74e572 100644 --- a/pkgs/cli_config/lib/src/config.dart +++ b/pkgs/cli_config/lib/src/config.dart @@ -355,7 +355,7 @@ class Config { /// finally the config file. /// /// For cli defines and environment variables, the value must be parseble - /// by [int.parse]. + /// by [core.int.parse]. /// For the config file, it must be an integer. core.int int(String key) { final value = optionalInt(key); @@ -369,7 +369,7 @@ class Config { /// finally the config file. /// /// For cli defines and environment variables, the value must be parseble - /// by [int.parse]. + /// by [core.int.parse]. /// For the config file, it must be an integer or null. core.int? optionalInt(String key) { core.int? value; @@ -385,7 +385,7 @@ class Config { /// finally the config file. /// /// For cli defines and environment variables, the value must be parseble - /// by [double.parse]. + /// by [core.double.parse]. /// For the config file, it must be an double. core.double double(String key) { final value = optionalDouble(key); @@ -399,7 +399,7 @@ class Config { /// finally the config file. /// /// For cli defines and environment variables, the value must be parseble - /// by [double.parse]. + /// by [core.double.parse]. /// For the config file, it must be an double or null. core.double? optionalDouble(String key) { core.double? value; diff --git a/pkgs/cli_config/lib/src/environment_source.dart b/pkgs/cli_config/lib/src/environment_source.dart index 2f7bb8ce0..9cff18ff1 100644 --- a/pkgs/cli_config/lib/src/environment_source.dart +++ b/pkgs/cli_config/lib/src/environment_source.dart @@ -10,7 +10,7 @@ import 'source.dart'; class EnvironmentSource extends Source { /// Configuration options passed in via the [Platform.environment]. /// - /// The keys have been transformed by [EnvironmentParser.parseKey]. + /// The keys have been transformed by `EnvironmentParser.parseKey`. /// /// Environment values are left intact. /// diff --git a/pkgs/cli_config/lib/src/file_parser.dart b/pkgs/cli_config/lib/src/file_parser.dart index fcb1fa968..2a647e537 100644 --- a/pkgs/cli_config/lib/src/file_parser.dart +++ b/pkgs/cli_config/lib/src/file_parser.dart @@ -14,7 +14,8 @@ class FileParser { sourceUrl: sourceUrl, ); if (parsedYaml is! Map) { - throw FormatException('YAML config must be set of key value pairs.'); + throw const FormatException( + 'YAML config must be set of key value pairs.'); } return parseToplevelMap(parsedYaml); } diff --git a/pkgs/cli_config/pubspec.yaml b/pkgs/cli_config/pubspec.yaml index cd85ef1ba..ab64a72fd 100644 --- a/pkgs/cli_config/pubspec.yaml +++ b/pkgs/cli_config/pubspec.yaml @@ -2,16 +2,16 @@ name: cli_config description: >- A library to take config values from configuration files, CLI arguments, and environment variables. -version: 0.1.2-wip +version: 0.1.2 repository: https://github.com/dart-lang/tools/tree/main/pkgs/cli_config environment: - sdk: ">=2.19.3 <4.0.0" + sdk: ^3.0.0 dependencies: args: ^2.4.0 yaml: ^3.1.1 dev_dependencies: - dart_flutter_team_lints: ^1.0.0 + dart_flutter_team_lints: ^2.0.0 test: ^1.21.0