From be6a3669cca34cd83d189a1169edf6f381101cd8 Mon Sep 17 00:00:00 2001 From: Tobe O Date: Sat, 5 Oct 2019 03:13:33 -0400 Subject: [PATCH] Correct versions --- angel_serialize/CHANGELOG.md | 5 +++- angel_serialize/analysis_options.yaml | 1 + angel_serialize/lib/angel_serialize.dart | 29 ++++++++++++------------ angel_serialize/pubspec.yaml | 3 ++- 4 files changed, 21 insertions(+), 17 deletions(-) diff --git a/angel_serialize/CHANGELOG.md b/angel_serialize/CHANGELOG.md index 1c987d64..5e53a5a7 100644 --- a/angel_serialize/CHANGELOG.md +++ b/angel_serialize/CHANGELOG.md @@ -1,6 +1,9 @@ -# 2.2.3+2 +# 2.2.3+3 * Add `exclude: true` to `super` call in `Exclude` constructor. +# 2.2.3+2 +* Apply `package:pedantic`. + # 2.2.3+1 * Export `json`, `Codec`, and `Converter` from `dart:convert`. diff --git a/angel_serialize/analysis_options.yaml b/angel_serialize/analysis_options.yaml index eae1e42a..c230cee7 100644 --- a/angel_serialize/analysis_options.yaml +++ b/angel_serialize/analysis_options.yaml @@ -1,3 +1,4 @@ +include: package:pedantic/analysis_options.yaml analyzer: strong-mode: implicit-casts: false \ No newline at end of file diff --git a/angel_serialize/lib/angel_serialize.dart b/angel_serialize/lib/angel_serialize.dart index 7218f6e4..284c08f8 100644 --- a/angel_serialize/lib/angel_serialize.dart +++ b/angel_serialize/lib/angel_serialize.dart @@ -6,7 +6,7 @@ export 'package:quiver_hashcode/hashcode.dart' show hashObjects; /// Excludes a field from being excluded. class Exclude extends SerializableField { - const Exclude({bool canDeserialize: false, bool canSerialize: false}) + const Exclude({bool canDeserialize = false, bool canSerialize = false}) : super( exclude: true, canDeserialize: canDeserialize, @@ -15,12 +15,12 @@ class Exclude extends SerializableField { /// No longer necessary, as this is the default. @deprecated -const SerializableField nullable = const SerializableField(isNullable: true); +const SerializableField nullable = SerializableField(isNullable: true); /// Marks a field as not accepting `null` values. -const SerializableField notNull = const SerializableField(isNullable: false); +const SerializableField notNull = SerializableField(isNullable: false); -const Exclude exclude = const Exclude(); +const Exclude exclude = Exclude(); /// Shorthand for [SerializableField]. class DefaultsTo extends SerializableField { @@ -75,21 +75,21 @@ class SerializableField { this.serializer, this.deserializer, this.errorMessage, - this.isNullable: true, - this.exclude: false, - this.canDeserialize: false, - this.canSerialize: false, + this.isNullable = true, + this.exclude = false, + this.canDeserialize = false, + this.canSerialize = false, this.serializesTo}); } /// Marks a class as eligible for serialization. class Serializable { const Serializable( - {this.serializers: const [Serializers.map, Serializers.json], - this.autoSnakeCaseNames: true, + {this.serializers = const [Serializers.map, Serializers.json], + this.autoSnakeCaseNames = true, // ignore: deprecated_member_use_from_same_package @deprecated this.autoIdAndDateFields = true, - this.includeAnnotations: const []}); + this.includeAnnotations = const []}); /// A list of enabled serialization modes. /// @@ -107,20 +107,19 @@ class Serializable { final List includeAnnotations; } -const Serializable serializable = const Serializable(); +const Serializable serializable = Serializable(); /// Used by `package:angel_serialize_generator` to reliably identify generated models. class GeneratedSerializable { const GeneratedSerializable(); } -const GeneratedSerializable generatedSerializable = - const GeneratedSerializable(); +const GeneratedSerializable generatedSerializable = GeneratedSerializable(); /// The supported serialization types. abstract class Serializers { /// All supported serialization types. - static const List all = const [map, json, typescript]; + static const List all = [map, json, typescript]; /// Enable `fromMap` and `toMap` methods on the model class. static const int map = 0; diff --git a/angel_serialize/pubspec.yaml b/angel_serialize/pubspec.yaml index aa0aa892..077ceee3 100644 --- a/angel_serialize/pubspec.yaml +++ b/angel_serialize/pubspec.yaml @@ -1,5 +1,5 @@ name: angel_serialize -version: 2.2.3+2 +version: 2.2.3+3 description: Static annotations powering Angel model serialization. Combine with angel_serialize_generator for flexible modeling. author: Tobe O homepage: https://github.com/angel-dart/serialize @@ -9,4 +9,5 @@ dependencies: angel_model: ^1.0.0 collection: ^1.0.0 meta: ^1.0.0 + pedantic: ^1.0.0 quiver_hashcode: ^2.0.0