From bfccbe78a7062342bb5782ec7ef953ad3e2d20f4 Mon Sep 17 00:00:00 2001 From: Sydney Jodon Date: Thu, 7 Aug 2025 16:48:05 -0700 Subject: [PATCH 1/6] Update to use gha-dart-oss --- .github/workflows/{dart_ci.yml => ci.yml} | 52 ++++++----------------- .github/workflows/publish.yaml | 15 +++++++ 2 files changed, 27 insertions(+), 40 deletions(-) rename .github/workflows/{dart_ci.yml => ci.yml} (52%) create mode 100644 .github/workflows/publish.yaml diff --git a/.github/workflows/dart_ci.yml b/.github/workflows/ci.yml similarity index 52% rename from .github/workflows/dart_ci.yml rename to .github/workflows/ci.yml index 81741c80..b717be10 100644 --- a/.github/workflows/dart_ci.yml +++ b/.github/workflows/ci.yml @@ -1,4 +1,4 @@ -name: Dart CI +name: CI on: push: @@ -10,7 +10,16 @@ on: - '**' jobs: - validate: + checks: + uses: Workiva/gha-dart-oss/.github/workflows/checks.yaml@v0.1.11 + with: + additional-checks: | + no_entrypoint_imports + + build: + uses: Workiva/gha-dart-oss/.github/workflows/build.yaml@v0.1.11 + + test: runs-on: ubuntu-latest strategy: fail-fast: false @@ -27,19 +36,7 @@ jobs: - id: install name: Install dependencies - run: dart pub get - - - name: Validate dependencies - run: dart run dependency_validator - if: always() && steps.install.outcome == 'success' - - - name: Validate formatting - run: dart run dart_dev format --check - if: always() && steps.install.outcome == 'success' - - - name: Analyze project source - run: dart analyze - if: always() && steps.install.outcome == 'success' + run: dart pub get --no-precompile - name: Ensure checked-in generated files are up to date run: | @@ -47,33 +44,8 @@ jobs: git diff --exit-code if: always() && steps.install.outcome == 'success' - test: - runs-on: ubuntu-latest - strategy: - fail-fast: false - matrix: - sdk: [ 2.19.6 ] - steps: - - uses: actions/checkout@v2 - - uses: dart-lang/setup-dart@v0.2 - with: - sdk: ${{ matrix.sdk }} - - - name: Print Dart SDK version - run: dart --version - - - id: install - name: Install dependencies - run: dart pub get --no-precompile - - name: Run tests run: | echo 'Running dart pub get in test fixtures beforehand to prevent concurrent `dart pub get`s in tests from failing' (cd test/test_fixtures/over_react_project && dart pub get) dart test --exclude-tags=wsd - - - name: Create SBOM Release Asset - uses: anchore/sbom-action@v0 - with: - path: ./ - format: cyclonedx-json diff --git a/.github/workflows/publish.yaml b/.github/workflows/publish.yaml new file mode 100644 index 00000000..15fd5880 --- /dev/null +++ b/.github/workflows/publish.yaml @@ -0,0 +1,15 @@ +name: Publish + +on: + push: + tags: + - '[0-9]+.[0-9]+.[0-9]+' + +permissions: + contents: write + id-token: write + pull-requests: write + +jobs: + publish: + uses: Workiva/gha-dart-oss/.github/workflows/publish.yaml@v0.1.11 From 173a99bc352feb1c5ebb9d27e571a1591566a4ba Mon Sep 17 00:00:00 2001 From: Sydney Jodon Date: Thu, 7 Aug 2025 16:50:23 -0700 Subject: [PATCH 2/6] Update dart_dev and changelog --- CHANGELOG.md | 3 +++ tool/dart_dev/config.dart | 3 ++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6d902673..1126b7ad 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,6 @@ +## 2.37.1 +- Use gha-dart-oss + ## 2.37.0 - React 18 rollout codemod: `react_18_upgrade` to update React JS file paths from the React 17 to React 18 versions. - Raise other dependency minimums: `uuid`, `web_skin_dart` diff --git a/tool/dart_dev/config.dart b/tool/dart_dev/config.dart index cf617628..02ab0c31 100644 --- a/tool/dart_dev/config.dart +++ b/tool/dart_dev/config.dart @@ -5,5 +5,6 @@ final config = { 'format': FormatTool() ..exclude = [ Glob('test/test_fixtures/**'), - ] + ], + 'analyze': AnalyzeTool(), }; From 3fc8554036da1aeb770fa3cd1f62438821a14fba Mon Sep 17 00:00:00 2001 From: Sydney Jodon Date: Fri, 8 Aug 2025 13:19:30 -0700 Subject: [PATCH 3/6] Test --- lib/src/boilerplate_suggestors/boilerplate_utilities.dart | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/src/boilerplate_suggestors/boilerplate_utilities.dart b/lib/src/boilerplate_suggestors/boilerplate_utilities.dart index 3c5dcb8e..702aa1ce 100644 --- a/lib/src/boilerplate_suggestors/boilerplate_utilities.dart +++ b/lib/src/boilerplate_suggestors/boilerplate_utilities.dart @@ -15,6 +15,7 @@ import 'dart:convert'; import 'dart:io'; +import 'package:codemod/codemod.dart'; import 'package:analyzer/dart/ast/ast.dart'; import 'package:logging/logging.dart'; import 'package:over_react_codemod/src/util.dart'; From 4de0a5a76225ceb80f8d365553ddc9c4ef7cd70d Mon Sep 17 00:00:00 2001 From: Sydney Jodon Date: Fri, 8 Aug 2025 16:07:38 -0700 Subject: [PATCH 4/6] Fix test --- lib/src/boilerplate_suggestors/boilerplate_utilities.dart | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/src/boilerplate_suggestors/boilerplate_utilities.dart b/lib/src/boilerplate_suggestors/boilerplate_utilities.dart index 702aa1ce..ce922cdd 100644 --- a/lib/src/boilerplate_suggestors/boilerplate_utilities.dart +++ b/lib/src/boilerplate_suggestors/boilerplate_utilities.dart @@ -15,7 +15,6 @@ import 'dart:convert'; import 'dart:io'; -import 'package:codemod/codemod.dart'; import 'package:analyzer/dart/ast/ast.dart'; import 'package:logging/logging.dart'; import 'package:over_react_codemod/src/util.dart'; @@ -24,7 +23,7 @@ typedef YieldPatch = void Function(String replacement, int startingOffset, [int? endingOffset]); const semverReportNotAvailable = - 'Semver report not available; this class is assumed to be public and thus will not be updated.'; + 'Semver report not avgit cheailable; this class is assumed to be public and thus will not be updated.'; final logger = Logger('over_react_codemod.boilerplate_upgrade.semver_helper'); From f69ba2274b37244952e15dc876daef3c20187b5d Mon Sep 17 00:00:00 2001 From: Sydney Jodon Date: Fri, 8 Aug 2025 16:07:56 -0700 Subject: [PATCH 5/6] Fix test --- lib/src/boilerplate_suggestors/boilerplate_utilities.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/src/boilerplate_suggestors/boilerplate_utilities.dart b/lib/src/boilerplate_suggestors/boilerplate_utilities.dart index ce922cdd..3c5dcb8e 100644 --- a/lib/src/boilerplate_suggestors/boilerplate_utilities.dart +++ b/lib/src/boilerplate_suggestors/boilerplate_utilities.dart @@ -23,7 +23,7 @@ typedef YieldPatch = void Function(String replacement, int startingOffset, [int? endingOffset]); const semverReportNotAvailable = - 'Semver report not avgit cheailable; this class is assumed to be public and thus will not be updated.'; + 'Semver report not available; this class is assumed to be public and thus will not be updated.'; final logger = Logger('over_react_codemod.boilerplate_upgrade.semver_helper'); From 13cd8f6f7292ff165eb0fed62ce6fcc70e7a48df Mon Sep 17 00:00:00 2001 From: Sydney Jodon Date: Thu, 14 Aug 2025 15:49:40 -0700 Subject: [PATCH 6/6] Bump gha-dart-oss version --- .github/workflows/ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b717be10..df5edd99 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -11,13 +11,13 @@ on: jobs: checks: - uses: Workiva/gha-dart-oss/.github/workflows/checks.yaml@v0.1.11 + uses: Workiva/gha-dart-oss/.github/workflows/checks.yaml@v0.1.12 with: additional-checks: | no_entrypoint_imports build: - uses: Workiva/gha-dart-oss/.github/workflows/build.yaml@v0.1.11 + uses: Workiva/gha-dart-oss/.github/workflows/build.yaml@v0.1.12 test: runs-on: ubuntu-latest