-
Notifications
You must be signed in to change notification settings - Fork 58
Commit
…d fixes (#138)
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,7 @@ | ||
## 3.1.2-dev | ||
|
||
* Require Dart 2.19 | ||
|
||
## 3.1.1 | ||
|
||
* Switch to using package:lints. | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,36 +1,22 @@ | ||
include: package:lints/recommended.yaml | ||
include: package:dart_flutter_team_lints/analysis_options.yaml | ||
|
||
analyzer: | ||
language: | ||
strict-casts: true | ||
|
||
linter: | ||
rules: | ||
- avoid_catching_errors | ||
- avoid_private_typedef_functions | ||
- avoid_redundant_argument_values | ||
- avoid_unused_constructor_parameters | ||
- cancel_subscriptions | ||
- directives_ordering | ||
- join_return_with_assignment | ||
- lines_longer_than_80_chars | ||
- missing_whitespace_between_adjacent_strings | ||
- no_runtimeType_toString | ||
- only_throw_errors | ||
- package_api_docs | ||
- prefer_asserts_in_initializer_lists | ||
- prefer_const_declarations | ||
- prefer_expression_function_bodies | ||
- prefer_interpolation_to_compose_strings | ||
- prefer_relative_imports | ||
- prefer_single_quotes | ||
- sort_pub_dependencies | ||
- test_types_in_equals | ||
- throw_in_finally | ||
- type_annotate_public_apis | ||
- unnecessary_lambdas | ||
- unnecessary_null_aware_assignments | ||
- unnecessary_parenthesis | ||
- unnecessary_statements | ||
- use_is_even_rather_than_modulo | ||
- use_string_buffers | ||
- use_super_parameters |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -61,7 +61,7 @@ class YamlMap extends YamlNode with collection.MapMixin, UnmodifiableMapMixin { | |
Map get value => this; | ||
|
||
@override | ||
Iterable get keys => nodes.keys.map((node) => node.value); | ||
Iterable get keys => nodes.keys.map((node) => (node as YamlNode).value); | ||
|
||
/// Creates an empty YamlMap. | ||
/// | ||
|
@@ -86,9 +86,9 @@ class YamlMap extends YamlNode with collection.MapMixin, UnmodifiableMapMixin { | |
YamlMapWrapper(dartMap, sourceUrl, style: style); | ||
|
||
/// Users of the library should not use this constructor. | ||
YamlMap.internal(Map<dynamic, YamlNode> nodes, SourceSpan span, this.style) | ||
YamlMap.internal(Map<dynamic, YamlNode> nodes, super.span, this.style) | ||
: nodes = UnmodifiableMapView<dynamic, YamlNode>(nodes), | ||
super._(span); | ||
super._(); | ||
|
||
@override | ||
dynamic operator [](Object? key) => nodes[key]?.value; | ||
|
@@ -136,9 +136,9 @@ class YamlList extends YamlNode with collection.ListMixin { | |
YamlListWrapper(dartList, sourceUrl, style: style); | ||
|
||
/// Users of the library should not use this constructor. | ||
YamlList.internal(List<YamlNode> nodes, SourceSpan span, this.style) | ||
YamlList.internal(List<YamlNode> nodes, super.span, this.style) | ||
: nodes = UnmodifiableListView<YamlNode>(nodes), | ||
super._(span); | ||
super._(); | ||
|
||
@override | ||
dynamic operator [](int index) => nodes[index].value; | ||
|
@@ -152,7 +152,7 @@ class YamlList extends YamlNode with collection.ListMixin { | |
/// A wrapped scalar value parsed from YAML. | ||
class YamlScalar extends YamlNode { | ||
@override | ||
final dynamic value; | ||
final Object? value; | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
jonasfj
Member
|
||
|
||
/// The style used for the scalar in the original document. | ||
final ScalarStyle style; | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,17 @@ | ||
name: yaml | ||
version: 3.1.1 | ||
version: 3.1.2-dev | ||
description: A parser for YAML, a human-friendly data serialization standard | ||
repository: https://github.com/dart-lang/yaml | ||
|
||
environment: | ||
sdk: '>=2.12.0 <3.0.0' | ||
sdk: '>=2.19.0 <3.0.0' | ||
|
||
dependencies: | ||
collection: ^1.15.0 | ||
source_span: ^1.8.0 | ||
string_scanner: ^1.1.0 | ||
|
||
dev_dependencies: | ||
lints: ^1.0.0 | ||
dart_flutter_team_lints: ^1.0.0 | ||
path: ^1.8.0 | ||
test: ^1.16.0 |
We may want a minor version bump of the package here so that consumers can specify that that need this API change (I'm still running down the issues, but I think that yaml_edit needs to be updated for this change).