From 5890417833ed847be39bdcf208aa59da49acc61d Mon Sep 17 00:00:00 2001 From: Parker Lougheed Date: Fri, 10 May 2024 13:08:07 -0500 Subject: [PATCH] Update dart_flutter_team_lints to depend on lints v4 (#263) * Update dart_flutter_team_lints to depend on lints v4 * Update other SDK constraints --- .github/workflows/dart.yml | 44 +++++++++---------- pkgs/blast_repo/pubspec.yaml | 2 +- pkgs/corpus/pubspec.yaml | 2 +- pkgs/dart_flutter_team_lints/CHANGELOG.md | 6 ++- .../lib/analysis_options.yaml | 1 - pkgs/dart_flutter_team_lints/pubspec.yaml | 6 +-- pkgs/firehose/pubspec.yaml | 2 +- .../base_test_repo/pkgs/package1/pubspec.yaml | 2 +- .../base_test_repo/pkgs/package2/pubspec.yaml | 2 +- .../base_test_repo/pkgs/package3/pubspec.yaml | 2 +- .../base_test_repo/pkgs/package5/pubspec.yaml | 2 +- .../test_repo/pkgs/package1/pubspec.yaml | 2 +- .../test_repo/pkgs/package2/pubspec.yaml | 2 +- .../test_repo/pkgs/package3/pubspec.yaml | 2 +- .../test_repo/pkgs/package5/pubspec.yaml | 2 +- pkgs/repo_manage/pubspec.yaml | 2 +- tool/ci.sh | 18 +++----- 17 files changed, 49 insertions(+), 50 deletions(-) diff --git a/.github/workflows/dart.yml b/.github/workflows/dart.yml index 9b5b5fb5..1d04e96f 100644 --- a/.github/workflows/dart.yml +++ b/.github/workflows/dart.yml @@ -1,4 +1,4 @@ -# Created with package:mono_repo v6.6.0 +# Created with package:mono_repo v6.6.1 name: Dart CI on: push: @@ -35,27 +35,27 @@ jobs: name: Checkout repository uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b - name: mono_repo self validate - run: dart pub global activate mono_repo 6.6.0 + run: dart pub global activate mono_repo 6.6.1 - name: mono_repo self validate run: dart pub global run mono_repo generate --validate job_002: - name: "analyze_and_format; Dart 3.0.0; PKGS: pkgs/corpus, pkgs/dart_flutter_team_lints, pkgs/firehose, pkgs/repo_manage; `dart analyze --fatal-infos .`" + name: "analyze_and_format; Dart 3.1.0; PKGS: pkgs/corpus, pkgs/dart_flutter_team_lints, pkgs/firehose, pkgs/repo_manage; `dart analyze --fatal-infos .`" 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:pkgs/corpus-pkgs/dart_flutter_team_lints-pkgs/firehose-pkgs/repo_manage;commands:analyze" + key: "os:ubuntu-latest;pub-cache-hosted;sdk:3.1.0;packages:pkgs/corpus-pkgs/dart_flutter_team_lints-pkgs/firehose-pkgs/repo_manage;commands:analyze" restore-keys: | - os:ubuntu-latest;pub-cache-hosted;sdk:3.0.0;packages:pkgs/corpus-pkgs/dart_flutter_team_lints-pkgs/firehose-pkgs/repo_manage - os:ubuntu-latest;pub-cache-hosted;sdk:3.0.0 + os:ubuntu-latest;pub-cache-hosted;sdk:3.1.0;packages:pkgs/corpus-pkgs/dart_flutter_team_lints-pkgs/firehose-pkgs/repo_manage + os:ubuntu-latest;pub-cache-hosted;sdk:3.1.0 os:ubuntu-latest;pub-cache-hosted os:ubuntu-latest - name: Setup Dart SDK uses: dart-lang/setup-dart@f0ead981b4d9a35b37f30d36160575d60931ec30 with: - sdk: "3.0.0" + sdk: "3.1.0" - id: checkout name: Checkout repository uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b @@ -216,23 +216,23 @@ jobs: needs: - job_001 job_005: - name: "unit_test; Dart 3.0.0; PKG: pkgs/corpus; `dart test`" + name: "unit_test; Dart 3.1.0; PKG: pkgs/corpus; `dart test`" 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:pkgs/corpus;commands:test_1" + key: "os:ubuntu-latest;pub-cache-hosted;sdk:3.1.0;packages:pkgs/corpus;commands:test_1" restore-keys: | - os:ubuntu-latest;pub-cache-hosted;sdk:3.0.0;packages:pkgs/corpus - os:ubuntu-latest;pub-cache-hosted;sdk:3.0.0 + os:ubuntu-latest;pub-cache-hosted;sdk:3.1.0;packages:pkgs/corpus + os:ubuntu-latest;pub-cache-hosted;sdk:3.1.0 os:ubuntu-latest;pub-cache-hosted os:ubuntu-latest - name: Setup Dart SDK uses: dart-lang/setup-dart@f0ead981b4d9a35b37f30d36160575d60931ec30 with: - sdk: "3.0.0" + sdk: "3.1.0" - id: checkout name: Checkout repository uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b @@ -251,23 +251,23 @@ jobs: - job_003 - job_004 job_006: - name: "unit_test; Dart 3.0.0; PKG: pkgs/dart_flutter_team_lints; `dart test`" + name: "unit_test; Dart 3.1.0; PKG: pkgs/dart_flutter_team_lints; `dart test`" 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:pkgs/dart_flutter_team_lints;commands:test_1" + key: "os:ubuntu-latest;pub-cache-hosted;sdk:3.1.0;packages:pkgs/dart_flutter_team_lints;commands:test_1" restore-keys: | - os:ubuntu-latest;pub-cache-hosted;sdk:3.0.0;packages:pkgs/dart_flutter_team_lints - os:ubuntu-latest;pub-cache-hosted;sdk:3.0.0 + os:ubuntu-latest;pub-cache-hosted;sdk:3.1.0;packages:pkgs/dart_flutter_team_lints + os:ubuntu-latest;pub-cache-hosted;sdk:3.1.0 os:ubuntu-latest;pub-cache-hosted os:ubuntu-latest - name: Setup Dart SDK uses: dart-lang/setup-dart@f0ead981b4d9a35b37f30d36160575d60931ec30 with: - sdk: "3.0.0" + sdk: "3.1.0" - id: checkout name: Checkout repository uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b @@ -286,23 +286,23 @@ jobs: - job_003 - job_004 job_007: - name: "unit_test; Dart 3.0.0; PKG: pkgs/firehose; `dart test`" + name: "unit_test; Dart 3.1.0; PKG: pkgs/firehose; `dart test`" 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:pkgs/firehose;commands:test_1" + key: "os:ubuntu-latest;pub-cache-hosted;sdk:3.1.0;packages:pkgs/firehose;commands:test_1" restore-keys: | - os:ubuntu-latest;pub-cache-hosted;sdk:3.0.0;packages:pkgs/firehose - os:ubuntu-latest;pub-cache-hosted;sdk:3.0.0 + os:ubuntu-latest;pub-cache-hosted;sdk:3.1.0;packages:pkgs/firehose + os:ubuntu-latest;pub-cache-hosted;sdk:3.1.0 os:ubuntu-latest;pub-cache-hosted os:ubuntu-latest - name: Setup Dart SDK uses: dart-lang/setup-dart@f0ead981b4d9a35b37f30d36160575d60931ec30 with: - sdk: "3.0.0" + sdk: "3.1.0" - id: checkout name: Checkout repository uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b diff --git a/pkgs/blast_repo/pubspec.yaml b/pkgs/blast_repo/pubspec.yaml index ede638c1..6c2522ec 100644 --- a/pkgs/blast_repo/pubspec.yaml +++ b/pkgs/blast_repo/pubspec.yaml @@ -4,7 +4,7 @@ description: A tool to bulk validate and fix GitHub repos. publish_to: none environment: - sdk: ^3.0.0 + sdk: ^3.1.0 dependencies: args: ^2.3.1 diff --git a/pkgs/corpus/pubspec.yaml b/pkgs/corpus/pubspec.yaml index cc021cc8..e27019c5 100644 --- a/pkgs/corpus/pubspec.yaml +++ b/pkgs/corpus/pubspec.yaml @@ -4,7 +4,7 @@ description: A tool to calculate the API usage for a package. publish_to: none environment: - sdk: ^3.0.0 + sdk: ^3.1.0 dependencies: analyzer: ^6.0.0 diff --git a/pkgs/dart_flutter_team_lints/CHANGELOG.md b/pkgs/dart_flutter_team_lints/CHANGELOG.md index 1eafe6c3..ba873720 100644 --- a/pkgs/dart_flutter_team_lints/CHANGELOG.md +++ b/pkgs/dart_flutter_team_lints/CHANGELOG.md @@ -1,4 +1,8 @@ -## 2.1.2-wip +## 3.0.0 + +- Depend on the `4.0.0` release of `package:lints` adding + the `no_wildcard_variable_uses` lint. +- Require Dart `3.1.0` or later. ## 2.1.1 diff --git a/pkgs/dart_flutter_team_lints/lib/analysis_options.yaml b/pkgs/dart_flutter_team_lints/lib/analysis_options.yaml index 75dfb966..5a383334 100644 --- a/pkgs/dart_flutter_team_lints/lib/analysis_options.yaml +++ b/pkgs/dart_flutter_team_lints/lib/analysis_options.yaml @@ -25,7 +25,6 @@ linter: # consistency - combinators_ordering - directives_ordering - - library_annotations - lines_longer_than_80_chars - omit_local_variable_types - prefer_asserts_in_initializer_lists diff --git a/pkgs/dart_flutter_team_lints/pubspec.yaml b/pkgs/dart_flutter_team_lints/pubspec.yaml index 6f1ef9f8..c9d437e4 100644 --- a/pkgs/dart_flutter_team_lints/pubspec.yaml +++ b/pkgs/dart_flutter_team_lints/pubspec.yaml @@ -1,13 +1,13 @@ name: dart_flutter_team_lints description: An analysis rule set used by the Dart and Flutter teams. -version: 2.1.2-wip +version: 3.0.0 repository: https://github.com/dart-lang/ecosystem/tree/main/pkgs/dart_flutter_team_lints environment: - sdk: ^3.0.0 + sdk: ^3.1.0 dependencies: - lints: ^3.0.0 + lints: ^4.0.0 dev_dependencies: checks: ^0.3.0 diff --git a/pkgs/firehose/pubspec.yaml b/pkgs/firehose/pubspec.yaml index e7ec8bd9..90cda460 100644 --- a/pkgs/firehose/pubspec.yaml +++ b/pkgs/firehose/pubspec.yaml @@ -4,7 +4,7 @@ version: 0.9.0 repository: https://github.com/dart-lang/ecosystem/tree/main/pkgs/firehose environment: - sdk: ^3.0.0 + sdk: ^3.1.0 executables: firehose: firehose diff --git a/pkgs/firehose/test_data/base_test_repo/pkgs/package1/pubspec.yaml b/pkgs/firehose/test_data/base_test_repo/pkgs/package1/pubspec.yaml index fe566c25..20de718f 100644 --- a/pkgs/firehose/test_data/base_test_repo/pkgs/package1/pubspec.yaml +++ b/pkgs/firehose/test_data/base_test_repo/pkgs/package1/pubspec.yaml @@ -4,7 +4,7 @@ version: 1.0.0 # repository: https://github.com/my_org/my_repo environment: - sdk: ^3.0.0 + sdk: ^3.1.0 # Add regular dependencies here. dependencies: diff --git a/pkgs/firehose/test_data/base_test_repo/pkgs/package2/pubspec.yaml b/pkgs/firehose/test_data/base_test_repo/pkgs/package2/pubspec.yaml index 4f148c60..01e603f6 100644 --- a/pkgs/firehose/test_data/base_test_repo/pkgs/package2/pubspec.yaml +++ b/pkgs/firehose/test_data/base_test_repo/pkgs/package2/pubspec.yaml @@ -4,7 +4,7 @@ version: 1.0.0 # repository: https://github.com/my_org/my_repo environment: - sdk: ^3.0.0 + sdk: ^3.1.0 # Add regular dependencies here. dependencies: diff --git a/pkgs/firehose/test_data/base_test_repo/pkgs/package3/pubspec.yaml b/pkgs/firehose/test_data/base_test_repo/pkgs/package3/pubspec.yaml index 2454f72c..e751a604 100644 --- a/pkgs/firehose/test_data/base_test_repo/pkgs/package3/pubspec.yaml +++ b/pkgs/firehose/test_data/base_test_repo/pkgs/package3/pubspec.yaml @@ -4,7 +4,7 @@ version: 1.0.0 # repository: https://github.com/my_org/my_repo environment: - sdk: ^3.0.0 + sdk: ^3.1.0 # Add regular dependencies here. dependencies: diff --git a/pkgs/firehose/test_data/base_test_repo/pkgs/package5/pubspec.yaml b/pkgs/firehose/test_data/base_test_repo/pkgs/package5/pubspec.yaml index 014e843e..679972b4 100644 --- a/pkgs/firehose/test_data/base_test_repo/pkgs/package5/pubspec.yaml +++ b/pkgs/firehose/test_data/base_test_repo/pkgs/package5/pubspec.yaml @@ -4,7 +4,7 @@ version: 1.0.0 # repository: https://github.com/my_org/my_repo environment: - sdk: ^3.0.0 + sdk: ^3.1.0 # Add regular dependencies here. dependencies: diff --git a/pkgs/firehose/test_data/test_repo/pkgs/package1/pubspec.yaml b/pkgs/firehose/test_data/test_repo/pkgs/package1/pubspec.yaml index fe566c25..20de718f 100644 --- a/pkgs/firehose/test_data/test_repo/pkgs/package1/pubspec.yaml +++ b/pkgs/firehose/test_data/test_repo/pkgs/package1/pubspec.yaml @@ -4,7 +4,7 @@ version: 1.0.0 # repository: https://github.com/my_org/my_repo environment: - sdk: ^3.0.0 + sdk: ^3.1.0 # Add regular dependencies here. dependencies: diff --git a/pkgs/firehose/test_data/test_repo/pkgs/package2/pubspec.yaml b/pkgs/firehose/test_data/test_repo/pkgs/package2/pubspec.yaml index 4f148c60..01e603f6 100644 --- a/pkgs/firehose/test_data/test_repo/pkgs/package2/pubspec.yaml +++ b/pkgs/firehose/test_data/test_repo/pkgs/package2/pubspec.yaml @@ -4,7 +4,7 @@ version: 1.0.0 # repository: https://github.com/my_org/my_repo environment: - sdk: ^3.0.0 + sdk: ^3.1.0 # Add regular dependencies here. dependencies: diff --git a/pkgs/firehose/test_data/test_repo/pkgs/package3/pubspec.yaml b/pkgs/firehose/test_data/test_repo/pkgs/package3/pubspec.yaml index 2454f72c..e751a604 100644 --- a/pkgs/firehose/test_data/test_repo/pkgs/package3/pubspec.yaml +++ b/pkgs/firehose/test_data/test_repo/pkgs/package3/pubspec.yaml @@ -4,7 +4,7 @@ version: 1.0.0 # repository: https://github.com/my_org/my_repo environment: - sdk: ^3.0.0 + sdk: ^3.1.0 # Add regular dependencies here. dependencies: diff --git a/pkgs/firehose/test_data/test_repo/pkgs/package5/pubspec.yaml b/pkgs/firehose/test_data/test_repo/pkgs/package5/pubspec.yaml index 10fbd15d..8a530ee7 100644 --- a/pkgs/firehose/test_data/test_repo/pkgs/package5/pubspec.yaml +++ b/pkgs/firehose/test_data/test_repo/pkgs/package5/pubspec.yaml @@ -4,7 +4,7 @@ version: 1.2.0 # repository: https://github.com/my_org/my_repo environment: - sdk: ^3.0.0 + sdk: ^3.1.0 # Add regular dependencies here. dependencies: diff --git a/pkgs/repo_manage/pubspec.yaml b/pkgs/repo_manage/pubspec.yaml index 56717e5b..41256871 100644 --- a/pkgs/repo_manage/pubspec.yaml +++ b/pkgs/repo_manage/pubspec.yaml @@ -4,7 +4,7 @@ description: Miscellaneous issue, repo, and PR query tools. publish_to: none environment: - sdk: ^3.0.0 + sdk: ^3.1.0 dependencies: args: ^2.4.0 diff --git a/tool/ci.sh b/tool/ci.sh index 9b4f6fff..f8afe275 100755 --- a/tool/ci.sh +++ b/tool/ci.sh @@ -1,9 +1,10 @@ #!/bin/bash -# Created with package:mono_repo v6.6.0 +# Created with package:mono_repo v6.6.1 # Support built in commands on windows out of the box. + # When it is a flutter repo (check the pubspec.yaml for "sdk: flutter") -# then "flutter" is called instead of "pub". +# then "flutter pub" is called instead of "dart pub". # This assumes that the Flutter SDK has been installed in a previous step. function pub() { if grep -Fq "sdk: flutter" "${PWD}/pubspec.yaml"; then @@ -12,18 +13,13 @@ function pub() { command dart pub "$@" fi } -# When it is a flutter repo (check the pubspec.yaml for "sdk: flutter") -# then "flutter" is called instead of "pub". -# This assumes that the Flutter SDK has been installed in a previous step. + function format() { - if grep -Fq "sdk: flutter" "${PWD}/pubspec.yaml"; then - command flutter format "$@" - else - command dart format "$@" - fi + command dart format "$@" } + # When it is a flutter repo (check the pubspec.yaml for "sdk: flutter") -# then "flutter" is called instead of "pub". +# then "flutter analyze" is called instead of "dart analyze". # This assumes that the Flutter SDK has been installed in a previous step. function analyze() { if grep -Fq "sdk: flutter" "${PWD}/pubspec.yaml"; then