diff --git a/.github/workflows/dart.yml b/.github/workflows/dart.yml index e7607f98..9ee24abb 100644 --- a/.github/workflows/dart.yml +++ b/.github/workflows/dart.yml @@ -1,4 +1,4 @@ -# Created with package:mono_repo v6.6.1 +# Created with package:mono_repo v6.6.2 name: Dart CI on: push: @@ -119,23 +119,23 @@ jobs: if: "always() && steps.test_pkg_pub_upgrade.conclusion == 'success'" working-directory: test_pkg job_004: - name: "smoke_test; linux; Dart 3.0.0; PKG: mono_repo; `dart analyze`" + name: "smoke_test; linux; Dart 3.4.0; PKG: mono_repo; `dart analyze`" runs-on: ubuntu-latest steps: - name: Cache Pub hosted dependencies uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 with: path: "~/.pub-cache/hosted" - key: "os:ubuntu-latest;pub-cache-hosted;sdk:3.0.0;packages:mono_repo;commands:analyze_1" + key: "os:ubuntu-latest;pub-cache-hosted;sdk:3.4.0;packages:mono_repo;commands:analyze_1" restore-keys: | - os:ubuntu-latest;pub-cache-hosted;sdk:3.0.0;packages:mono_repo - os:ubuntu-latest;pub-cache-hosted;sdk:3.0.0 + os:ubuntu-latest;pub-cache-hosted;sdk:3.4.0;packages:mono_repo + os:ubuntu-latest;pub-cache-hosted;sdk:3.4.0 os:ubuntu-latest;pub-cache-hosted os:ubuntu-latest - name: Setup Dart SDK uses: dart-lang/setup-dart@0a8a0fc875eb934c15d08629302413c671d3f672 with: - sdk: "3.0.0" + sdk: "3.4.0" - id: checkout name: Checkout repository uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 @@ -430,23 +430,23 @@ jobs: if: "always() && steps.test_pkg_pub_upgrade.conclusion == 'success'" working-directory: test_pkg job_013: - name: "test; linux; Dart 3.0.0; PKG: mono_repo; `dart test -x yaml -P presubmit --test-randomize-ordering-seed=random`" + name: "test; linux; Dart 3.4.0; PKG: mono_repo; `dart test -x yaml -P presubmit --test-randomize-ordering-seed=random`" runs-on: ubuntu-latest steps: - name: Cache Pub hosted dependencies uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 with: path: "~/.pub-cache/hosted" - key: "os:ubuntu-latest;pub-cache-hosted;sdk:3.0.0;packages:mono_repo;commands:test_0" + key: "os:ubuntu-latest;pub-cache-hosted;sdk:3.4.0;packages:mono_repo;commands:test_0" restore-keys: | - os:ubuntu-latest;pub-cache-hosted;sdk:3.0.0;packages:mono_repo - os:ubuntu-latest;pub-cache-hosted;sdk:3.0.0 + os:ubuntu-latest;pub-cache-hosted;sdk:3.4.0;packages:mono_repo + os:ubuntu-latest;pub-cache-hosted;sdk:3.4.0 os:ubuntu-latest;pub-cache-hosted os:ubuntu-latest - name: Setup Dart SDK uses: dart-lang/setup-dart@0a8a0fc875eb934c15d08629302413c671d3f672 with: - sdk: "3.0.0" + sdk: "3.4.0" - id: checkout name: Checkout repository uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 @@ -779,13 +779,13 @@ jobs: - job_011 - job_012 job_020: - name: "test; windows; Dart 3.0.0; PKG: mono_repo; `dart test -x yaml -P presubmit --test-randomize-ordering-seed=random`" + name: "test; windows; Dart 3.4.0; PKG: mono_repo; `dart test -x yaml -P presubmit --test-randomize-ordering-seed=random`" runs-on: windows-latest steps: - name: Setup Dart SDK uses: dart-lang/setup-dart@0a8a0fc875eb934c15d08629302413c671d3f672 with: - sdk: "3.0.0" + sdk: "3.4.0" - id: checkout name: Checkout repository uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 diff --git a/analysis_options.yaml b/analysis_options.yaml index b0363a4d..67d4d1ab 100644 --- a/analysis_options.yaml +++ b/analysis_options.yaml @@ -34,19 +34,25 @@ linter: - cancel_subscriptions - cascade_invocations - collection_methods_unrelated_type + - combinators_ordering - comment_references + - conditional_uri_does_not_exist - constant_identifier_names - control_flow_in_finally - curly_braces_in_flow_control_structures + - dangling_library_doc_comments - depend_on_referenced_packages - directives_ordering - empty_catches - empty_constructor_bodies - empty_statements + - exhaustive_cases - file_names - hash_and_equals - implementation_imports + - implicit_call_tearoffs - join_return_with_assignment + - library_annotations - library_names - library_prefixes - library_private_types_in_public_api @@ -57,6 +63,7 @@ linter: - no_leading_underscores_for_library_prefixes - no_leading_underscores_for_local_identifiers - no_runtimeType_toString + - no_wildcard_variable_uses - non_constant_identifier_names - null_check_on_nullable_type_parameter - null_closures @@ -97,6 +104,7 @@ linter: - provide_deprecation_message - recursive_getters - require_trailing_commas + - secure_pubspec_urls - slash_for_doc_comments - sort_pub_dependencies - sort_unnamed_constructors_first @@ -104,6 +112,7 @@ linter: - throw_in_finally - type_annotate_public_apis - type_init_formals + - type_literal_in_constant_pattern - unawaited_futures - unnecessary_brace_in_string_interps - unnecessary_const @@ -111,6 +120,8 @@ linter: - unnecessary_getters_setters - unnecessary_lambdas - unnecessary_late + - unnecessary_library_directive + - unnecessary_library_name - unnecessary_new - unnecessary_null_aware_assignments - unnecessary_null_in_if_null_operators @@ -118,13 +129,17 @@ linter: - unnecessary_overrides - unnecessary_parenthesis - unnecessary_statements + - unnecessary_string_escapes - unnecessary_string_interpolations - unnecessary_this + - unnecessary_to_list_in_spreads + - unreachable_from_main - unrelated_type_equality_checks - use_function_type_syntax_for_parameters - use_is_even_rather_than_modulo - use_rethrow_when_possible - use_string_buffers + - use_string_in_part_of_directives - use_super_parameters - valid_regexps - void_checks diff --git a/mono_repo/CHANGELOG.md b/mono_repo/CHANGELOG.md index 14744213..694660b6 100644 --- a/mono_repo/CHANGELOG.md +++ b/mono_repo/CHANGELOG.md @@ -1,3 +1,10 @@ +## 6.6.2 + +- Require Dart `sdk: ^3.4.0`. +- Populate `token` for `codecov` action. + (Requires the user to provide `CODECOV_TOKEN` in their secrets.) +- Update to latest action versions. + ## 6.6.1 - Update to latest action versions. diff --git a/mono_repo/lib/src/commands/github/action_versions.dart b/mono_repo/lib/src/commands/github/action_versions.dart index 6a5c0f1f..c6a97cb6 100644 --- a/mono_repo/lib/src/commands/github/action_versions.dart +++ b/mono_repo/lib/src/commands/github/action_versions.dart @@ -2,9 +2,9 @@ // for details. All rights reserved. Use of this source code is governed by a // BSD-style license that can be found in the LICENSE file. -/// This file is generated, and should not be modified by hand. -/// -/// To regenerate it, run the `tool/generate_action_versions.dart` script. +// This file is generated, and should not be modified by hand. +// +// To regenerate it, run the `tool/generate_action_versions.dart` script. const actionsCacheVersion = '0c45773b623bea8c8e75f6c82b208c3cf94ea4f9'; const dartLangSetupDartVersion = '0a8a0fc875eb934c15d08629302413c671d3f672'; diff --git a/mono_repo/lib/src/mono_config.dart b/mono_repo/lib/src/mono_config.dart index 8067465c..267844ef 100644 --- a/mono_repo/lib/src/mono_config.dart +++ b/mono_repo/lib/src/mono_config.dart @@ -70,7 +70,7 @@ class MonoConfig implements BasicConfiguration { Map parseCI(CI targetCI) { final key = targetCI.toString().split('.').last; - final value = json[key] ?? {}; + final value = json[key] ?? {}; if (value is bool) { if (!value) { diff --git a/mono_repo/lib/src/version.dart b/mono_repo/lib/src/version.dart index 188e1eef..0f2db927 100644 --- a/mono_repo/lib/src/version.dart +++ b/mono_repo/lib/src/version.dart @@ -1,2 +1,2 @@ // Generated code. Do not modify. -const packageVersion = '6.6.1'; +const packageVersion = '6.6.2'; diff --git a/mono_repo/pubspec.yaml b/mono_repo/pubspec.yaml index 91675d82..f2bbe3c9 100644 --- a/mono_repo/pubspec.yaml +++ b/mono_repo/pubspec.yaml @@ -2,7 +2,7 @@ name: mono_repo description: >- CLI tools to make it easier to manage a single source repository containing multiple Dart packages. -version: 6.6.1 +version: 6.6.2 repository: https://github.com/google/mono_repo.dart topics: @@ -10,7 +10,7 @@ topics: - repository-management environment: - sdk: ^3.0.0 + sdk: ^3.4.0 dependencies: args: ^2.0.0 @@ -18,7 +18,7 @@ dependencies: collection: ^1.14.3 graphs: ^2.2.0 io: ^1.0.0 - json_annotation: ^4.8.0 + json_annotation: ^4.9.0 meta: ^1.0.0 path: ^1.4.1 pub_semver: ^2.0.0 diff --git a/mono_repo/test/action_versions_test.dart b/mono_repo/test/action_versions_test.dart index 9a0c0a57..ed4a0419 100644 --- a/mono_repo/test/action_versions_test.dart +++ b/mono_repo/test/action_versions_test.dart @@ -5,6 +5,8 @@ // On windows this test fails for unknown reasons, possibly there are carriage // returns being introduced during formatting. @OnPlatform({'windows': Skip('Broken on windows')}) +library; + import 'dart:io'; import 'package:test/test.dart'; diff --git a/mono_repo/test/ensure_build_test.dart b/mono_repo/test/ensure_build_test.dart index e0f6d517..6a8dc2dd 100644 --- a/mono_repo/test/ensure_build_test.dart +++ b/mono_repo/test/ensure_build_test.dart @@ -5,6 +5,8 @@ @Tags(['presubmit-only']) @OnPlatform({'windows': Skip('newlines are different')}) @Timeout.factor(4) +library; + import 'package:build_verify/build_verify.dart'; import 'package:test/test.dart'; diff --git a/mono_repo/test/github_command_test.dart b/mono_repo/test/github_command_test.dart index 0e0f1ec0..c04f93da 100644 --- a/mono_repo/test/github_command_test.dart +++ b/mono_repo/test/github_command_test.dart @@ -2,6 +2,8 @@ // for details. All rights reserved. Use of this source code is governed by a // BSD-style license that can be found in the LICENSE file. +// ignore_for_file: inference_failure_on_collection_literal + import 'package:mono_repo/src/github_config.dart'; import 'package:mono_repo/src/yaml.dart'; import 'package:term_glyph/term_glyph.dart' as glyph; diff --git a/mono_repo/test/mono_config_test.dart b/mono_repo/test/mono_config_test.dart index 7edbd3aa..fab7f0cb 100644 --- a/mono_repo/test/mono_config_test.dart +++ b/mono_repo/test/mono_config_test.dart @@ -18,7 +18,7 @@ final _dummyPubspec = Pubspec('_example'); String _encodeJson(Object? input) => const JsonEncoder.withIndent(' ').convert(input); -PackageConfig _parse(map) => PackageConfig.parse( +PackageConfig _parse(Object map) => PackageConfig.parse( 'a', _dummyPubspec, map is YamlMap @@ -122,7 +122,7 @@ line 2, column 9: Unsupported value for "sdk". The value for "sdk" must be an ar test('sdk value cannot be empty', () { _expectParseThrows( - {'sdk': []}, + {'sdk': []}, r''' line 2, column 9: Unsupported value for "sdk". The value for "sdk" must be an array with at least one value. ╷ @@ -246,7 +246,7 @@ line 10, column 6: Must have one and only one key of `format`, `analyze`, `test` final monoYaml = { 'sdk': ['stable'], 'stages': [ - {'a': []}, + {'a': []}, ], }; _expectParseThrows( @@ -281,7 +281,7 @@ line 8, column 4: Stages must be a list of maps with exactly one key (the name o test('no keys under a stage', () { final monoYaml = { 'sdk': ['stable'], - 'stages': [{}], + 'stages': [{}], }; _expectParseThrows( monoYaml, diff --git a/mono_repo/test/presubmit_command_test.dart b/mono_repo/test/presubmit_command_test.dart index b0146d95..5e98874e 100644 --- a/mono_repo/test/presubmit_command_test.dart +++ b/mono_repo/test/presubmit_command_test.dart @@ -4,6 +4,8 @@ @Tags(['presubmit-only']) @OnPlatform({'windows': Skip('Cant run shell scripts on windows')}) +library; + import 'dart:io'; import 'package:io/ansi.dart'; diff --git a/mono_repo/test/yaml_write_test.dart b/mono_repo/test/yaml_write_test.dart index 1b48a8c7..10468208 100644 --- a/mono_repo/test/yaml_write_test.dart +++ b/mono_repo/test/yaml_write_test.dart @@ -2,9 +2,11 @@ // for details. All rights reserved. Use of this source code is governed by a // BSD-style license that can be found in the LICENSE file. -// ignore_for_file: lines_longer_than_80_chars, text_direction_code_point_in_literal +// ignore_for_file: lines_longer_than_80_chars, text_direction_code_point_in_literal, inference_failure_on_collection_literal @Tags(['yaml']) +library; + import 'dart:convert'; import 'package:mono_repo/src/yaml.dart'; @@ -181,7 +183,7 @@ final _testItems = [ 'string', '"double quotes"', "'single quotes'", - '\"double\" and \'single\' quotes', + '"double" and \'single\' quotes', '\n', '\t\v\r', 'SDK: stable; PKG: pkg_b; TASKS: chrome tests', @@ -272,19 +274,19 @@ const _stringEscapeSamples = [ 'simple string', "'string with single quotes'", '"string with double quotes"', - '\'With singles and \"doubles\"\'', + '\'With singles and "doubles"\'', r'dollar $igns', r"'single quotes and dollor $ig$'", r"${'nice!'}", '""hello""', r'""$double quotes and dollar signs""', - '\$scary with \'single quotes\' and triple-doubles \"\"\"oh no!', + '\$scary with \'single quotes\' and triple-doubles """oh no!', 'Dollar signs: \$ vs \\\$ vs \\\\\$', 'Slashes \\nice slash\\', 'slashes \\ and dollars \$ with white \n space', "'''triple quoted strings should be\nfine!'''", '"""as with triple-double-quotes"""', - '\"\"\"as with triple-double-quotes even when \'mixed\'\"\"\"', + '"""as with triple-double-quotes even when \'mixed\'"""', ]; /// From https://github.com/minimaxir/big-list-of-naughty-strings via @@ -407,9 +409,9 @@ const _naughtyStrings = [ '"', "''", '""', - '\'\"\'', - '\"\'\'\'\'\"\'\"', - '\"\'\"\'\"\'\'\'\'\"', + '\'"\'', + '"\'\'\'\'"\'"', + '"\'"\'"\'\'\'\'"', '', '', '', @@ -515,8 +517,8 @@ const _naughtyStrings = [ 'javascript:alert(1);', 'javascript:alert(1);', 'javascript:alert(1);', - '\'`\"><\\x3Cscript>javascript:alert(1)', - '\'`\"><\\x00script>javascript:alert(1)', + '\'`"><\\x3Cscript>javascript:alert(1)', + '\'`"><\\x00script>javascript:alert(1)', 'ABC
DEF', 'ABC
DEF', 'ABC
DEF', @@ -601,53 +603,53 @@ const _naughtyStrings = [ 'test', 'test', 'test', - '`\"\'>', - '`\"\'>', - '`\"\'>', - '`\"\'>', - '`\"\'>', - '`\"\'>', - '`\"\'>', - '`\"\'>', - '`\"\'>', - '`\"\'>', - '\"`\'>', - '\"`\'>', - '\"`\'>', - '\"`\'>', - '\"`\'>', - '\"`\'>', - '\"`\'>', - '\"`\'>', - '\"`\'>', - '\"`\'>', - '\"`\'>', - '\"`\'>', - '\"`\'>', - '\"`\'>', - '\"`\'>', - '\"`\'>', - '\"`\'>', - '\"`\'>', - '\"`\'>', - '\"`\'>', - '\"`\'>', - '\"`\'>', - '\"`\'>', - '\"`\'>', - '\"`\'>', - '\"`\'>', - '\"`\'>', - '\"`\'>', - '\"`\'>', - '\"`\'>', - '\"`\'>', - '\"`\'>', - '\"`\'>', - '\"`\'>', - '\"`\'>', - '\"`\'>', - '\"`\'>', + '`"\'>', + '`"\'>', + '`"\'>', + '`"\'>', + '`"\'>', + '`"\'>', + '`"\'>', + '`"\'>', + '`"\'>', + '`"\'>', + '"`\'>', + '"`\'>', + '"`\'>', + '"`\'>', + '"`\'>', + '"`\'>', + '"`\'>', + '"`\'>', + '"`\'>', + '"`\'>', + '"`\'>', + '"`\'>', + '"`\'>', + '"`\'>', + '"`\'>', + '"`\'>', + '"`\'>', + '"`\'>', + '"`\'>', + '"`\'>', + '"`\'>', + '"`\'>', + '"`\'>', + '"`\'>', + '"`\'>', + '"`\'>', + '"`\'>', + '"`\'>', + '"`\'>', + '"`\'>', + '"`\'>', + '"`\'>', + '"`\'>', + '"`\'>', + '"`\'>', + '"`\'>', + '"`\'>', '', '', '', @@ -684,7 +686,7 @@ const _naughtyStrings = [ '', 'XXX', '', - '', + '', '', '<a href=http://foo.bar/#x=`y></a><img alt="`><img src=x:x onerror=javascript:alert(1)></a>">', '<!--[if]><script>javascript:alert(1)</script -->', @@ -693,27 +695,27 @@ const _naughtyStrings = [ '<script src="\\\\%(jscript)s"></script>', '<IMG """><SCRIPT>alert("XSS")</SCRIPT>">', '<IMG SRC=javascript:alert(String.fromCharCode(88,83,83))>', - '<IMG SRC=# onmouseover=\"alert(\'xxs\')\">', - '<IMG SRC= onmouseover=\"alert(\'xxs\')\">', - '<IMG onmouseover=\"alert(\'xxs\')\">', + '<IMG SRC=# onmouseover="alert(\'xxs\')">', + '<IMG SRC= onmouseover="alert(\'xxs\')">', + '<IMG onmouseover="alert(\'xxs\')">', '<IMG SRC=javascript:alert('XSS')>', '<IMG SRC=javascript:alert('XSS')>', '<IMG SRC=javascript:alert('XSS')>', - '<IMG SRC=\"jav ascript:alert(\'XSS\');\">', - '<IMG SRC=\"jav ascript:alert(\'XSS\');\">', - '<IMG SRC=\"jav ascript:alert(\'XSS\');\">', - '<IMG SRC=\"jav ascript:alert(\'XSS\');\">', - 'perl -e \'print \"<IMG SRC=java\\0script:alert(\\\"XSS\\\")>\";\' > out', - '<IMG SRC=\"  javascript:alert(\'XSS\');\">', + '<IMG SRC="jav ascript:alert(\'XSS\');">', + '<IMG SRC="jav ascript:alert(\'XSS\');">', + '<IMG SRC="jav ascript:alert(\'XSS\');">', + '<IMG SRC="jav ascript:alert(\'XSS\');">', + 'perl -e \'print "<IMG SRC=java\\0script:alert(\\"XSS\\")>";\' > out', + '<IMG SRC="  javascript:alert(\'XSS\');">', '<SCRIPT/XSS SRC="http://ha.ckers.org/xss.js"></SCRIPT>', - '<BODY onload!#\$%&()*~+-_.,:;?@[/|\\]^`=alert(\"XSS\")>', + '<BODY onload!#\$%&()*~+-_.,:;?@[/|\\]^`=alert("XSS")>', '<SCRIPT/SRC="http://ha.ckers.org/xss.js"></SCRIPT>', '<<SCRIPT>alert("XSS");//<</SCRIPT>', '<SCRIPT SRC=http://ha.ckers.org/xss.js?< B >', '<SCRIPT SRC=//ha.ckers.org/.j>', - '<IMG SRC=\"javascript:alert(\'XSS\')\"', + '<IMG SRC="javascript:alert(\'XSS\')"', '<iframe src=http://ha.ckers.org/scriptlet.html <', - '\\\";alert(\'XSS\');//', + '\\";alert(\'XSS\');//', '<u oncopy=alert()> Copy me</u>', '<i onwheel=alert(1)> Scroll over me </i>', '<plaintext>', @@ -735,7 +737,7 @@ const _naughtyStrings = [ '`touch /tmp/blns.fail`', r'$(touch /tmp/blns.fail)', '@{[system "touch /tmp/blns.fail"]}', - 'eval(\"puts \'hello world\'\")', + 'eval("puts \'hello world\'")', 'System("ls -al /")', '`ls -al /`', 'Kernel.exec("ls -al /")', diff --git a/mono_repo/tool/generate_action_versions.dart b/mono_repo/tool/generate_action_versions.dart index 5e28c710..2a0763fe 100644 --- a/mono_repo/tool/generate_action_versions.dart +++ b/mono_repo/tool/generate_action_versions.dart @@ -26,9 +26,9 @@ void main(List<String> args) { // for details. All rights reserved. Use of this source code is governed by a // BSD-style license that can be found in the LICENSE file. -/// This file is generated, and should not be modified by hand. -/// -/// To regenerate it, run the `tool/generate_action_versions.dart` script. +// This file is generated, and should not be modified by hand. +// +// To regenerate it, run the `tool/generate_action_versions.dart` script. '''); for (var entry in versions.entries) { diff --git a/tool/ci.sh b/tool/ci.sh index 534d87f9..e6d255fa 100755 --- a/tool/ci.sh +++ b/tool/ci.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Created with package:mono_repo v6.6.1 +# Created with package:mono_repo v6.6.2 # Support built in commands on windows out of the box.