diff --git a/.github/workflows/dart.yml b/.github/workflows/dart.yml index 6f87f7700..1176b3094 100644 --- a/.github/workflows/dart.yml +++ b/.github/workflows/dart.yml @@ -1,4 +1,4 @@ -# Created with package:mono_repo v3.4.5 +# Created with package:mono_repo v3.4.6 name: Dart CI on: push: @@ -33,11 +33,95 @@ jobs: - id: checkout uses: actions/checkout@v2 - name: mono_repo self validate - run: pub global activate mono_repo 3.4.5 + run: pub global activate mono_repo 3.4.6 - name: mono_repo self validate run: pub global run mono_repo generate --validate job_002: - name: "analyzer_and_format; PKGS: _test_yaml, checked_yaml, example, json_annotation, json_serializable; `dartfmt -n --set-exit-if-changed .`, `dartanalyzer --fatal-infos .`" + name: "analyzer_and_format; Dart beta; PKGS: _test_yaml, checked_yaml, example, json_annotation, json_serializable; `dartfmt -n --set-exit-if-changed .`, `dartanalyzer --fatal-infos .`" + runs-on: ubuntu-latest + steps: + - name: Cache Pub hosted dependencies + uses: actions/cache@v2 + with: + path: "~/.pub-cache/hosted" + key: "os:ubuntu-latest;pub-cache-hosted;dart:beta;packages:_test_yaml-checked_yaml-example-json_annotation-json_serializable;commands:dartfmt-dartanalyzer" + restore-keys: | + os:ubuntu-latest;pub-cache-hosted;dart:beta;packages:_test_yaml-checked_yaml-example-json_annotation-json_serializable + os:ubuntu-latest;pub-cache-hosted;dart:beta + os:ubuntu-latest;pub-cache-hosted + os:ubuntu-latest + - uses: dart-lang/setup-dart@v0.3 + with: + sdk: beta + - id: checkout + uses: actions/checkout@v2 + - id: _test_yaml_pub_upgrade + name: "_test_yaml; pub upgrade --no-precompile" + if: "always() && steps.checkout.conclusion == 'success'" + working-directory: _test_yaml + run: pub upgrade --no-precompile + - name: "_test_yaml; dartfmt -n --set-exit-if-changed ." + if: "always() && steps._test_yaml_pub_upgrade.conclusion == 'success'" + working-directory: _test_yaml + run: dartfmt -n --set-exit-if-changed . + - name: "_test_yaml; dartanalyzer --fatal-infos ." + if: "always() && steps._test_yaml_pub_upgrade.conclusion == 'success'" + working-directory: _test_yaml + run: dartanalyzer --fatal-infos . + - id: checked_yaml_pub_upgrade + name: "checked_yaml; pub upgrade --no-precompile" + if: "always() && steps.checkout.conclusion == 'success'" + working-directory: checked_yaml + run: pub upgrade --no-precompile + - name: "checked_yaml; dartfmt -n --set-exit-if-changed ." + if: "always() && steps.checked_yaml_pub_upgrade.conclusion == 'success'" + working-directory: checked_yaml + run: dartfmt -n --set-exit-if-changed . + - name: "checked_yaml; dartanalyzer --fatal-infos ." + if: "always() && steps.checked_yaml_pub_upgrade.conclusion == 'success'" + working-directory: checked_yaml + run: dartanalyzer --fatal-infos . + - id: example_pub_upgrade + name: "example; pub upgrade --no-precompile" + if: "always() && steps.checkout.conclusion == 'success'" + working-directory: example + run: pub upgrade --no-precompile + - name: "example; dartfmt -n --set-exit-if-changed ." + if: "always() && steps.example_pub_upgrade.conclusion == 'success'" + working-directory: example + run: dartfmt -n --set-exit-if-changed . + - name: "example; dartanalyzer --fatal-infos ." + if: "always() && steps.example_pub_upgrade.conclusion == 'success'" + working-directory: example + run: dartanalyzer --fatal-infos . + - id: json_annotation_pub_upgrade + name: "json_annotation; pub upgrade --no-precompile" + if: "always() && steps.checkout.conclusion == 'success'" + working-directory: json_annotation + run: pub upgrade --no-precompile + - name: "json_annotation; dartfmt -n --set-exit-if-changed ." + if: "always() && steps.json_annotation_pub_upgrade.conclusion == 'success'" + working-directory: json_annotation + run: dartfmt -n --set-exit-if-changed . + - name: "json_annotation; dartanalyzer --fatal-infos ." + if: "always() && steps.json_annotation_pub_upgrade.conclusion == 'success'" + working-directory: json_annotation + run: dartanalyzer --fatal-infos . + - id: json_serializable_pub_upgrade + name: "json_serializable; pub upgrade --no-precompile" + if: "always() && steps.checkout.conclusion == 'success'" + working-directory: json_serializable + run: pub upgrade --no-precompile + - name: "json_serializable; dartfmt -n --set-exit-if-changed ." + if: "always() && steps.json_serializable_pub_upgrade.conclusion == 'success'" + working-directory: json_serializable + run: dartfmt -n --set-exit-if-changed . + - name: "json_serializable; dartanalyzer --fatal-infos ." + if: "always() && steps.json_serializable_pub_upgrade.conclusion == 'success'" + working-directory: json_serializable + run: dartanalyzer --fatal-infos . + job_003: + name: "analyzer_and_format; Dart dev; PKGS: _test_yaml, checked_yaml, example, json_annotation, json_serializable; `dartfmt -n --set-exit-if-changed .`, `dartanalyzer --fatal-infos .`" runs-on: ubuntu-latest steps: - name: Cache Pub hosted dependencies @@ -120,8 +204,67 @@ jobs: if: "always() && steps.json_serializable_pub_upgrade.conclusion == 'success'" working-directory: json_serializable run: dartanalyzer --fatal-infos . - job_003: - name: "unit_test; PKGS: _test_yaml, checked_yaml, example, json_serializable; `pub run test`" + job_004: + name: "unit_test; Dart beta; PKGS: _test_yaml, checked_yaml, example, json_serializable; `pub run test`" + runs-on: ubuntu-latest + steps: + - name: Cache Pub hosted dependencies + uses: actions/cache@v2 + with: + path: "~/.pub-cache/hosted" + key: "os:ubuntu-latest;pub-cache-hosted;dart:beta;packages:_test_yaml-checked_yaml-example-json_serializable;commands:test_0" + restore-keys: | + os:ubuntu-latest;pub-cache-hosted;dart:beta;packages:_test_yaml-checked_yaml-example-json_serializable + os:ubuntu-latest;pub-cache-hosted;dart:beta + os:ubuntu-latest;pub-cache-hosted + os:ubuntu-latest + - uses: dart-lang/setup-dart@v0.3 + with: + sdk: beta + - id: checkout + uses: actions/checkout@v2 + - id: _test_yaml_pub_upgrade + name: "_test_yaml; pub upgrade --no-precompile" + if: "always() && steps.checkout.conclusion == 'success'" + working-directory: _test_yaml + run: pub upgrade --no-precompile + - name: _test_yaml; pub run test + if: "always() && steps._test_yaml_pub_upgrade.conclusion == 'success'" + working-directory: _test_yaml + run: pub run test + - id: checked_yaml_pub_upgrade + name: "checked_yaml; pub upgrade --no-precompile" + if: "always() && steps.checkout.conclusion == 'success'" + working-directory: checked_yaml + run: pub upgrade --no-precompile + - name: checked_yaml; pub run test + if: "always() && steps.checked_yaml_pub_upgrade.conclusion == 'success'" + working-directory: checked_yaml + run: pub run test + - id: example_pub_upgrade + name: "example; pub upgrade --no-precompile" + if: "always() && steps.checkout.conclusion == 'success'" + working-directory: example + run: pub upgrade --no-precompile + - name: example; pub run test + if: "always() && steps.example_pub_upgrade.conclusion == 'success'" + working-directory: example + run: pub run test + - id: json_serializable_pub_upgrade + name: "json_serializable; pub upgrade --no-precompile" + if: "always() && steps.checkout.conclusion == 'success'" + working-directory: json_serializable + run: pub upgrade --no-precompile + - name: json_serializable; pub run test + if: "always() && steps.json_serializable_pub_upgrade.conclusion == 'success'" + working-directory: json_serializable + run: pub run test + needs: + - job_001 + - job_002 + - job_003 + job_005: + name: "unit_test; Dart dev; PKGS: _test_yaml, checked_yaml, example, json_serializable; `pub run test`" runs-on: ubuntu-latest steps: - name: Cache Pub hosted dependencies @@ -178,8 +321,41 @@ jobs: needs: - job_001 - job_002 - job_004: - name: "unit_test; PKG: json_serializable; `pub run test -p chrome`" + - job_003 + job_006: + name: "unit_test; Dart beta; PKG: json_serializable; `pub run test -p chrome`" + runs-on: ubuntu-latest + steps: + - name: Cache Pub hosted dependencies + uses: actions/cache@v2 + with: + path: "~/.pub-cache/hosted" + key: "os:ubuntu-latest;pub-cache-hosted;dart:beta;packages:json_serializable;commands:test_2" + restore-keys: | + os:ubuntu-latest;pub-cache-hosted;dart:beta;packages:json_serializable + os:ubuntu-latest;pub-cache-hosted;dart:beta + os:ubuntu-latest;pub-cache-hosted + os:ubuntu-latest + - uses: dart-lang/setup-dart@v0.3 + with: + sdk: beta + - id: checkout + uses: actions/checkout@v2 + - id: json_serializable_pub_upgrade + name: "json_serializable; pub upgrade --no-precompile" + if: "always() && steps.checkout.conclusion == 'success'" + working-directory: json_serializable + run: pub upgrade --no-precompile + - name: "json_serializable; pub run test -p chrome" + if: "always() && steps.json_serializable_pub_upgrade.conclusion == 'success'" + working-directory: json_serializable + run: pub run test -p chrome + needs: + - job_001 + - job_002 + - job_003 + job_007: + name: "unit_test; Dart dev; PKG: json_serializable; `pub run test -p chrome`" runs-on: ubuntu-latest steps: - name: Cache Pub hosted dependencies @@ -209,8 +385,72 @@ jobs: needs: - job_001 - job_002 - job_005: - name: "ensure_build; PKGS: _test_yaml, checked_yaml, example, json_serializable; `pub run test --run-skipped -t presubmit-only test/ensure_build_test.dart`" + - job_003 + job_008: + name: "ensure_build; Dart beta; PKGS: _test_yaml, checked_yaml, example, json_serializable; `pub run test --run-skipped -t presubmit-only test/ensure_build_test.dart`" + runs-on: ubuntu-latest + steps: + - name: Cache Pub hosted dependencies + uses: actions/cache@v2 + with: + path: "~/.pub-cache/hosted" + key: "os:ubuntu-latest;pub-cache-hosted;dart:beta;packages:_test_yaml-checked_yaml-example-json_serializable;commands:test_1" + restore-keys: | + os:ubuntu-latest;pub-cache-hosted;dart:beta;packages:_test_yaml-checked_yaml-example-json_serializable + os:ubuntu-latest;pub-cache-hosted;dart:beta + os:ubuntu-latest;pub-cache-hosted + os:ubuntu-latest + - uses: dart-lang/setup-dart@v0.3 + with: + sdk: beta + - id: checkout + uses: actions/checkout@v2 + - id: _test_yaml_pub_upgrade + name: "_test_yaml; pub upgrade --no-precompile" + if: "always() && steps.checkout.conclusion == 'success'" + working-directory: _test_yaml + run: pub upgrade --no-precompile + - name: "_test_yaml; pub run test --run-skipped -t presubmit-only test/ensure_build_test.dart" + if: "always() && steps._test_yaml_pub_upgrade.conclusion == 'success'" + working-directory: _test_yaml + run: pub run test --run-skipped -t presubmit-only test/ensure_build_test.dart + - id: checked_yaml_pub_upgrade + name: "checked_yaml; pub upgrade --no-precompile" + if: "always() && steps.checkout.conclusion == 'success'" + working-directory: checked_yaml + run: pub upgrade --no-precompile + - name: "checked_yaml; pub run test --run-skipped -t presubmit-only test/ensure_build_test.dart" + if: "always() && steps.checked_yaml_pub_upgrade.conclusion == 'success'" + working-directory: checked_yaml + run: pub run test --run-skipped -t presubmit-only test/ensure_build_test.dart + - id: example_pub_upgrade + name: "example; pub upgrade --no-precompile" + if: "always() && steps.checkout.conclusion == 'success'" + working-directory: example + run: pub upgrade --no-precompile + - name: "example; pub run test --run-skipped -t presubmit-only test/ensure_build_test.dart" + if: "always() && steps.example_pub_upgrade.conclusion == 'success'" + working-directory: example + run: pub run test --run-skipped -t presubmit-only test/ensure_build_test.dart + - id: json_serializable_pub_upgrade + name: "json_serializable; pub upgrade --no-precompile" + if: "always() && steps.checkout.conclusion == 'success'" + working-directory: json_serializable + run: pub upgrade --no-precompile + - name: "json_serializable; pub run test --run-skipped -t presubmit-only test/ensure_build_test.dart" + if: "always() && steps.json_serializable_pub_upgrade.conclusion == 'success'" + working-directory: json_serializable + run: pub run test --run-skipped -t presubmit-only test/ensure_build_test.dart + needs: + - job_001 + - job_002 + - job_003 + - job_004 + - job_005 + - job_006 + - job_007 + job_009: + name: "ensure_build; Dart dev; PKGS: _test_yaml, checked_yaml, example, json_serializable; `pub run test --run-skipped -t presubmit-only test/ensure_build_test.dart`" runs-on: ubuntu-latest steps: - name: Cache Pub hosted dependencies @@ -269,3 +509,6 @@ jobs: - job_002 - job_003 - job_004 + - job_005 + - job_006 + - job_007 diff --git a/_test_yaml/mono_pkg.yaml b/_test_yaml/mono_pkg.yaml index fc8565fd2..e99b82ec6 100644 --- a/_test_yaml/mono_pkg.yaml +++ b/_test_yaml/mono_pkg.yaml @@ -1,5 +1,6 @@ # See https://github.com/google/mono_repo.dart for details on this file dart: +- beta # change this to 1.12.0 when it's released! - dev stages: diff --git a/_test_yaml/pubspec.yaml b/_test_yaml/pubspec.yaml index ad32a8485..1343b2698 100644 --- a/_test_yaml/pubspec.yaml +++ b/_test_yaml/pubspec.yaml @@ -11,6 +11,7 @@ dev_dependencies: json_annotation: any json_serializable: any test: ^1.6.0 + yaml: ^3.0.0 dependency_overrides: checked_yaml: @@ -19,6 +20,3 @@ dependency_overrides: path: ../json_annotation json_serializable: path: ../json_serializable - - # For yaml! - yaml: 3.0.0-nullsafety.0 diff --git a/checked_yaml/CHANGELOG.md b/checked_yaml/CHANGELOG.md index b39c887e4..ff1a155c7 100644 --- a/checked_yaml/CHANGELOG.md +++ b/checked_yaml/CHANGELOG.md @@ -1,4 +1,4 @@ -## 2.0.0-nullsafety-dev +## 2.0.0-dev - *BREAKING* `checkedYamlDecode` `sourceUrl` parameter is now a `Uri`. - Require at least Dart `2.12.0-0`. diff --git a/checked_yaml/mono_pkg.yaml b/checked_yaml/mono_pkg.yaml index 18804424f..cf36065b9 100644 --- a/checked_yaml/mono_pkg.yaml +++ b/checked_yaml/mono_pkg.yaml @@ -1,5 +1,6 @@ # See https://github.com/google/mono_repo.dart for details on this file dart: +- beta # change this to 1.12.0 when it's released! - dev stages: diff --git a/checked_yaml/pubspec.yaml b/checked_yaml/pubspec.yaml index 1f3f1867f..8b7674a0d 100644 --- a/checked_yaml/pubspec.yaml +++ b/checked_yaml/pubspec.yaml @@ -1,5 +1,5 @@ name: checked_yaml -version: 1.9.0-nullsafety-dev +version: 1.9.0-dev description: >- Generate more helpful exceptions when decoding YAML documents using @@ -10,15 +10,15 @@ environment: dependencies: json_annotation: '>=2.2.0 <5.0.0' - source_span: ^1.8.0-nullsafety.4 - yaml: ^3.0.0-nullsafety.0 + source_span: ^1.8.0 + yaml: ^3.0.0 dev_dependencies: build_runner: ^1.0.0 build_verify: ^1.1.0 json_serializable: ^3.0.0 path: ^1.0.0 - test: ^1.16.0-nullsafety.7 + test: ^1.16.0 test_process: ^1.0.1 dependency_overrides: @@ -26,6 +26,3 @@ dependency_overrides: path: ../json_annotation json_serializable: path: ../json_serializable - # Need to force yaml for now due to dev dependencies - # build_runner -> build_config -> pubspec_parse - yaml: 3.0.0-nullsafety.0 diff --git a/example/README.md b/example/README.md index 89d25aabc..710bfe171 100644 --- a/example/README.md +++ b/example/README.md @@ -5,11 +5,11 @@ dependencies to your `pubspec.yaml`. ```yaml dependencies: - json_annotation: ^3.0.0 + json_annotation: ^4.0.0 dev_dependencies: build_runner: ^1.0.0 - json_serializable: ^3.2.0 + json_serializable: ^4.0.0 ``` Annotate your code with classes defined in diff --git a/example/mono_pkg.yaml b/example/mono_pkg.yaml index 7ab68ee9f..cf6269f0f 100644 --- a/example/mono_pkg.yaml +++ b/example/mono_pkg.yaml @@ -1,5 +1,6 @@ # See https://github.com/google/mono_repo.dart for details on this file dart: +- beta # change this to 1.12.0 when it's released! - dev stages: diff --git a/example/pubspec.yaml b/example/pubspec.yaml index 0c90886ed..3bd996e31 100644 --- a/example/pubspec.yaml +++ b/example/pubspec.yaml @@ -4,7 +4,7 @@ environment: sdk: '>=2.12.0-0 <3.0.0' dependencies: - json_annotation: ^3.0.0 + json_annotation: ^4.0.0 dev_dependencies: build_runner: ^1.0.0 @@ -12,15 +12,9 @@ dev_dependencies: # Used by tests. Not required to use `json_serializable`. build_verify: ^1.0.0 - json_serializable: ^3.2.0 + json_serializable: ^4.0.0 # Used by tests. Not required to use `json_serializable`. - path: ^1.8.0-nullsafety.3 + path: ^1.8.0 # Used by tests. Not required to use `json_serializable`. - test: ^1.16.0-nullsafety.9 - -dependency_overrides: - json_annotation: - path: ../json_annotation - json_serializable: - path: ../json_serializable + test: ^1.16.0 diff --git a/example/test/readme_test.dart b/example/test/readme_test.dart index 342c07df8..2005b5626 100644 --- a/example/test/readme_test.dart +++ b/example/test/readme_test.dart @@ -25,9 +25,9 @@ void _expect(String fileName) { const _pubspecContent = r''' dependencies: - json_annotation: ^3.0.0 + json_annotation: ^4.0.0 dev_dependencies: build_runner: ^1.0.0 - json_serializable: ^3.2.0 + json_serializable: ^4.0.0 '''; diff --git a/json_annotation/CHANGELOG.md b/json_annotation/CHANGELOG.md index bb76dd097..9beb4d0d6 100644 --- a/json_annotation/CHANGELOG.md +++ b/json_annotation/CHANGELOG.md @@ -1,5 +1,7 @@ -## 4.0.0-nullsafety.0 +## 4.0.0 +- Support null safety. +- Requires Dart 2.12. - Updated `$checkedConvert` helper to support null-safety. - Removed the `nullable` field on `JsonKey` – the constructor entry still exists, but it's marked `@Deprecated`. The nullability of a field is now diff --git a/json_annotation/mono_pkg.yaml b/json_annotation/mono_pkg.yaml index e23fee100..a1250b87f 100644 --- a/json_annotation/mono_pkg.yaml +++ b/json_annotation/mono_pkg.yaml @@ -1,7 +1,10 @@ # See https://github.com/google/mono_repo.dart for details on this file +dart: +- beta # change this to 1.12.0 when it's released! +- dev + stages: - analyzer_and_format: - group: - dartfmt - dartanalyzer: --fatal-infos . - dart: [dev] diff --git a/json_annotation/pubspec.yaml b/json_annotation/pubspec.yaml index 8e8dc63a4..a273d6b76 100644 --- a/json_annotation/pubspec.yaml +++ b/json_annotation/pubspec.yaml @@ -1,5 +1,5 @@ name: json_annotation -version: 4.0.0-nullsafety.0 +version: 4.0.0 description: >- Classes and helper functions that support JSON code generation via the `json_serializable` package. diff --git a/json_serializable/CHANGELOG.md b/json_serializable/CHANGELOG.md index 75ad40635..1e9d8c1db 100644 --- a/json_serializable/CHANGELOG.md +++ b/json_serializable/CHANGELOG.md @@ -1,5 +1,6 @@ -## 4.0.0-nullsafety.0 +## 4.0.0 +- Requires Dart 2.12 or greater. - Generates null-safe code. - The `nullable` field on `JsonKey` ignored. The nullability of a field is now determined by the Dart type system. diff --git a/json_serializable/lib/src/constants.dart b/json_serializable/lib/src/constants.dart index 697cc69ef..9949b77cc 100644 --- a/json_serializable/lib/src/constants.dart +++ b/json_serializable/lib/src/constants.dart @@ -2,8 +2,6 @@ // for details. All rights reserved. Use of this source code is governed by a // BSD-style license that can be found in the LICENSE file. -// @dart=2.12 - /// Name used for closure argument when generating calls to `map`. const closureArg = 'e'; diff --git a/json_serializable/mono_pkg.yaml b/json_serializable/mono_pkg.yaml index 1d552e889..a483c5d6e 100644 --- a/json_serializable/mono_pkg.yaml +++ b/json_serializable/mono_pkg.yaml @@ -1,5 +1,6 @@ # See https://github.com/google/mono_repo.dart for details on this file dart: +- beta # change this to 1.12.0 when it's released! - dev stages: diff --git a/json_serializable/pubspec.yaml b/json_serializable/pubspec.yaml index b8546e85a..64a90bdaf 100644 --- a/json_serializable/pubspec.yaml +++ b/json_serializable/pubspec.yaml @@ -1,34 +1,35 @@ name: json_serializable -version: 4.0.0-nullsafety.0 +version: 4.0.0 description: >- Automatically generate code for converting to and from JSON by annotating Dart classes. repository: https://github.com/google/json_serializable.dart environment: - sdk: '>=2.11.0 <3.0.0' + # Keeping this <2.12.0 because the code is not null safe – yet! + sdk: '>=2.11.99 <3.0.0' dependencies: - analyzer: '>=0.40.6 <0.42.0' - build: '>=0.12.6 <2.0.0' - build_config: '>=0.2.6 <0.5.0' + analyzer: ^0.41.2 + build: ^1.6.1 + build_config: ^0.4.4 # Use a tight version constraint to ensure that a constraint on # `json_annotation` properly constrains all features it provides. # For v3 only – allow a wide range since the only change was to REMOVE things # from json_annotation - json_annotation: '>=4.0.0-nullsafety.0 <4.1.0' - meta: ^1.3.0-nullsafety.5 - path: ^1.8.0-nullsafety.2 - source_gen: ^0.9.6 + json_annotation: '>=4.0.0 <4.1.0' + meta: ^1.3.0 + path: ^1.8.0 + source_gen: ^0.9.9 dev_dependencies: build_runner: ^1.0.0 build_verify: ^1.1.0 collection: ^1.14.0 dart_style: ^1.2.0 - logging: ^0.11.3+1 - pub_semver: ^1.4.0 + logging: ^1.0.0 + pub_semver: ^2.0.0 source_gen_test: ^0.1.0 - stack_trace: ^1.10.0-nullsafety.5 - test: ^1.16.0-nullsafety.7 - yaml: ^3.0.0-nullsafety.0 + stack_trace: ^1.10.0 + test: ^1.16.0 + yaml: ^3.0.0 diff --git a/json_serializable/test/src/_json_serializable_test_input.dart b/json_serializable/test/src/_json_serializable_test_input.dart index e43b91620..7ba5c0f3f 100644 --- a/json_serializable/test/src/_json_serializable_test_input.dart +++ b/json_serializable/test/src/_json_serializable_test_input.dart @@ -7,11 +7,12 @@ import 'dart:collection'; import 'package:json_annotation/json_annotation.dart'; -import 'package:json_serializable/src/constants.dart'; // ignore: import_of_legacy_library_into_null_safe import 'package:source_gen_test/annotations.dart'; +part 'constants_copy.dart'; + part 'checked_test_input.dart'; part 'core_subclass_type_input.dart'; diff --git a/json_serializable/test/src/constants_copy.dart b/json_serializable/test/src/constants_copy.dart new file mode 100644 index 000000000..27b33fb51 --- /dev/null +++ b/json_serializable/test/src/constants_copy.dart @@ -0,0 +1,23 @@ +// Copyright (c) 2021, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +// @dart=2.12 + +part of '_json_serializable_test_input.dart'; + +// TODO: remove this and return link to lib/src/constants.dart once this +// package runs with full null safety + +/// Name used for closure argument when generating calls to `map`. +const closureArg = 'e'; + +const generatedLocalVarName = 'val'; +const toJsonMapHelperName = 'writeNotNull'; + +const converterOrKeyInstructions = r''' +* Use `JsonConverter` + https://pub.dev/documentation/json_annotation/latest/json_annotation/JsonConverter-class.html +* Use `JsonKey` fields `fromJson` and `toJson` + https://pub.dev/documentation/json_annotation/latest/json_annotation/JsonKey/fromJson.html + https://pub.dev/documentation/json_annotation/latest/json_annotation/JsonKey/toJson.html'''; diff --git a/tool/ci.sh b/tool/ci.sh index 4e0e6e54f..04aa24cfe 100755 --- a/tool/ci.sh +++ b/tool/ci.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Created with package:mono_repo v3.4.5 +# Created with package:mono_repo v3.4.6 # Support built in commands on windows out of the box. function pub() {