Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: migrate to Dart3 #33

Merged
merged 5 commits into from
Oct 3, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 15 additions & 16 deletions .github/workflows/verify_compatibility.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,22 +38,6 @@ jobs:
run: dart pub get
working-directory: packages/danger_dart/

- name: Install app (non nullsafety) dependencies
run: dart pub get
working-directory: example/pre_nullsafety/

- name: Run danger local (non nullsafety)
run: danger_dart local
working-directory: example/pre_nullsafety/

- name: Install app dependencies (nullsafety)
run: dart pub get
working-directory: example/target_nullsafety/

- name: Run danger local (nullsafety)
run: danger_dart local
working-directory: example/target_nullsafety/

- name: Install plugin dependencies
run: dart pub get
working-directory: example/with_plugin/danger_plugin_example/
Expand All @@ -66,3 +50,18 @@ jobs:
run: danger_dart local
working-directory: example/with_plugin/

- name: Install app dependencies (Dart 2)
run: dart pub get
working-directory: example/dart2/

- name: Run danger local (Dart 2)
run: danger_dart local
working-directory: example/dart2/

- name: Install app dependencies (Dart 3)
run: dart pub get
working-directory: example/dart3/

- name: Run danger local (Dart 3)
run: danger_dart local
working-directory: example/dart3/
Original file line number Diff line number Diff line change
@@ -1,14 +1,11 @@
name: danger_test_target_null_safety
name: dart2
description: A simple command-line application.
# version: 1.0.0
# homepage: https://www.example.com

environment:
sdk: ">=2.12.0 <3.0.0"

dependencies:
json_annotation: ^3.0.0

dev_dependencies:
lints: ^1.0.1
path: ^1.8.0
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import 'package:danger_core/danger_core.dart';

void main() {
message('hello from pre-nullsafety');
message('hello from Dart 3');
}
Original file line number Diff line number Diff line change
@@ -1,16 +1,13 @@
name: danger_test_pre_nullsafety
name: danger_test_target_null_safety
description: A simple command-line application.
# version: 1.0.0
# homepage: https://www.example.com

environment:
sdk: ">=2.7.0 <3.0.0"

dependencies:
json_annotation: ^3.0.0
sdk: ">=3.0.0 <4.0.0"

dev_dependencies:
lints: ^1.0.1
path: ^1.8.0
path: ^1.8.3
danger_core:
path: ../../packages/danger_core
3 changes: 0 additions & 3 deletions example/with_plugin/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,6 @@ description: A simple command-line application.
environment:
sdk: ">=2.12.0 <3.0.0"

dependencies:
json_annotation: ^3.0.0

dev_dependencies:
lints: ^1.0.1
path: ^1.8.0
Expand Down
4 changes: 4 additions & 0 deletions packages/danger_core/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 2.0.0

- Migrate to Dart 3

## 1.0.1

- Fixed GitLabDSL
Expand Down
18 changes: 9 additions & 9 deletions packages/danger_core/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
name: danger_core
description: Core of Danger Dart, tool to help you reviewing the code.
version: 1.0.1
version: 2.0.0
homepage: https://github.com/danger/dart

environment:
sdk: ">=2.12.0 <3.0.0"
sdk: ">=3.0.0 <4.0.0"

dev_dependencies:
lints: ^1.0.1
json_annotation: ^4.4.0
test: ^1.20.2
json_serializable: ^6.1.5
build_runner: ^2.1.8
mockito: ^5.1.0
lints: ^2.1.1
json_annotation: ^4.8.1
test: ^1.24.7
json_serializable: ^6.7.1
build_runner: ^2.4.6
mockito: ^5.4.2
isolate: ^2.1.1
path: ^1.8.0
path: ^1.8.3
4 changes: 4 additions & 0 deletions packages/danger_dart/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 2.0.0

- Migrate to Dart 3

## 1.0.1

- Add argument `--failOnErrors` on every command
Expand Down
1 change: 0 additions & 1 deletion packages/danger_dart/lib/danger_util.dart
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,6 @@ class DangerUtil {
}
tempFile.createSync();
tempFile.writeAsStringSync('''
// @dart=2.7
import 'dart:developer';

import 'package:danger_core/danger_core.dart';
Expand Down
20 changes: 10 additions & 10 deletions packages/danger_dart/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,20 +7,20 @@ executables:
danger_dart:

environment:
sdk: ">=2.12.0 <3.0.0"
sdk: ">=3.0.0 <4.0.0"

dependencies:
meta: ^1.7.0
args: ^2.3.0
process_run: ^0.12.3+2
fimber: ^0.6.5
path: ^1.8.1
meta: ^1.10.0
args: ^2.4.2
process_run: ^0.13.1
fimber: ^0.7.0
path: ^1.8.3
# danger_core: ">= 1.0.0 < 2.0.0"
danger_core:
path: ../danger_core

dev_dependencies:
lints: ^1.0.1
test: ^1.20.2
mockito: ^5.1.0
build_runner: ^2.1.8
lints: ^2.1.1
test: ^1.24.7
mockito: ^5.4.2
build_runner: ^2.4.6
4 changes: 4 additions & 0 deletions packages/danger_plugin_dart_test/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 2.0.0

- Migrate to Dart 3

## 1.0.0

- Supports Null Safety
Expand Down
10 changes: 5 additions & 5 deletions packages/danger_plugin_dart_test/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
name: danger_plugin_dart_test
description: A Danger Dart plugin to process test result.
version: 1.0.0
version: 2.0.0
homepage: https://github.com/danger/dart

environment:
sdk: ">=2.12.0 <3.0.0"
sdk: ">=3.0.0 <4.0.0"

dependencies:
path: ">= 1.8.0 < 2.0.0"
path: ^1.8.3
# danger_core: ">= 1.0.0 < 2.0.0"
danger_core:
path: ../danger_core

dev_dependencies:
lints: ^1.0.1
test: ^1.20.2
lints: ^2.1.1
test: ^1.24.7
4 changes: 4 additions & 0 deletions packages/danger_plugin_golden_reporter/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 2.0.0

- Migrate to Dart 3

## 1.0.0

- Supports Null Safety
Expand Down
6 changes: 3 additions & 3 deletions packages/danger_plugin_golden_reporter/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
name: danger_plugin_golden_reporter
description: A Danger Dart plugin to display golden images on pull requests.
version: 1.0.0
version: 2.0.0
homepage: https://github.com/danger/dart

environment:
sdk: ">=2.12.0 <3.0.0"
sdk: ">=3.0.0 <4.0.0"

dependencies:
# danger_core: ">= 1.0.0 < 2.0.0"
danger_core:
path: ../danger_core

dev_dependencies:
lints: ^1.0.1
lints: ^2.1.1
test: ^1.20.2
mockito: ^5.1.0
build_runner: ^2.1.8
6 changes: 3 additions & 3 deletions pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ description: A simple command-line application.
# homepage: https://www.example.com

environment:
sdk: ">=2.12.0 <3.0.0"
sdk: ">=3.0.0 <4.0.0"

dev_dependencies:
lints: ^1.0.1
path: ^1.8.0
lints: ^2.1.1
path: ^1.8.3
danger_core:
path: packages/danger_core
danger_plugin_dart_test:
Expand Down
Loading