Skip to content

Fetch from upstream #1

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

Open
wants to merge 191 commits into
base: custom_generated_extension
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
191 commits
Select commit Hold shift + click to select a range
8f73952
Update json_key_utils.dart (#1027)
Nov 11, 2021
1aab1ec
added test for SameCtorAndJsonKeyDefaultValue (#1028)
Nov 12, 2021
b7302ca
Ignore text_direction_code_point_in_literal in generated code (#1030)
kevmoo Nov 12, 2021
d8b0594
Updated the tostring for UnrecognizedKeysException & DisallowedNullVa…
vanlooverenkoen Nov 26, 2021
11b2561
annotation: follow-up to exception toString fixes (#1042)
kevmoo Nov 26, 2021
76f8893
Bump actions/cache from 2.1.6 to 2.1.7 (#1043)
dependabot[bot] Nov 29, 2021
a36f266
doc comments are nice!
kevmoo Nov 26, 2021
d2fe514
Allow customizable "reading" of JSON maps (#1045)
kevmoo Nov 29, 2021
efda158
Fix typo that changes meaning of sentence (peak != peek) (#1046)
fzyzcjy Nov 30, 2021
c6d3490
Cleanup changelog
kevmoo Dec 1, 2021
85ac59f
Just warn (don't fail) when the json_annotation constraint looks wrong
kevmoo Dec 1, 2021
cd77f7a
Don't assume we need a constructor too early in build process (#1049)
kevmoo Dec 1, 2021
04af01c
beta release of pkg:json_annotation (#1050)
kevmoo Dec 1, 2021
3cd08a8
json_annotation: prepare release (#1051)
kevmoo Dec 1, 2021
3c1a734
json_serializable: make things private that can be private (#1052)
kevmoo Dec 1, 2021
1a8c00b
json_serializable: prepare to release v6.1.0 (#1053)
kevmoo Dec 1, 2021
39467a3
Fix support for static functions with JsonKey.readValue (#1058)
kevmoo Dec 2, 2021
c8474bf
Bump actions/setup-node from 2.4.1 to 2.5.0 (#1059)
dependabot[bot] Dec 6, 2021
1b46dce
latest mono_repo
kevmoo Dec 10, 2021
2d660a4
latest build_verify
kevmoo Dec 10, 2021
c03e84b
Add 2x timeout factor to all "ensure_build" tests
kevmoo Dec 16, 2021
13fe0c8
Fix issue with nested generics and `genericArgumentFactories: true`
kevmoo Dec 16, 2021
d2e6a41
Allow latest pkg:analyzer, prepare pkg:json_serializable v6.1.3 (#1069)
kevmoo Dec 17, 2021
b8c6f5a
fix version
kevmoo Dec 17, 2021
ad41376
Bump actions/setup-node from 2.5.0 to 2.5.1 (#1079)
dependabot[bot] Jan 3, 2022
6cef1eb
[Backpatch to v3] Widen analyzer range to allow v1 (#1082)
evanweible-wf Jan 6, 2022
da0307d
Merge branch 'v3_x'
kevmoo Jan 6, 2022
ae20162
Resolve issue with latest analyzer, enums and annotations
kevmoo Jan 13, 2022
61d0893
fix an updated lint
kevmoo Jan 13, 2022
df37429
Move to strict casts (#1086)
kevmoo Jan 26, 2022
4de8c1f
example: Bump json_annotation version constraint
kevmoo Feb 3, 2022
41b5a27
New infra package to share code across the mono repo
kevmoo Feb 3, 2022
2dfffd0
example: Add an example demonstrating how to do nested fields
kevmoo Feb 3, 2022
58f46ad
More sharing of test logic
kevmoo Feb 3, 2022
b975aac
Fix readme typo (#1091)
kevmoo Feb 7, 2022
949494a
Bump actions/setup-node from 2.5.1 to 3 (#1103)
dependabot[bot] Feb 28, 2022
ff32528
Bump actions/checkout from 2.4.0 to 3 (#1109)
dependabot[bot] Mar 7, 2022
74e6d01
Fix enum support for upcoming enhanced enums in Dart 2.17 (#1111)
kevmoo Mar 7, 2022
e47633d
Bump actions/cache from 2.1.7 to 3 (#1122)
dependabot[bot] Apr 1, 2022
f484a8d
add mono_pkg.yaml file to shared_test package (#1127)
jakemac53 Apr 5, 2022
89602c5
latest pkg:analyzer (#1130)
kevmoo Apr 14, 2022
51c45e8
Update pubspec.yaml (#1134)
devoncarew Apr 20, 2022
6687178
Update dependabot.yml
kevmoo Apr 21, 2022
ab218c7
Add support for screaming snake case (#1118)
zbarbuto Apr 26, 2022
0d836a4
changelog and pubspec tweaks (#1141)
kevmoo Apr 26, 2022
5dbb1b2
Prepare to release json_serializable v6.2.0 (#1142)
kevmoo Apr 27, 2022
09cca32
Support using non-nullable JsonConverter on nullable properties (#1136)
rrousselGit Apr 28, 2022
d5d73b8
Bump actions/checkout from 3.0.0 to 3.0.2 (#1137)
dependabot[bot] Apr 28, 2022
51224ed
Ignore deprecated API usage (#1150)
kevmoo May 22, 2022
8aadb45
Add JsonConverter(converters) option (#1135)
rrousselGit May 24, 2022
dee0e5a
Fix test annotations (#1160)
kevmoo Jun 19, 2022
4982848
Update README.md (#1161)
erlangparasu Jun 25, 2022
0f383e7
Serializing enums explicitly references types unless nullable (issue …
ssabdb Jun 25, 2022
25c6138
feat: Add JsonSerializable(createJsonMeta) (#1164)
rrousselGit Jun 28, 2022
8a0e71e
Latest mono_repo (#1165)
kevmoo Jun 30, 2022
decbda1
Prepare to release json_serializable v6.3.0 (#1169)
kevmoo Jul 7, 2022
f50eb99
Fix support for Duration fields with default values (#1172)
kevmoo Jul 8, 2022
5c26a0a
Update to latest pkg:analyzer, bump SDK constraint (#1180)
kevmoo Aug 1, 2022
10dd2ee
Fix JsonConverter docs example (#1193)
feinstein Aug 28, 2022
b1cd6be
latest mono_repo, ignore hints for now, use pubspec feature (#1197)
kevmoo Sep 7, 2022
e30a519
latest pkg:analyzer, prepare to publish (#1200)
kevmoo Sep 13, 2022
572e813
json_serialiable: fix bug with pkg:build output in test (#1201)
kevmoo Sep 19, 2022
9143b83
Add JsonEnum.valueField for encoding enhanced enum values (#1203)
kevmoo Sep 20, 2022
52236b0
json_serializable: refactor enum logic (#1204)
kevmoo Sep 20, 2022
12414e0
json_serialiable: make utility function private
kevmoo Sep 20, 2022
feadf4c
json_serializable: more enum util cleanup (#1205)
kevmoo Sep 21, 2022
c844625
json_serializable: prepare to release v6.4.0 (#1206)
kevmoo Sep 21, 2022
89d75b9
Add more documentation about JsonEnum (#1209)
kevmoo Sep 27, 2022
f94edb2
Fix a bug when annotated classes also use mixins (#1211)
kevmoo Sep 28, 2022
9b8050c
json_serializable: fix readme spelling, DRY up some type logic (#1212)
kevmoo Sep 28, 2022
aee8507
Support `ConstructorElement` (#1183)
AlexV525 Sep 28, 2022
f8dc218
changelog cleanup, add more examples to readme (#1213)
kevmoo Sep 29, 2022
7d3bf20
Latest mono_repo (#1215)
kevmoo Oct 3, 2022
0e89d96
Support Function values for JsonKey.default value (#1216)
kevmoo Oct 5, 2022
a79c6b7
Fix BigInt, DateTime, Uri JsonKey.defaultValue w/ a function (#1220)
kevmoo Oct 10, 2022
5107ac1
Improve encoding of values to handle null cases (#1223)
kevmoo Oct 17, 2022
cc084e5
CI: use latest mono_repo (#1224)
kevmoo Oct 17, 2022
fed0f2e
Fix build (#1225)
kevmoo Oct 17, 2022
227da7a
Fix handling of nullable `enum` fields with `includeIfNull: false` (#…
kevmoo Oct 19, 2022
2cfe92a
Fix encoding nullable values with converters, prepare for release (#1…
kevmoo Oct 25, 2022
def4b1e
Upgrade analyzer to 5.2.0 and fix deprecated warnings (#1232)
rrousselGit Oct 27, 2022
f37664a
Add JsonSerializable.createPerFieldToJson (#1230)
rrousselGit Nov 3, 2022
916a9bf
Update dependabot.yml (#1237)
kevmoo Nov 3, 2022
ce62f86
Fix actions in markdown_linter (#1240)
kevmoo Nov 11, 2022
ae72ad6
Cleanup .gitignore (#1247)
kevmoo Nov 15, 2022
f35aceb
annotation: fix changelog (#1246)
kevmoo Nov 15, 2022
caf3a15
Support `JsonEnum.valueField` being set with `'index'` (#1250)
kevmoo Nov 17, 2022
16284aa
Update re-response logic (#1253)
kevmoo Nov 17, 2022
f6614d3
Refactor some enum helpers
kevmoo Nov 21, 2022
7638402
tool: share formatter
kevmoo Nov 22, 2022
776df7c
Add JsonKey.includeFromJson/includeToJson - allow explicit control of…
kevmoo Nov 30, 2022
c6836ae
update example readme to use "dart run" over "pub run" (#1258)
MisterJimson Dec 5, 2022
b5c7af1
Work around SDK issue in v3.0-dev (#1262)
kevmoo Dec 19, 2022
e8f2b32
Prepare checked_yaml v2.0.2 release (#1265)
kevmoo Jan 2, 2023
388010e
checked_yaml: drop dep overrides (#1266)
kevmoo Jan 2, 2023
58db73b
Latest mono_repo (#1267)
kevmoo Jan 14, 2023
44d0080
Prepare to release pkg:json_annotation v4.8.0 (#1268)
kevmoo Jan 19, 2023
832fc7b
Prepare to release json_serializable v6.6.0 (#1269)
kevmoo Jan 19, 2023
bccf4b3
example: cleanup readme and pubspec (#1270)
kevmoo Jan 19, 2023
217f21e
Enable and fix new lints (#1274)
kevmoo Jan 31, 2023
5ab5072
Bump actions/setup-node from 3.5.1 to 3.6.0 (#1278)
dependabot[bot] Feb 1, 2023
8f31d52
Latest CI actions (#1279)
kevmoo Feb 1, 2023
d49a5f2
Fix bug when `JsonKey.includeToJson` is `false` (#1281)
kevmoo Feb 1, 2023
707e4a0
Move to dart_flutter_team_lints with associated cleanup (#1282)
kevmoo Feb 8, 2023
38ca2bb
blast_repo fixes (#1288)
kevmoo Feb 24, 2023
5aa5a5f
chore: use latest dart_flutter_team_lints, bump min SDK (#1289)
kevmoo Feb 24, 2023
ff9d138
Latest cache actions (#1292)
kevmoo Mar 1, 2023
393cb43
Fix formatting with the latest SDK (#1295)
kevmoo Mar 13, 2023
06e14e9
Update no-response.yml - once a day
kevmoo Mar 13, 2023
2798034
latest mono_repo and actions (#1296)
kevmoo Mar 22, 2023
b2ea4bf
Bump actions/checkout from 3.4.0 to 3.5.0 (#1301)
dependabot[bot] Apr 2, 2023
190f8b1
typo fix (#1305)
AlexeyBukin Apr 18, 2023
5422fd4
Correctly handle Object?/dynamic as to/from json param type (#1307)
kevmoo Apr 26, 2023
2685abf
A few proposed topics (#1309)
jonasfj May 2, 2023
2e79481
Bump actions/checkout from 3.5.0 to 3.5.2 (#1308)
dependabot[bot] May 3, 2023
4c7609d
annotation: Prepare to release v4.8.1 (#1310)
kevmoo May 3, 2023
979c455
json_serializable: prepare to release v6.6.2 (#1311)
kevmoo May 3, 2023
d8d41af
checked_yaml: prepare to publish 2.0.3 (#1312)
kevmoo May 3, 2023
8c39dd2
Require Dart 3 and latest analyzer (#1319)
kevmoo May 16, 2023
be8e9a3
Support Dart 3 Record types (#1314)
kevmoo May 16, 2023
755d5d3
Records: more testing (#1320)
kevmoo May 16, 2023
1632d28
latest mono_repo
kevmoo May 26, 2023
288dbdb
Unify dart and flutter generation instructions (#1329)
JAicewizard Jun 14, 2023
facdb5e
Support latest pkg:analyzer, release v6.7.1 (#1333)
kevmoo Jun 30, 2023
2185e8b
add Example.property field to docstring in example (#1337)
CicadaCinema Jul 11, 2023
4e8e9ac
Require Dart 3 across the board, use switch expressions (#1344)
kevmoo Aug 8, 2023
ff0e0fd
Standardize analyze across packages (#1345)
kevmoo Aug 9, 2023
aee214d
Bump actions/setup-node from 3.6.0 to 3.8.1 (#1352)
dependabot[bot] Sep 1, 2023
b1b0998
Bump actions/checkout from 3.5.2 to 3.6.0 (#1351)
dependabot[bot] Sep 1, 2023
85e8364
Replace deprecated "dart pub run" with "dart run" (#1353)
tatsuyafujisaki Sep 13, 2023
d055d49
Typo fix in utils.dart (#1363)
Serena867 Oct 23, 2023
df42558
Bump actions/cache from 3.3.1 to 3.3.2 (#1359)
dependabot[bot] Oct 25, 2023
fe636b1
Bump dart-lang/setup-dart from 1.5.0 to 1.5.1 (#1358)
dependabot[bot] Oct 25, 2023
e2c8bad
Bump actions/checkout from 3.6.0 to 4.1.0 (#1357)
dependabot[bot] Oct 25, 2023
f8e57b5
Update to latest lints (#1361)
kevmoo Oct 26, 2023
f7cb516
flutter pub run notice removed (#1364)
LassazVegaz Oct 28, 2023
a072c01
blast_repo fixes (#1383)
kevmoo Dec 20, 2023
ce2de93
Bump actions/stale from 8.0.0 to 9.0.0 (#1387)
dependabot[bot] Jan 1, 2024
ac8b941
Bump actions/setup-node from 3.8.1 to 4.0.1 (#1386)
dependabot[bot] Jan 1, 2024
7162134
Bump actions/checkout from 4.1.0 to 4.1.1 (#1366)
dependabot[bot] Jan 1, 2024
7f1c192
Bump dart-lang/setup-dart from 1.5.1 to 1.6.0 (#1367)
dependabot[bot] Jan 1, 2024
84e3c2a
CI: fix markdown lint (#1389)
kevmoo Jan 15, 2024
e9527ee
blast_repo fixes (#1390)
kevmoo Jan 15, 2024
28f7c9a
Bump actions/cache from 3.3.3 to 4.0.0 (#1397)
dependabot[bot] Feb 28, 2024
3a833d9
Bump DavidAnson/markdownlint-cli2-action from 14.0.0 to 15.0.0 (#1395)
dependabot[bot] Feb 28, 2024
24a830c
Bump dart-lang/setup-dart from 1.6.1 to 1.6.2 (#1396)
dependabot[bot] Feb 28, 2024
324acee
Bump actions/cache from 4.0.0 to 4.0.1 (#1404)
dependabot[bot] Mar 1, 2024
5b46ef9
Added createJsonKeys (#1401)
ChreSyr Mar 3, 2024
1bfb616
Bump actions/cache from 4.0.1 to 4.0.2 (#1411)
dependabot[bot] Apr 5, 2024
1694d6f
Bump actions/checkout from 4.1.1 to 4.1.2 (#1410)
dependabot[bot] Apr 5, 2024
dbe976a
Make casts to int safe in dart2wasm. (#1416)
eyebrowsoffire Apr 24, 2024
eea959d
json_annotation: prepare to release v4.9.0 (#1417)
kevmoo Apr 24, 2024
9694cc5
json_serializable: publish v6.8.0 (#1418)
kevmoo Apr 24, 2024
02e17e5
checked_yaml: fix test source (#1419)
kevmoo Apr 24, 2024
629d369
Update analyzer version and min SDK constraint and fix analysis issue…
kevmoo May 20, 2024
a7f3893
--- (#1429)
dependabot[bot] May 20, 2024
c672f2d
Bump dart-lang/setup-dart from 1.6.2 to 1.6.4 (#1424)
dependabot[bot] May 20, 2024
a58b190
Bump DavidAnson/markdownlint-cli2-action from 15.0.0 to 16.0.0 (#1423)
dependabot[bot] May 20, 2024
23dd460
blast_repo fixes (#1430)
kevmoo May 20, 2024
ca77b65
Bump the dependencies group with 2 updates (#1434)
dependabot[bot] Jul 1, 2024
ac55cd4
Move to use (experimental) workspaces (#1433)
kevmoo Aug 5, 2024
27df699
Move SDK constraint to map to 3.5 stable (#1440)
kevmoo Aug 6, 2024
9ccbbb2
Update and fix lints (#1442)
kevmoo Aug 8, 2024
55d68f4
Use map syntax to clean up `null` handling in `toJson` functions (#1443)
kevmoo Aug 9, 2024
59c6376
Ignore lint about deprecated pkg:analyzer API (#1447)
kevmoo Sep 30, 2024
3e4dbe3
Bump the dependencies group with 2 updates (#1448)
dependabot[bot] Oct 8, 2024
2c2c78d
blast_repo fixes (#1452)
kevmoo Oct 29, 2024
2cb379b
Bump the dependencies group with 2 updates (#1453)
dependabot[bot] Nov 1, 2024
396ef69
Refactor JsonKey class documentation to improve code readability and …
paulperez-dev Nov 12, 2024
37b2a65
Fix lints and docs (#1457)
kevmoo Nov 18, 2024
f76e7df
Prepare release 6.9 (#1458)
kevmoo Nov 19, 2024
d3cee99
Bump the dependencies group with 2 updates (#1461)
dependabot[bot] Dec 1, 2024
52c25cc
Support latest packages, bump min SDK to 3.6 (#1465)
kevmoo Dec 17, 2024
d8311be
Actually bump pkg:analyzer dep (#1466)
kevmoo Dec 17, 2024
958e520
Fix newly added strict_top_level_inference everywhere (#1467)
kevmoo Jan 2, 2025
ca038a4
Bump the dependencies group with 2 updates (#1469)
dependabot[bot] Jan 2, 2025
3318916
Update no-response.yml (#1470)
kevmoo Jan 2, 2025
3dd6767
Error out if the language version of the target package is too low (#…
kevmoo Jan 13, 2025
83377d0
Bump the dependencies group with 2 updates (#1476)
dependabot[bot] Feb 4, 2025
51c2142
Enable and fix unnecessary_ignore lint (#1477)
kevmoo Feb 6, 2025
9e8c2fd
Fix extra line with Dart 3.7 syntax (#1478)
kevmoo Feb 12, 2025
5716df7
Bump the dependencies group with 2 updates (#1482)
dependabot[bot] Mar 2, 2025
a4edc02
Update README.md (#1475)
travis-mortimer Mar 3, 2025
d05428e
Bump actions/cache from 4.2.2 to 4.2.3 in the dependencies group (#1484)
dependabot[bot] Apr 1, 2025
cd1cf2e
Fix for latest analyzer (#1487)
kevmoo Apr 17, 2025
062771b
Drop pkg:collection usage in lib (#1488)
kevmoo Apr 17, 2025
cacecd2
Swap out link to StackOverflow, which fails verification (#1495)
kevmoo May 31, 2025
5848ba8
Bump DavidAnson/markdownlint-cli2-action in the dependencies group (#…
dependabot[bot] Jun 1, 2025
83e7905
new Dart version, new format (#1494)
kevmoo Jun 2, 2025
275eba6
Default to new, null-aware element feature in Dart 3.8 (#1498)
kevmoo Jun 4, 2025
d30c2fd
checked_yaml: prepare release (#1500)
kevmoo Jun 5, 2025
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
8 changes: 2 additions & 6 deletions .github/ISSUE_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,5 @@ In order to route, prioritize, and act on this, please include the entire output
of either `dart --version` or `flutter --version`, depending on what
you're using.

Is it really an issue? For general questions consider starting with Stack
Overflow:
https://stackoverflow.com/questions/tagged/dart

Also consider our Gitter channel for light-weight/quick discussions:
https://gitter.im/dart-lang/build
Is it really an issue? For general questions consider starting with community
resources: https://dart.dev/community
13 changes: 9 additions & 4 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,13 @@
version: 2
updates:

- package-ecosystem: "github-actions"
directory: "/"
- package-ecosystem: github-actions
directory: /
schedule:
# Check for updates to GitHub Actions weekly
interval: "weekly"
interval: monthly
labels:
- autosubmit
groups:
dependencies:
patterns:
- "*"
16 changes: 0 additions & 16 deletions .github/no-response.yml

This file was deleted.

367 changes: 187 additions & 180 deletions .github/workflows/dart.yml

Large diffs are not rendered by default.

18 changes: 4 additions & 14 deletions .github/workflows/markdown_linter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,20 +11,10 @@ jobs:
markdown-link-check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2.3.5
- uses: gaurav-nelson/github-action-markdown-link-check@v1
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
- uses: gaurav-nelson/github-action-markdown-link-check@5c5dfc0ac2e225883c0e5f03a85311ec2830d368
markdown_lint:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [ 14.x ]
steps:
- uses: actions/checkout@v2.3.5
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v2.4.1
with:
node-version: ${{ matrix.node-version }}
- name: Install dependencies
run: npm install --global markdownlint-cli2
- name: Run lint check
run: markdownlint-cli2-fix "**/*.md"
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
- uses: DavidAnson/markdownlint-cli2-action@992badcdf24e3b8eb7e87ff9287fe931bcb00c6e
37 changes: 37 additions & 0 deletions .github/workflows/no-response.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# A workflow to close issues where the author hasn't responded to a request for
# more information; see https://github.com/actions/stale.

name: No Response

# Run as a daily cron.
on:
schedule:
# Every day at 8am
- cron: '0 8 * * *'

# All permissions not specified are set to 'none'.
permissions:
issues: write
pull-requests: write

jobs:
no-response:
runs-on: ubuntu-latest
if: ${{ github.repository_owner == 'google' }}
steps:
- uses: actions/stale@5bef64f19d7facfb25b37b414482c7164d639639
with:
# Don't automatically mark inactive issues+PRs as stale.
days-before-stale: -1
# Close needs-info issues and PRs after 14 days of inactivity.
days-before-close: 14
stale-issue-label: "State: needs info"
close-issue-message: >
Without additional information we're not able to resolve this issue.
Feel free to add more info or respond to any questions above and we
can reopen the case. Thanks for your contribution!
stale-pr-label: "State: needs info"
close-pr-message: >
Without additional information we're not able to resolve this PR.
Feel free to add more info or respond to any questions above.
Thanks for your contribution!
17 changes: 17 additions & 0 deletions .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# A CI configuration to auto-publish pub packages.

name: Publish

on:
pull_request:
branches: [ master ]
push:
tags: [ '[A-z]+-v[0-9]+.[0-9]+.[0-9]+' ]

jobs:
publish:
if: ${{ github.repository_owner == 'google' }}
uses: dart-lang/ecosystem/.github/workflows/publish.yaml@main
permissions:
id-token: write # Required for authentication using OIDC
pull-requests: write # Required for writing the pull request note
4 changes: 1 addition & 3 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
# https://dart.dev/guides/libraries/private-files
.dart_tool
.packages
.pub
packages
pubspec.lock
8 changes: 6 additions & 2 deletions _test_yaml/mono_pkg.yaml
Original file line number Diff line number Diff line change
@@ -1,13 +1,17 @@
# See https://github.com/google/mono_repo.dart for details on this file
dart:
- 2.14.0
sdk:
- pubspec
- dev

stages:
- analyzer_and_format:
- group:
- format
- analyze: --fatal-infos .
sdk: dev
- group:
- analyze
sdk: pubspec
- unit_test:
- test
- ensure_build:
Expand Down
27 changes: 12 additions & 15 deletions _test_yaml/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,18 @@ name: _test_yaml
publish_to: none

environment:
sdk: '>=2.14.0 <3.0.0'
sdk: ^3.8.0

resolution: workspace

dev_dependencies:
build_runner: ^2.0.0
build_verify: ^2.0.0
checked_yaml: any
json_annotation: ^4.3.0
json_serializable: any
test: ^1.6.0
_json_serial_shared_test:
path: ../shared_test
build_runner: ^2.2.1
build_verify: ^3.0.0
checked_yaml: ^2.0.4-wip
json_annotation: ^4.9.0
json_serializable: ^6.8.0
path: ^1.8.2
test: ^1.21.6
yaml: ^3.0.0

dependency_overrides:
checked_yaml:
path: ../checked_yaml
json_annotation:
path: ../json_annotation
json_serializable:
path: ../json_serializable
9 changes: 7 additions & 2 deletions _test_yaml/test/ensure_build_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,15 @@

@TestOn('vm')
@Tags(['presubmit-only'])
library;

import 'package:build_verify/build_verify.dart';
import 'package:test/test.dart';

void main() {
test('ensure_build',
() => expectBuildClean(packageRelativeDirectory: '_test_yaml'));
test(
'ensure_build',
() => expectBuildClean(packageRelativeDirectory: '_test_yaml'),
timeout: const Timeout.factor(2),
);
}
29 changes: 14 additions & 15 deletions _test_yaml/test/src/build_config.dart
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ class Config {
final Map<String, Builder> builders;

// Verifying enum keys in map
Map<AutoApply, int>? weights;
Map<AutoApply, int?>? weights;

Config({required this.builders});

Expand All @@ -22,14 +22,15 @@ class Config {
}

@JsonSerializable(
includeIfNull: false,
disallowUnrecognizedKeys: true,
checked: true,
anyMap: true)
includeIfNull: false,
disallowUnrecognizedKeys: true,
checked: true,
anyMap: true,
)
class Builder {
final String? target;

final String import;
final String? import;

@JsonKey(name: 'is_optional')
final bool? isOptional;
Expand Down Expand Up @@ -58,7 +59,7 @@ class Builder {
final Map<String, List<String>>? buildExtensions;

Builder({
required this.import,
this.import,
this.target,
this.isOptional,
this.autoApply,
Expand All @@ -71,8 +72,11 @@ class Builder {
this.configLocation,
}) {
if (builderFactories.isEmpty) {
throw ArgumentError.value(builderFactories, 'builderFactories',
'Must have at least one value.');
throw ArgumentError.value(
builderFactories,
'builderFactories',
'Must have at least one value.',
);
}
}

Expand All @@ -82,11 +86,6 @@ class Builder {
}

@JsonEnum(fieldRename: FieldRename.snake)
enum AutoApply {
none,
dependents,
allPackages,
rootPackage,
}
enum AutoApply { none, dependents, allPackages, rootPackage }

enum BuildTo { cache, source }
Loading