Skip to content

Commit

Permalink
chore: set max SDK version to <3.0.0 (dart-lang/yaml#46)
Browse files Browse the repository at this point in the history
  • Loading branch information
chalin authored and kevmoo committed Jul 17, 2018
1 parent ee1ba96 commit 1a58205
Show file tree
Hide file tree
Showing 5 changed files with 33 additions and 27 deletions.
4 changes: 4 additions & 0 deletions pkgs/yaml/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 2.1.15

* Set max SDK version to `<3.0.0`, and adjust other dependencies.

## 2.1.14

* Remove use of deprecated features.
Expand Down
2 changes: 0 additions & 2 deletions pkgs/yaml/analysis_options.yaml

This file was deleted.

24 changes: 14 additions & 10 deletions pkgs/yaml/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,15 +1,19 @@
name: yaml
version: 2.1.14
author: "Dart Team <[email protected]>"
homepage: https://github.com/dart-lang/yaml
version: 2.1.15

description: A parser for YAML.
author: Dart Team <[email protected]>
homepage: https://github.com/dart-lang/yaml

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

dependencies:
charcode: "^1.1.0"
collection: ">=1.1.0 <2.0.0"
string_scanner: ">=0.1.4 <2.0.0"
source_span: ">=1.0.0 <2.0.0"
charcode: ^1.1.0
collection: '>=1.1.0 <2.0.0'
string_scanner: '>=0.1.4 <2.0.0'
source_span: '>=1.0.0 <2.0.0'

dev_dependencies:
path: ">=1.2.0 <2.0.0"
test: ">=0.12.0 <0.13.0"
path: '>=1.2.0 <2.0.0'
test: '>=0.12.0 <0.13.0'
2 changes: 1 addition & 1 deletion pkgs/yaml/test/utils.dart
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import 'package:yaml/src/equality.dart' as equality;
import 'package:yaml/yaml.dart';

/// A matcher that validates that a closure or Future throws a [YamlException].
final Matcher throwsYamlException = throwsA(new isInstanceOf<YamlException>());
final Matcher throwsYamlException = throwsA(new TypeMatcher<YamlException>());

/// Returns a matcher that asserts that the value equals [expected].
///
Expand Down
28 changes: 14 additions & 14 deletions pkgs/yaml/test/yaml_node_wrapper_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -53,19 +53,19 @@ main() {
}));

expect(map.span, isNullSpan(isNull));
expect(map["list"], new isInstanceOf<YamlList>());
expect(map["list"].nodes[0], new isInstanceOf<YamlScalar>());
expect(map["list"], new TypeMatcher<YamlList>());
expect(map["list"].nodes[0], new TypeMatcher<YamlScalar>());
expect(map["list"].span, isNullSpan(isNull));
expect(map["map"], new isInstanceOf<YamlMap>());
expect(map["map"].nodes["foo"], new isInstanceOf<YamlScalar>());
expect(map["map"]["nested"], new isInstanceOf<YamlList>());
expect(map["map"], new TypeMatcher<YamlMap>());
expect(map["map"].nodes["foo"], new TypeMatcher<YamlScalar>());
expect(map["map"]["nested"], new TypeMatcher<YamlList>());
expect(map["map"].span, isNullSpan(isNull));
expect(map.nodes["scalar"], new isInstanceOf<YamlScalar>());
expect(map.nodes["scalar"], new TypeMatcher<YamlScalar>());
expect(map.nodes["scalar"].value, "value");
expect(map.nodes["scalar"].span, isNullSpan(isNull));
expect(map["scalar"], "value");
expect(map.keys, unorderedEquals(["list", "map", "scalar"]));
expect(map.nodes.keys, everyElement(new isInstanceOf<YamlScalar>()));
expect(map.nodes.keys, everyElement(new TypeMatcher<YamlScalar>()));
expect(map.nodes[new YamlScalar.wrap("list")], equals([1, 2, 3]));
});

Expand Down Expand Up @@ -108,14 +108,14 @@ main() {
]));

expect(list.span, isNullSpan(isNull));
expect(list[0], new isInstanceOf<YamlList>());
expect(list[0].nodes[0], new isInstanceOf<YamlScalar>());
expect(list[0], new TypeMatcher<YamlList>());
expect(list[0].nodes[0], new TypeMatcher<YamlScalar>());
expect(list[0].span, isNullSpan(isNull));
expect(list[1], new isInstanceOf<YamlMap>());
expect(list[1].nodes["foo"], new isInstanceOf<YamlScalar>());
expect(list[1]["nested"], new isInstanceOf<YamlList>());
expect(list[1], new TypeMatcher<YamlMap>());
expect(list[1].nodes["foo"], new TypeMatcher<YamlScalar>());
expect(list[1]["nested"], new TypeMatcher<YamlList>());
expect(list[1].span, isNullSpan(isNull));
expect(list.nodes[2], new isInstanceOf<YamlScalar>());
expect(list.nodes[2], new TypeMatcher<YamlScalar>());
expect(list.nodes[2].value, "value");
expect(list.nodes[2].span, isNullSpan(isNull));
expect(list[2], "value");
Expand Down Expand Up @@ -153,7 +153,7 @@ main() {
}

Matcher isNullSpan(sourceUrl) => predicate((span) {
expect(span, new isInstanceOf<SourceSpan>());
expect(span, new TypeMatcher<SourceSpan>());
expect(span.length, equals(0));
expect(span.text, isEmpty);
expect(span.start, equals(span.end));
Expand Down

0 comments on commit 1a58205

Please sign in to comment.