From 1fbfdae529792ec5f0e2573b3411ffc48b361b9b Mon Sep 17 00:00:00 2001 From: Kyohei Ito Date: Sun, 6 Oct 2024 09:06:36 +0900 Subject: [PATCH 1/3] chore: upgrade flutter build version --- .github/workflows/review.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/review.yaml b/.github/workflows/review.yaml index 0fede29..c6daa71 100644 --- a/.github/workflows/review.yaml +++ b/.github/workflows/review.yaml @@ -17,7 +17,7 @@ jobs: - name: Setup Flutter uses: subosito/flutter-action@v2 with: - flutter-version: 3.19.6 + flutter-version: 3.22.3 cache: true - name: Setup pub From 624f814e0a37a9b53251d46ba5fec1fe6c7cb7b2 Mon Sep 17 00:00:00 2001 From: Kyohei Ito Date: Sun, 6 Oct 2024 09:07:10 +0900 Subject: [PATCH 2/3] chore: update package --- analysis_options.yaml | 2 +- packages/playbook/pubspec.yaml | 2 +- packages/playbook_generator/pubspec.yaml | 2 +- packages/playbook_snapshot/pubspec.yaml | 2 +- packages/playbook_ui/pubspec.yaml | 2 +- pubspec.yaml | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/analysis_options.yaml b/analysis_options.yaml index bf4b70e..2b7e288 100644 --- a/analysis_options.yaml +++ b/analysis_options.yaml @@ -1,4 +1,4 @@ -include: package:very_good_analysis/analysis_options.5.1.0.yaml +include: package:very_good_analysis/analysis_options.6.0.0.yaml linter: rules: diff --git a/packages/playbook/pubspec.yaml b/packages/playbook/pubspec.yaml index 3076cae..9397d7e 100644 --- a/packages/playbook/pubspec.yaml +++ b/packages/playbook/pubspec.yaml @@ -16,7 +16,7 @@ dependencies: dev_dependencies: flutter_test: sdk: flutter - very_good_analysis: ^5.1.0 + very_good_analysis: ^6.0.0 flutter: uses-material-design: true diff --git a/packages/playbook_generator/pubspec.yaml b/packages/playbook_generator/pubspec.yaml index b73a1c2..eb99469 100644 --- a/packages/playbook_generator/pubspec.yaml +++ b/packages/playbook_generator/pubspec.yaml @@ -18,4 +18,4 @@ dependencies: dart_style: ^2.3.6 dev_dependencies: - very_good_analysis: ^5.1.0 + very_good_analysis: ^6.0.0 diff --git a/packages/playbook_snapshot/pubspec.yaml b/packages/playbook_snapshot/pubspec.yaml index fdd84ab..1704035 100644 --- a/packages/playbook_snapshot/pubspec.yaml +++ b/packages/playbook_snapshot/pubspec.yaml @@ -19,4 +19,4 @@ dependencies: yaml: ^3.1.2 dev_dependencies: - very_good_analysis: ^5.1.0 + very_good_analysis: ^6.0.0 diff --git a/packages/playbook_ui/pubspec.yaml b/packages/playbook_ui/pubspec.yaml index 5e7f266..21242a3 100644 --- a/packages/playbook_ui/pubspec.yaml +++ b/packages/playbook_ui/pubspec.yaml @@ -18,7 +18,7 @@ dependencies: dev_dependencies: flutter_test: sdk: flutter - very_good_analysis: ^5.1.0 + very_good_analysis: ^6.0.0 flutter: uses-material-design: true diff --git a/pubspec.yaml b/pubspec.yaml index 0220ee8..dae3308 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -6,4 +6,4 @@ environment: dev_dependencies: melos: ^6.0.0 - very_good_analysis: ^5.1.0 + very_good_analysis: ^6.0.0 From f44dd82d155ebb8e530fb51c44ff3ffa4681ec1e Mon Sep 17 00:00:00 2001 From: Kyohei Ito Date: Sun, 6 Oct 2024 10:00:38 +0900 Subject: [PATCH 3/3] chore: upgrade flutter build version --- .github/workflows/review.yaml | 2 +- .../playbook_generator/lib/src/playbook_builder.dart | 11 +++++------ 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/.github/workflows/review.yaml b/.github/workflows/review.yaml index c6daa71..5c49f6d 100644 --- a/.github/workflows/review.yaml +++ b/.github/workflows/review.yaml @@ -17,7 +17,7 @@ jobs: - name: Setup Flutter uses: subosito/flutter-action@v2 with: - flutter-version: 3.22.3 + flutter-version: 3.24.3 cache: true - name: Setup pub diff --git a/packages/playbook_generator/lib/src/playbook_builder.dart b/packages/playbook_generator/lib/src/playbook_builder.dart index 7731c12..8c3a70b 100644 --- a/packages/playbook_generator/lib/src/playbook_builder.dart +++ b/packages/playbook_generator/lib/src/playbook_builder.dart @@ -88,14 +88,14 @@ ${storiesLibrary.accept(emitter)} if (element is ClassElement) { return (element.unnamedConstructor?.isDefaultConstructor ?? false) && element.allSupertypes.any( - (s) => s.getDisplayString(withNullability: true) == w, + (s) => s.getDisplayString() == w, ); } else if (element is FunctionElement) { - final firstParam = element.parameters.firstOrNull?.type - .getDisplayString(withNullability: false); + final firstParam = + element.parameters.firstOrNull?.type.getDisplayString(); return element.parameters.length <= 1 && (firstParam == null || firstParam == bc) && - element.returnType.getDisplayString(withNullability: true) == w; + element.returnType.getDisplayString() == w; } else { return false; } @@ -135,8 +135,7 @@ ${a(refer(scenarioName, _playbookUrl))}( .where((e) => e.isPublic && e.parameters.isEmpty) .expand( (e) { - final returnTypeString = - e.returnType.getDisplayString(withNullability: true); + final returnTypeString = e.returnType.getDisplayString(); final scenarioRefer = refer(e.displayName, uri); if (returnTypeString == 'Scenario') { return [scenarioRefer([]).code];