Skip to content

Commit

Permalink
Update CI and lints for Dart 3.4 release (#221)
Browse files Browse the repository at this point in the history
  • Loading branch information
parlough authored May 13, 2024
1 parent e466136 commit 777996f
Show file tree
Hide file tree
Showing 8 changed files with 33 additions and 30 deletions.
20 changes: 10 additions & 10 deletions .github/workflows/dart.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,23 +39,23 @@ jobs:
- name: mono_repo self validate
run: dart pub global run mono_repo generate --validate
job_002:
name: "analyzer_and_format; Dart 3.3.0; PKGS: packages/code_excerpt_updater, packages/code_excerpter, packages/excerpter, packages/inject_dartpad; `dart format --output=none --set-exit-if-changed .`, `dart analyze --fatal-infos .`"
name: "analyzer_and_format; Dart 3.4.0; PKGS: packages/code_excerpt_updater, packages/code_excerpter, packages/excerpter, packages/inject_dartpad; `dart format --output=none --set-exit-if-changed .`, `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.3.0;packages:packages/code_excerpt_updater-packages/code_excerpter-packages/excerpter-packages/inject_dartpad;commands:format-analyze"
key: "os:ubuntu-latest;pub-cache-hosted;sdk:3.4.0;packages:packages/code_excerpt_updater-packages/code_excerpter-packages/excerpter-packages/inject_dartpad;commands:format-analyze"
restore-keys: |
os:ubuntu-latest;pub-cache-hosted;sdk:3.3.0;packages:packages/code_excerpt_updater-packages/code_excerpter-packages/excerpter-packages/inject_dartpad
os:ubuntu-latest;pub-cache-hosted;sdk:3.3.0
os:ubuntu-latest;pub-cache-hosted;sdk:3.4.0;packages:packages/code_excerpt_updater-packages/code_excerpter-packages/excerpter-packages/inject_dartpad
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@f0ead981b4d9a35b37f30d36160575d60931ec30
with:
sdk: "3.3.0"
sdk: "3.4.0"
- id: checkout
name: Checkout repository
uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b
Expand Down Expand Up @@ -185,23 +185,23 @@ jobs:
if: "always() && steps.packages_inject_dartpad_pub_upgrade.conclusion == 'success'"
working-directory: packages/inject_dartpad
job_004:
name: "unit_test; Dart 3.3.0; PKGS: packages/code_excerpt_updater, packages/code_excerpter, packages/excerpter; `dart test`"
name: "unit_test; Dart 3.4.0; PKGS: packages/code_excerpt_updater, packages/code_excerpter, packages/excerpter; `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.3.0;packages:packages/code_excerpt_updater-packages/code_excerpter-packages/excerpter;commands:test"
key: "os:ubuntu-latest;pub-cache-hosted;sdk:3.4.0;packages:packages/code_excerpt_updater-packages/code_excerpter-packages/excerpter;commands:test"
restore-keys: |
os:ubuntu-latest;pub-cache-hosted;sdk:3.3.0;packages:packages/code_excerpt_updater-packages/code_excerpter-packages/excerpter
os:ubuntu-latest;pub-cache-hosted;sdk:3.3.0
os:ubuntu-latest;pub-cache-hosted;sdk:3.4.0;packages:packages/code_excerpt_updater-packages/code_excerpter-packages/excerpter
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@f0ead981b4d9a35b37f30d36160575d60931ec30
with:
sdk: "3.3.0"
sdk: "3.4.0"
- id: checkout
name: Checkout repository
uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b
Expand Down
1 change: 1 addition & 0 deletions packages/analysis_defaults/lib/analysis.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ linter:
- implicit_reopen
- invalid_case_patterns
- matching_super_parameters
- missing_code_block_language_in_doc_comment
- no_literal_bool_comparisons
- no_self_assignments
- package_api_docs
Expand Down
4 changes: 2 additions & 2 deletions packages/analysis_defaults/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ description: Analysis defaults for Dart/Flutter site tools.
publish_to: none

environment:
sdk: ^3.3.0
sdk: ^3.4.0

# NOTE: Code is not allowed in this package.
# Do not add dependencies besides the underlying lints package.
dependencies:
dart_flutter_team_lints: ^3.0.0
dart_flutter_team_lints: ^3.1.0
24 changes: 13 additions & 11 deletions packages/code_excerpt_updater/lib/src/diff/hunk.dart
Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,21 @@ const eol = '\n';
/// A unified-diff hunk consisting of a line-range header followed by the
/// unified diff line details. For example:
///
/// @@ -1,10 +1,12 @@
/// import 'package:flutter/material.dart';
/// +import 'package:english_words/english_words.dart';
/// ```diff
/// @@ -1,10 +1,12 @@
/// import 'package:flutter/material.dart';
/// +import 'package:english_words/english_words.dart';
///
/// void main() => runApp(MyApp());
/// void main() => runApp(MyApp());
///
/// class MyApp extends StatelessWidget {
/// @override
/// Widget build(BuildContext context) {
/// + final wordPair = WordPair.random();
/// return MaterialApp(
/// title: 'Welcome to Flutter',
/// home: Scaffold(
/// class MyApp extends StatelessWidget {
/// @override
/// Widget build(BuildContext context) {
/// + final wordPair = WordPair.random();
/// return MaterialApp(
/// title: 'Welcome to Flutter',
/// home: Scaffold(
/// ```
class Hunk {
static final Hunk empty = Hunk('');

Expand Down
2 changes: 1 addition & 1 deletion packages/code_excerpt_updater/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: code_excerpt_updater
publish_to: none

environment:
sdk: ^3.3.0
sdk: ^3.4.0

dependencies:
args: ^2.4.2
Expand Down
4 changes: 2 additions & 2 deletions packages/code_excerpter/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: code_excerpter
publish_to: none

environment:
sdk: ^3.3.0
sdk: ^3.4.0

dependencies:
build: ^2.4.1
Expand All @@ -13,5 +13,5 @@ dependencies:
dev_dependencies:
analysis_defaults:
path: ../analysis_defaults
build_runner: ^2.4.8
build_runner: ^2.4.9
test: ^1.25.2
2 changes: 1 addition & 1 deletion packages/excerpter/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ publish_to: none
repository: https://github.com/dart-lang/site-shared/tree/main/packages/excerpter

environment:
sdk: ^3.3.0
sdk: ^3.4.0

dependencies:
args: ^2.4.2
Expand Down
6 changes: 3 additions & 3 deletions packages/inject_dartpad/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: inject_dartpad
publish_to: none

environment:
sdk: ^3.3.0
sdk: ^3.4.0

dependencies:
html_unescape: ^2.0.0
Expand All @@ -11,8 +11,8 @@ dependencies:
dev_dependencies:
analysis_defaults:
path: ../analysis_defaults
build_runner: ^2.4.8
build_web_compilers: ^4.0.9
build_runner: ^2.4.9
build_web_compilers: ^4.0.10
path: ^1.9.0
test: ^1.25.2
webdev: any

0 comments on commit 777996f

Please sign in to comment.