Skip to content

Commit 8c1a3bd

Browse files
committed
Merge remote-tracking branch 'google/master' into google#780
2 parents e8bd3dc + c7a7250 commit 8c1a3bd

File tree

10 files changed

+382
-322
lines changed

10 files changed

+382
-322
lines changed

.github/workflows/dart.yml

+55-41
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Created with package:mono_repo v3.4.2
1+
# Created with package:mono_repo v3.4.5
22
name: Dart CI
33
on:
44
push:
@@ -27,13 +27,13 @@ jobs:
2727
restore-keys: |
2828
os:ubuntu-latest;pub-cache-hosted
2929
os:ubuntu-latest
30-
- uses: cedx/setup-dart@v2
30+
- uses: dart-lang/setup-dart@v0.3
3131
with:
32-
release-channel: stable
33-
- run: dart --version
34-
- uses: actions/checkout@v2
32+
sdk: stable
33+
- id: checkout
34+
uses: actions/checkout@v2
3535
- name: mono_repo self validate
36-
run: pub global activate mono_repo 3.4.2
36+
run: pub global activate mono_repo 3.4.5
3737
- name: mono_repo self validate
3838
run: pub global run mono_repo generate --validate
3939
job_002:
@@ -50,69 +50,74 @@ jobs:
5050
os:ubuntu-latest;pub-cache-hosted;dart:dev
5151
os:ubuntu-latest;pub-cache-hosted
5252
os:ubuntu-latest
53-
- uses: cedx/setup-dart@v2
53+
- uses: dart-lang/setup-dart@v0.3
5454
with:
55-
release-channel: dev
56-
- run: dart --version
57-
- uses: actions/checkout@v2
55+
sdk: dev
56+
- id: checkout
57+
uses: actions/checkout@v2
5858
- id: _test_yaml_pub_upgrade
5959
name: "_test_yaml; pub upgrade --no-precompile"
60+
if: "always() && steps.checkout.conclusion == 'success'"
6061
working-directory: _test_yaml
6162
run: pub upgrade --no-precompile
6263
- name: "_test_yaml; dartfmt -n --set-exit-if-changed ."
63-
if: "steps._test_yaml_pub_upgrade.conclusion == 'success'"
64+
if: "always() && steps._test_yaml_pub_upgrade.conclusion == 'success'"
6465
working-directory: _test_yaml
6566
run: dartfmt -n --set-exit-if-changed .
6667
- name: "_test_yaml; dartanalyzer --fatal-infos ."
67-
if: "steps._test_yaml_pub_upgrade.conclusion == 'success'"
68+
if: "always() && steps._test_yaml_pub_upgrade.conclusion == 'success'"
6869
working-directory: _test_yaml
6970
run: dartanalyzer --fatal-infos .
7071
- id: checked_yaml_pub_upgrade
7172
name: "checked_yaml; pub upgrade --no-precompile"
73+
if: "always() && steps.checkout.conclusion == 'success'"
7274
working-directory: checked_yaml
7375
run: pub upgrade --no-precompile
7476
- name: "checked_yaml; dartfmt -n --set-exit-if-changed ."
75-
if: "steps.checked_yaml_pub_upgrade.conclusion == 'success'"
77+
if: "always() && steps.checked_yaml_pub_upgrade.conclusion == 'success'"
7678
working-directory: checked_yaml
7779
run: dartfmt -n --set-exit-if-changed .
7880
- name: "checked_yaml; dartanalyzer --fatal-infos ."
79-
if: "steps.checked_yaml_pub_upgrade.conclusion == 'success'"
81+
if: "always() && steps.checked_yaml_pub_upgrade.conclusion == 'success'"
8082
working-directory: checked_yaml
8183
run: dartanalyzer --fatal-infos .
8284
- id: example_pub_upgrade
8385
name: "example; pub upgrade --no-precompile"
86+
if: "always() && steps.checkout.conclusion == 'success'"
8487
working-directory: example
8588
run: pub upgrade --no-precompile
8689
- name: "example; dartfmt -n --set-exit-if-changed ."
87-
if: "steps.example_pub_upgrade.conclusion == 'success'"
90+
if: "always() && steps.example_pub_upgrade.conclusion == 'success'"
8891
working-directory: example
8992
run: dartfmt -n --set-exit-if-changed .
9093
- name: "example; dartanalyzer --fatal-infos ."
91-
if: "steps.example_pub_upgrade.conclusion == 'success'"
94+
if: "always() && steps.example_pub_upgrade.conclusion == 'success'"
9295
working-directory: example
9396
run: dartanalyzer --fatal-infos .
9497
- id: json_annotation_pub_upgrade
9598
name: "json_annotation; pub upgrade --no-precompile"
99+
if: "always() && steps.checkout.conclusion == 'success'"
96100
working-directory: json_annotation
97101
run: pub upgrade --no-precompile
98102
- name: "json_annotation; dartfmt -n --set-exit-if-changed ."
99-
if: "steps.json_annotation_pub_upgrade.conclusion == 'success'"
103+
if: "always() && steps.json_annotation_pub_upgrade.conclusion == 'success'"
100104
working-directory: json_annotation
101105
run: dartfmt -n --set-exit-if-changed .
102106
- name: "json_annotation; dartanalyzer --fatal-infos ."
103-
if: "steps.json_annotation_pub_upgrade.conclusion == 'success'"
107+
if: "always() && steps.json_annotation_pub_upgrade.conclusion == 'success'"
104108
working-directory: json_annotation
105109
run: dartanalyzer --fatal-infos .
106110
- id: json_serializable_pub_upgrade
107111
name: "json_serializable; pub upgrade --no-precompile"
112+
if: "always() && steps.checkout.conclusion == 'success'"
108113
working-directory: json_serializable
109114
run: pub upgrade --no-precompile
110115
- name: "json_serializable; dartfmt -n --set-exit-if-changed ."
111-
if: "steps.json_serializable_pub_upgrade.conclusion == 'success'"
116+
if: "always() && steps.json_serializable_pub_upgrade.conclusion == 'success'"
112117
working-directory: json_serializable
113118
run: dartfmt -n --set-exit-if-changed .
114119
- name: "json_serializable; dartanalyzer --fatal-infos ."
115-
if: "steps.json_serializable_pub_upgrade.conclusion == 'success'"
120+
if: "always() && steps.json_serializable_pub_upgrade.conclusion == 'success'"
116121
working-directory: json_serializable
117122
run: dartanalyzer --fatal-infos .
118123
job_003:
@@ -129,41 +134,45 @@ jobs:
129134
os:ubuntu-latest;pub-cache-hosted;dart:dev
130135
os:ubuntu-latest;pub-cache-hosted
131136
os:ubuntu-latest
132-
- uses: cedx/setup-dart@v2
137+
- uses: dart-lang/setup-dart@v0.3
133138
with:
134-
release-channel: dev
135-
- run: dart --version
136-
- uses: actions/checkout@v2
139+
sdk: dev
140+
- id: checkout
141+
uses: actions/checkout@v2
137142
- id: _test_yaml_pub_upgrade
138143
name: "_test_yaml; pub upgrade --no-precompile"
144+
if: "always() && steps.checkout.conclusion == 'success'"
139145
working-directory: _test_yaml
140146
run: pub upgrade --no-precompile
141147
- name: _test_yaml; pub run test
142-
if: "steps._test_yaml_pub_upgrade.conclusion == 'success'"
148+
if: "always() && steps._test_yaml_pub_upgrade.conclusion == 'success'"
143149
working-directory: _test_yaml
144150
run: pub run test
145151
- id: checked_yaml_pub_upgrade
146152
name: "checked_yaml; pub upgrade --no-precompile"
153+
if: "always() && steps.checkout.conclusion == 'success'"
147154
working-directory: checked_yaml
148155
run: pub upgrade --no-precompile
149156
- name: checked_yaml; pub run test
150-
if: "steps.checked_yaml_pub_upgrade.conclusion == 'success'"
157+
if: "always() && steps.checked_yaml_pub_upgrade.conclusion == 'success'"
151158
working-directory: checked_yaml
152159
run: pub run test
153160
- id: example_pub_upgrade
154161
name: "example; pub upgrade --no-precompile"
162+
if: "always() && steps.checkout.conclusion == 'success'"
155163
working-directory: example
156164
run: pub upgrade --no-precompile
157165
- name: example; pub run test
158-
if: "steps.example_pub_upgrade.conclusion == 'success'"
166+
if: "always() && steps.example_pub_upgrade.conclusion == 'success'"
159167
working-directory: example
160168
run: pub run test
161169
- id: json_serializable_pub_upgrade
162170
name: "json_serializable; pub upgrade --no-precompile"
171+
if: "always() && steps.checkout.conclusion == 'success'"
163172
working-directory: json_serializable
164173
run: pub upgrade --no-precompile
165174
- name: json_serializable; pub run test
166-
if: "steps.json_serializable_pub_upgrade.conclusion == 'success'"
175+
if: "always() && steps.json_serializable_pub_upgrade.conclusion == 'success'"
167176
working-directory: json_serializable
168177
run: pub run test
169178
needs:
@@ -183,17 +192,18 @@ jobs:
183192
os:ubuntu-latest;pub-cache-hosted;dart:dev
184193
os:ubuntu-latest;pub-cache-hosted
185194
os:ubuntu-latest
186-
- uses: cedx/setup-dart@v2
195+
- uses: dart-lang/setup-dart@v0.3
187196
with:
188-
release-channel: dev
189-
- run: dart --version
190-
- uses: actions/checkout@v2
197+
sdk: dev
198+
- id: checkout
199+
uses: actions/checkout@v2
191200
- id: json_serializable_pub_upgrade
192201
name: "json_serializable; pub upgrade --no-precompile"
202+
if: "always() && steps.checkout.conclusion == 'success'"
193203
working-directory: json_serializable
194204
run: pub upgrade --no-precompile
195205
- name: "json_serializable; pub run test -p chrome"
196-
if: "steps.json_serializable_pub_upgrade.conclusion == 'success'"
206+
if: "always() && steps.json_serializable_pub_upgrade.conclusion == 'success'"
197207
working-directory: json_serializable
198208
run: pub run test -p chrome
199209
needs:
@@ -213,41 +223,45 @@ jobs:
213223
os:ubuntu-latest;pub-cache-hosted;dart:dev
214224
os:ubuntu-latest;pub-cache-hosted
215225
os:ubuntu-latest
216-
- uses: cedx/setup-dart@v2
226+
- uses: dart-lang/setup-dart@v0.3
217227
with:
218-
release-channel: dev
219-
- run: dart --version
220-
- uses: actions/checkout@v2
228+
sdk: dev
229+
- id: checkout
230+
uses: actions/checkout@v2
221231
- id: _test_yaml_pub_upgrade
222232
name: "_test_yaml; pub upgrade --no-precompile"
233+
if: "always() && steps.checkout.conclusion == 'success'"
223234
working-directory: _test_yaml
224235
run: pub upgrade --no-precompile
225236
- name: "_test_yaml; pub run test --run-skipped -t presubmit-only test/ensure_build_test.dart"
226-
if: "steps._test_yaml_pub_upgrade.conclusion == 'success'"
237+
if: "always() && steps._test_yaml_pub_upgrade.conclusion == 'success'"
227238
working-directory: _test_yaml
228239
run: pub run test --run-skipped -t presubmit-only test/ensure_build_test.dart
229240
- id: checked_yaml_pub_upgrade
230241
name: "checked_yaml; pub upgrade --no-precompile"
242+
if: "always() && steps.checkout.conclusion == 'success'"
231243
working-directory: checked_yaml
232244
run: pub upgrade --no-precompile
233245
- name: "checked_yaml; pub run test --run-skipped -t presubmit-only test/ensure_build_test.dart"
234-
if: "steps.checked_yaml_pub_upgrade.conclusion == 'success'"
246+
if: "always() && steps.checked_yaml_pub_upgrade.conclusion == 'success'"
235247
working-directory: checked_yaml
236248
run: pub run test --run-skipped -t presubmit-only test/ensure_build_test.dart
237249
- id: example_pub_upgrade
238250
name: "example; pub upgrade --no-precompile"
251+
if: "always() && steps.checkout.conclusion == 'success'"
239252
working-directory: example
240253
run: pub upgrade --no-precompile
241254
- name: "example; pub run test --run-skipped -t presubmit-only test/ensure_build_test.dart"
242-
if: "steps.example_pub_upgrade.conclusion == 'success'"
255+
if: "always() && steps.example_pub_upgrade.conclusion == 'success'"
243256
working-directory: example
244257
run: pub run test --run-skipped -t presubmit-only test/ensure_build_test.dart
245258
- id: json_serializable_pub_upgrade
246259
name: "json_serializable; pub upgrade --no-precompile"
260+
if: "always() && steps.checkout.conclusion == 'success'"
247261
working-directory: json_serializable
248262
run: pub upgrade --no-precompile
249263
- name: "json_serializable; pub run test --run-skipped -t presubmit-only test/ensure_build_test.dart"
250-
if: "steps.json_serializable_pub_upgrade.conclusion == 'success'"
264+
if: "always() && steps.json_serializable_pub_upgrade.conclusion == 'success'"
251265
working-directory: json_serializable
252266
run: pub run test --run-skipped -t presubmit-only test/ensure_build_test.dart
253267
needs:

.github/workflows/markdown_linter.yml

+30
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: markdown_linter
2+
on:
3+
push:
4+
branches:
5+
- main
6+
pull_request:
7+
schedule:
8+
- cron: "0 0 * * 0"
9+
10+
jobs:
11+
markdown-link-check:
12+
runs-on: ubuntu-latest
13+
steps:
14+
- uses: actions/checkout@master
15+
- uses: gaurav-nelson/github-action-markdown-link-check@v1
16+
markdown_lint:
17+
runs-on: ubuntu-latest
18+
strategy:
19+
matrix:
20+
node-version: [ 14.x ]
21+
steps:
22+
- uses: actions/checkout@master
23+
- name: Use Node.js ${{ matrix.node-version }}
24+
uses: actions/setup-node@v1
25+
with:
26+
node-version: ${{ matrix.node-version }}
27+
- name: Install dependencies
28+
run: npm install --global markdownlint-cli2
29+
- name: Run lint check
30+
run: markdownlint-cli2-fix "**/*.md"

.markdownlint.yaml

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# Rules for markdownlint-cli2 (https://github.com/DavidAnson/markdownlint-cli2)
2+
# Based on markdownlint library (https://github.com/DavidAnson/markdownlint)
3+
# (same linter as vscode-markdownlint).
4+
# See rules descriptions here:
5+
# https://github.com/DavidAnson/markdownlint/blob/main/doc/Rules.md
6+
#
7+
first-line-heading: false
8+
line_length: # MD013 max line length
9+
tables: false # don't break tables
10+
code_blocks: false # don't break on code blocks
11+
line_length: 80
12+
html: # MD033 no html
13+
allowed_elements: [br]
14+
images: false # MD045: image alt text
15+
no-blanks-blockquote: false # MD028

README.md

+7-7
Original file line numberDiff line numberDiff line change
@@ -5,26 +5,26 @@ deserialization.
55

66
## json_serializable [![Pub Package](https://img.shields.io/pub/v/json_serializable.svg)](https://pub.dev/packages/json_serializable)
77

8-
* Package: https://pub.dev/packages/json_serializable
9-
* [Source code](json_serializable)
8+
- Package: <https://pub.dev/packages/json_serializable>
9+
- [Source code](json_serializable)
1010

1111
The core package providing Generators for JSON-specific tasks.
1212

1313
Import it into your pubspec `dev_dependencies:` section.
1414

1515
## json_annotation [![Pub Package](https://img.shields.io/pub/v/json_annotation.svg)](https://pub.dev/packages/json_annotation)
1616

17-
* Package: https://pub.dev/packages/json_annotation
18-
* [Source code](json_annotation)
17+
- Package: <https://pub.dev/packages/json_annotation>
18+
- [Source code](json_annotation)
1919

2020
The annotation package which has no dependencies.
2121

2222
Import it into your pubspec `dependencies:` section.
2323

2424
## checked_yaml [![Pub Package](https://img.shields.io/pub/v/checked_yaml.svg)](https://pub.dev/packages/checked_yaml)
2525

26-
* Package: https://pub.dev/packages/checked_yaml
27-
* [Source code](checked_yaml)
26+
- Package: <https://pub.dev/packages/checked_yaml>
27+
- [Source code](checked_yaml)
2828

2929
Generate more helpful exceptions when decoding YAML documents using
3030
`package:json_serializable` and `package:yaml`.
@@ -33,7 +33,7 @@ Import it into your pubspec `dependencies:` section.
3333

3434
## example
3535

36-
* [Source code](example)
36+
- [Source code](example)
3737

3838
An example showing how to setup and use `json_serializable` and
3939
`json_annotation`.

checked_yaml/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ the target type.
77

88
[`package:json_serializable`] can generate classes that can parse the
99
[`YamlMap`] type provided by [`package:yaml`] when `anyMap: true` is specified
10-
for the class annotation.
10+
for the class annotation.
1111

1212
```dart
1313
@JsonSerializable(

example/README.md

+5-4
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
*This example assumes you're using a recent version of the Dart or Flutter SDK.*
1+
_This example assumes you're using a recent version of the Dart or Flutter SDK._
22

33
To use [package:json_serializable][json_serializable] in your package, add these
44
dependencies to your `pubspec.yaml`.
@@ -15,10 +15,10 @@ dev_dependencies:
1515
Annotate your code with classes defined in
1616
[package:json_annotation][json_annotation].
1717
18-
* See [`lib/example.dart`][example] for an example of a file using these
18+
- See [`lib/example.dart`][example] for an example of a file using these
1919
annotations.
2020

21-
* See [`lib/example.g.dart`][example_g] for the generated file.
21+
- See [`lib/example.g.dart`][example_g] for the generated file.
2222

2323
Run `pub run build_runner build` to generate files into your source directory.
2424

@@ -32,7 +32,8 @@ Run `pub run build_runner build` to generate files into your source directory.
3232
[INFO] Build: Succeeded after 4687ms with 1 outputs
3333
```
3434

35-
*NOTE*: If you're using Flutter, replace `pub run` with `flutter packages pub run`.
35+
_NOTE_: If you're using Flutter, replace `pub run` with
36+
`flutter packages pub run`.
3637

3738
[example]: lib/example.dart
3839
[example_g]: lib/example.g.dart

0 commit comments

Comments
 (0)