Skip to content

Commit 66c17c0

Browse files
Merge remote-tracking branch 'origin/master' into clean-up-and-optimize-generated-props
2 parents 5d2d820 + acdc10a commit 66c17c0

File tree

132 files changed

+309
-410
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

132 files changed

+309
-410
lines changed
Lines changed: 26 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Dart CI
1+
name: CI
22

33
on:
44
push:
@@ -19,22 +19,16 @@ permissions:
1919
jobs:
2020
# Run as a separate job outside the Dart SDK matrix below,
2121
# since we can only emit a single SBOM.
22-
create-sbom-release-asset:
23-
name: Create SBOM Release Asset
24-
runs-on: ubuntu-latest
25-
steps:
26-
- uses: actions/checkout@v4
27-
- uses: dart-lang/setup-dart@v1
28-
with:
29-
sdk: 2.19.6 # This version doesn't matter so long as it resolves.
30-
- run: dart pub get
31-
- name: Publish SBOM to Release Assets
32-
uses: anchore/sbom-action@v0
33-
with:
34-
path: ./
35-
format: cyclonedx-json
36-
3722
build:
23+
uses: Workiva/gha-dart-oss/.github/workflows/[email protected]
24+
25+
checks:
26+
uses: Workiva/gha-dart-oss/.github/workflows/[email protected]
27+
with:
28+
additional-checks: |
29+
no_entrypoint_imports
30+
31+
test_and_check_generated_files:
3832
runs-on: ubuntu-latest
3933
strategy:
4034
fail-fast: false
@@ -60,17 +54,10 @@ jobs:
6054
if [[ "$DART_VERSION" =~ ^3 ]]; then
6155
./tool/delete_dart_2_only_files.sh
6256
./tool/update_tests_for_dart_3.sh
57+
# Stage these changes so they don't show up in the generated file `git diff` check below
58+
git add .
6359
fi
6460
65-
- name: Validate dependencies
66-
run: dart run dependency_validator
67-
if: always() && steps.install.outcome == 'success'
68-
69-
- name: Verify formatting
70-
run: dart run dart_dev format --check
71-
# Only run on one sdk version in case there are conflicts
72-
if: always() && matrix.sdk == '2.19.6' && steps.install.outcome == 'success'
73-
7461
# Analyze before generated files are created to verify that component boilerplate analysis is "clean" without the need for building
7562
- name: Analyze example source (pre-build)
7663
run: |
@@ -89,13 +76,7 @@ jobs:
8976

9077
- name: Verify that generated files are up-to-date
9178
run: |
92-
if [ ${{ matrix.sdk }} = '2.19.6' ]; then
93-
git diff --exit-code
94-
else
95-
# Don't check these generated files for other SDKs, since they may generate differently
96-
# due to different resolved dependencies.
97-
git diff --exit-code -- ":(exclude)test/over_react/component_declaration/redux_component_test/test_reducer.g.dart"
98-
fi
79+
git diff --exit-code
9980
if: always() && steps.install.outcome == 'success' && steps.build.outcome == 'success'
10081

10182
# Analyze again after generated files are created to verify that those generated classes don't cause analysis errors
@@ -234,3 +215,16 @@ jobs:
234215
run: dart run dart_dev test
235216
if: always() && steps.install.outcome == 'success'
236217
timeout-minutes: 8
218+
219+
testing-and-checks-complete:
220+
name: Testing and Checks Completed
221+
needs: [ build, checks, test_and_check_generated_files, validate_analyzer, analyzer_plugin ]
222+
if: ${{ !cancelled() && github.event_name == 'pull_request' || github.ref_type == 'tag' }}
223+
runs-on: ubuntu-latest
224+
steps:
225+
- run: |
226+
if [ "${{ needs.checks.result }}" == "failure" ]; then
227+
echo "Some checks have failed. Please fix the issues and try again."
228+
exit 1
229+
fi
230+
echo 'All Testing and checks have completed.'

.github/workflows/publish.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
name: Publish
2+
3+
on:
4+
push:
5+
tags:
6+
- '[0-9]+.[0-9]+.[0-9]+'
7+
8+
permissions:
9+
contents: write
10+
id-token: write
11+
pull-requests: write
12+
13+
jobs:
14+
publish:
15+
uses: Workiva/gha-dart-oss/.github/workflows/[email protected]

CHANGELOG.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,13 @@
11
# OverReact Changelog
22

33
## Unreleased
4-
- Optimize generated code to decrease dart2js compile size, saving ~577 bytes per component (when using `-03 --csp --minify`)
4+
- [#989] Optimize generated code to decrease dart2js compile size, saving ~577 bytes per component (when using `-03 --csp --minify`)
5+
- [#992] Fix compilation errors for legacy boilerplate defined in libraries with a Dart language version of >=3.0
6+
7+
## 5.4.6
8+
- [#986] Set up gha-dart-oss
9+
- [#985] Remove entrypoint imports
10+
- [#984] Rollout React 18 to tests and example apps
511

612
## 5.4.5
713
- Update analyzer dependency to `>=5.13.0 <8.0.0` (allow v8)

example/boilerplate_versions/dart2_only/basic_component1.over_react.g.dart

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

example/boilerplate_versions/dart2_only/basic_component2.over_react.g.dart

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/src/builder/codegen/accessors_generator.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ abstract class TypedMapAccessorsGenerator extends BoilerplateDeclarationGenerato
8282
final implementsClause = 'implements ${names.consumerName}$typeParamsOnSuper';
8383
generatedClass
8484
..write(generatedCodeUseOnlyDeprecation)
85-
..writeln('abstract class $accessorsMixinName$typeParamsOnClass $implementsClause {\n'
85+
..writeln('mixin $accessorsMixinName$typeParamsOnClass $implementsClause {\n'
8686
' @override'
8787
' Map get ${type.isProps ? 'props' : 'state'};\n');
8888
if (type.isMixin) {

lib/src/component/_deprecated/abstract_transition.over_react.g.dart

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/src/component/_deprecated/abstract_transition_props.over_react.g.dart

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/src/component/_deprecated/error_boundary.over_react.g.dart

Lines changed: 2 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/src/component/_deprecated/error_boundary_mixins.over_react.g.dart

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)