Skip to content

misc: support Dart2 in current release of json_annotation/serializable #262

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

Merged
merged 4 commits into from
Jul 20, 2018
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
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ stages:

# Only building master means that we don't run two builds for each pull request.
branches:
only: [master]
only: [master,0_5_x]

cache:
directories:
Expand Down
2 changes: 1 addition & 1 deletion example/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ dependencies:
json_annotation: ^0.2.5

dev_dependencies:
build_runner: ^0.8.9
build_runner: ^0.9.0
json_serializable: ^0.5.4
```

Expand Down
6 changes: 3 additions & 3 deletions example/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@ name: example
author: Dart Team <misc@dartlang.org>

environment:
sdk: '>=2.0.0-dev.54 <2.0.0'
sdk: '>=2.0.0-dev.54 <3.0.0'

dependencies:
json_annotation: ^0.2.5

dev_dependencies:
build_runner: ^0.8.9
build_runner: ^0.9.0
json_serializable: ^0.5.4

# Used by tests. Not required to use `json_serializable`.
path: ^1.5.1
test: ^0.12.38
test: ^1.3.0
3 changes: 1 addition & 2 deletions example/test/ensure_build_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,7 @@ final _whitespace = new RegExp(r'\s');
Set<String> _changedGeneratedFiles() {
var output = _runProc('git', ['status', '--porcelain']);

return LineSplitter
.split(output)
return LineSplitter.split(output)
.map((line) => line.split(_whitespace).last)
.where((path) => path.endsWith('.dart'))
.toSet();
Expand Down
2 changes: 1 addition & 1 deletion example/test/readme_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,6 @@ dependencies:
json_annotation: ^0.2.5

dev_dependencies:
build_runner: ^0.8.9
build_runner: ^0.9.0
json_serializable: ^0.5.4
''';
4 changes: 4 additions & 0 deletions json_annotation/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 0.2.9+1

* Support the Dart 2.0 stable release.

## 0.2.9

* When `FormatException` is caught in "checked mode", use the `message`
Expand Down
4 changes: 2 additions & 2 deletions json_annotation/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
name: json_annotation
version: 0.2.9
version: 0.2.9+1
description: >-
Classes and helper functions that support JSON code generation via the
`json_serializable` package.
homepage: https://github.com/dart-lang/json_serializable
author: Dart Team <misc@dartlang.org>
environment:
sdk: '>=2.0.0-dev.54.0 <2.0.0'
sdk: '>=2.0.0-dev.54.0 <3.0.0'
4 changes: 4 additions & 0 deletions json_serializable/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 0.5.8+1

* Support the Dart 2.0 stable release.

## 0.5.8

* Small fixes to support Dart 2 runtime semantics.
Expand Down
6 changes: 3 additions & 3 deletions json_serializable/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
name: json_serializable
version: 0.5.8
version: 0.5.8+1
author: Dart Team <misc@dartlang.org>
description: Generates utilities to aid in serializing to/from JSON.
homepage: https://github.com/dart-lang/json_serializable
environment:
sdk: '>=2.0.0-dev.54 <2.0.0'
sdk: '>=2.0.0-dev.54 <3.0.0'

dependencies:
analyzer: ^0.32.0
Expand All @@ -19,7 +19,7 @@ dependencies:
source_gen: ^0.8.2

dev_dependencies:
build_runner: ^0.8.0
build_runner: ^0.9.0
build_web_compilers: ^0.4.0+1
build_test: ^0.10.0
collection: ^1.14.0
Expand Down
3 changes: 1 addition & 2 deletions json_serializable/test/ensure_build_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,7 @@ final _whitespace = new RegExp(r'\s');
Set<String> _changedGeneratedFiles() {
var output = _runProc('git', ['status', '--porcelain']);

return LineSplitter
.split(output)
return LineSplitter.split(output)
.map((line) => line.split(_whitespace).last)
.where((path) => path.endsWith('.dart'))
.toSet();
Expand Down
2 changes: 2 additions & 0 deletions json_serializable/test/literal/json_literal.g.dart
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ final _$dataJsonLiteral = [
'bool': true
}
];

const _$asConstJsonLiteral = const [
const {
'backspace': '\b',
Expand Down Expand Up @@ -94,6 +95,7 @@ const _$asConstJsonLiteral = const [
'bool': true
}
];

const _$naughtyStringsJsonLiteral = const [
'',
'undefined',
Expand Down