From b68ebfb3ac23515f492c04b6e28bc49bce65f26b Mon Sep 17 00:00:00 2001 From: David Morgan Date: Wed, 3 May 2023 13:42:05 +0200 Subject: [PATCH] Release 8.5.0. --- CHANGELOG.md | 6 ++++-- benchmark/pubspec.yaml | 12 +++--------- built_value/lib/serializer.dart | 4 ++-- ...st_serializer.dart => uint8_list_serializer.dart} | 6 +++--- built_value/pubspec.yaml | 7 ++----- ...zer_test.dart => uint8_list_serializer_test.dart} | 0 built_value_analyzer_plugin/pubspec.yaml | 10 ++-------- built_value_generator/pubspec.yaml | 10 +++------- .../tools/analyzer_plugin/pubspec.yaml | 6 +++--- built_value_test/pubspec.yaml | 12 +++--------- chat_example/pubspec.yaml | 12 +++--------- end_to_end_test/pubspec.yaml | 12 +++--------- example/pubspec.yaml | 10 ++-------- 13 files changed, 33 insertions(+), 74 deletions(-) rename built_value/lib/src/{uint8list_serializer.dart => uint8_list_serializer.dart} (82%) rename built_value/test/{uint8list_serializer_test.dart => uint8_list_serializer_test.dart} (100%) diff --git a/CHANGELOG.md b/CHANGELOG.md index d39c3490..ce7fe384 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,9 +1,11 @@ # Changelog -# 8.4.5 +# 8.5.0 -- Stop using deprecated analyzer API. +- Add `Uint8ListSerializer`. - Generate Dart-3-compatible code if needed. +- Stop using deprecated analyzer API. +- Fix codegen for optional fields with `$` in the name. # 8.4.4 diff --git a/benchmark/pubspec.yaml b/benchmark/pubspec.yaml index 35549e7c..8d3e577c 100644 --- a/benchmark/pubspec.yaml +++ b/benchmark/pubspec.yaml @@ -1,5 +1,5 @@ name: benchmark -version: 8.4.4 +version: 8.5.0 publish_to: none description: > Benchmark, not for publishing. @@ -10,17 +10,11 @@ environment: dependencies: built_collection: ^5.0.0 - built_value: ^8.4.0 + built_value: ^8.5.0 dev_dependencies: build_runner: '>=1.0.0 <3.0.0' - built_value_generator: ^8.4.4 + built_value_generator: ^8.5.0 pedantic: ^1.4.0 quiver: '>=0.21.0 <4.0.0' test: ^1.0.0 - -dependency_overrides: - built_value: - path: ../built_value - built_value_generator: - path: ../built_value_generator diff --git a/built_value/lib/serializer.dart b/built_value/lib/serializer.dart index e7c1ba26..2fc92081 100644 --- a/built_value/lib/serializer.dart +++ b/built_value/lib/serializer.dart @@ -10,7 +10,7 @@ import 'package:built_value/src/duration_serializer.dart'; import 'package:built_value/src/int64_serializer.dart'; import 'package:built_value/src/json_object_serializer.dart'; import 'package:built_value/src/num_serializer.dart'; -import 'package:built_value/src/uint8list_serializer.dart'; +import 'package:built_value/src/uint8_list_serializer.dart'; import 'package:built_value/src/uri_serializer.dart'; import 'src/bool_serializer.dart'; @@ -73,7 +73,7 @@ abstract class Serializers { ..add(NumSerializer()) ..add(RegExpSerializer()) ..add(StringSerializer()) - ..add(UInt8ListSerializer()) + ..add(Uint8ListSerializer()) ..add(UriSerializer()) ..addBuilderFactory(const FullType(BuiltList, [FullType.object]), () => ListBuilder()) diff --git a/built_value/lib/src/uint8list_serializer.dart b/built_value/lib/src/uint8_list_serializer.dart similarity index 82% rename from built_value/lib/src/uint8list_serializer.dart rename to built_value/lib/src/uint8_list_serializer.dart index b1d1a63c..5e2b107b 100644 --- a/built_value/lib/src/uint8list_serializer.dart +++ b/built_value/lib/src/uint8_list_serializer.dart @@ -8,20 +8,20 @@ import 'dart:typed_data'; import 'package:built_collection/built_collection.dart'; import 'package:built_value/serializer.dart'; -class UInt8ListSerializer implements PrimitiveSerializer { +class Uint8ListSerializer implements PrimitiveSerializer { @override final String wireName = 'UInt8List'; @override Object serialize(Serializers serializers, Uint8List uint8list, {FullType specifiedType = FullType.unspecified}) { - return base64Encode(uint8list).toString(); + return base64Encode(uint8list); } @override Uint8List deserialize(Serializers serializers, Object serialized, {FullType specifiedType = FullType.unspecified}) { - return base64Decode(serialized.toString()); + return base64Decode(serialized as String); } @override diff --git a/built_value/pubspec.yaml b/built_value/pubspec.yaml index daa7aa5f..e76c7331 100644 --- a/built_value/pubspec.yaml +++ b/built_value/pubspec.yaml @@ -1,9 +1,10 @@ name: built_value -version: 8.4.4 +version: 8.5.0 description: > Value types with builders, Dart classes as enums, and serialization. This library is the runtime dependency. repository: https://github.com/google/built_value.dart/tree/master/built_value +topics: - built-value environment: @@ -18,7 +19,3 @@ dependencies: dev_dependencies: pedantic: ^1.4.0 test: ^1.16.0 - -dependency_overrides: - built_value_generator: - path: ../built_value_generator diff --git a/built_value/test/uint8list_serializer_test.dart b/built_value/test/uint8_list_serializer_test.dart similarity index 100% rename from built_value/test/uint8list_serializer_test.dart rename to built_value/test/uint8_list_serializer_test.dart diff --git a/built_value_analyzer_plugin/pubspec.yaml b/built_value_analyzer_plugin/pubspec.yaml index f79f2d7e..58bb1442 100644 --- a/built_value_analyzer_plugin/pubspec.yaml +++ b/built_value_analyzer_plugin/pubspec.yaml @@ -1,5 +1,5 @@ name: built_value_analyzer_plugin -version: 8.4.4 +version: 8.5.0 description: > Experimental analyzer plugin for the built_value code generator. homepage: https://github.com/google/built_value.dart @@ -12,15 +12,9 @@ dependencies: analyzer: '>=0.39.0 <0.40.0' analyzer_plugin: '>=0.1.0 <0.3.0' built_value: '>=7.0.0 <7.1.0' - built_value_generator: ^8.4.4 + built_value_generator: ^8.5.0 dev_dependencies: build_test: ^0.10.3 pedantic: ^1.4.0 test: ^1.0.0 - -dependency_overrides: - built_value: - path: ../built_value - built_value_generator: - path: ../built_value_generator diff --git a/built_value_generator/pubspec.yaml b/built_value_generator/pubspec.yaml index 610df6b0..58141969 100644 --- a/built_value_generator/pubspec.yaml +++ b/built_value_generator/pubspec.yaml @@ -1,5 +1,5 @@ name: built_value_generator -version: 8.4.4 +version: 8.5.0 description: > Value types with builders, Dart classes as enums, and serialization. This library is the dev dependency. @@ -8,7 +8,7 @@ topics: - built-value - codegen - build-runner - + environment: sdk: '>=2.14.0 <3.0.0' @@ -17,7 +17,7 @@ dependencies: build: '>=1.0.0 <3.0.0' build_config: '>=0.3.1 <2.0.0' built_collection: ^5.0.0 - built_value: '>=8.1.0 <8.5.0' + built_value: '>=8.1.0 <8.6.0' collection: ^1.15.0 source_gen: '>=0.9.0 <2.0.0' @@ -26,7 +26,3 @@ dev_dependencies: build_runner: '>=1.0.0 <3.0.0' pedantic: ^1.4.0 test: ^1.0.0 - -dependency_overrides: - built_value: - path: ../built_value diff --git a/built_value_generator/tools/analyzer_plugin/pubspec.yaml b/built_value_generator/tools/analyzer_plugin/pubspec.yaml index 8dbff6d7..585b51d6 100644 --- a/built_value_generator/tools/analyzer_plugin/pubspec.yaml +++ b/built_value_generator/tools/analyzer_plugin/pubspec.yaml @@ -1,8 +1,8 @@ name: built_value_analyzer_plugin_loader -version: 8.4.4 +version: 8.5.0 description: This pubspec determines the version of the analyzer plugin to load. environment: sdk: '>=2.14.0 <3.0.0' dependencies: - built_value_analyzer_plugin: ^8.4.4 - built_value_generator: ^8.4.4 + built_value_analyzer_plugin: ^8.5.0 + built_value_generator: ^8.5.0 diff --git a/built_value_test/pubspec.yaml b/built_value_test/pubspec.yaml index 1a2a2e57..340fbf24 100644 --- a/built_value_test/pubspec.yaml +++ b/built_value_test/pubspec.yaml @@ -1,5 +1,5 @@ name: built_value_test -version: 8.4.4 +version: 8.5.0 description: > Value types with builders, Dart classes as enums, and serialization. This library provides test support. @@ -14,20 +14,14 @@ environment: sdk: '>=2.12.0 <3.0.0' dependencies: - built_value: ^8.4.0 + built_value: ^8.5.0 built_collection: ^5.0.0 collection: ^1.0.0 matcher: ^0.12.0 quiver: '>=0.21.0 <4.0.0' dev_dependencies: - built_value_generator: ^8.4.4 + built_value_generator: ^8.5.0 build_runner: '>=1.0.0 <3.0.0' pedantic: ^1.4.0 test: ^1.0.0 - -dependency_overrides: - built_value: - path: ../built_value - built_value_generator: - path: ../built_value_generator diff --git a/chat_example/pubspec.yaml b/chat_example/pubspec.yaml index c88be32a..9745c484 100644 --- a/chat_example/pubspec.yaml +++ b/chat_example/pubspec.yaml @@ -1,5 +1,5 @@ name: chat_example -version: 8.4.4 +version: 8.5.0 publish_to: none description: > Just an example, not for publishing. @@ -10,7 +10,7 @@ environment: dependencies: built_collection: ^5.0.0 - built_value: ^8.4.0 + built_value: ^8.5.0 shelf: ^1.0.0 shelf_proxy: ^1.0.0 shelf_web_socket: ^1.0.0 @@ -20,12 +20,6 @@ dev_dependencies: build_runner: any build_test: any build_web_compilers: any - built_value_generator: ^8.4.4 + built_value_generator: ^8.5.0 pedantic: ^1.4.0 test: ^1.0.0 - -dependency_overrides: - built_value: - path: ../built_value - built_value_generator: - path: ../built_value_generator diff --git a/end_to_end_test/pubspec.yaml b/end_to_end_test/pubspec.yaml index d0a00391..a70d66a6 100644 --- a/end_to_end_test/pubspec.yaml +++ b/end_to_end_test/pubspec.yaml @@ -1,5 +1,5 @@ name: end_to_end_test -version: 8.4.4 +version: 8.5.0 publish_to: none description: > Tests, not for publishing. @@ -10,19 +10,13 @@ environment: dependencies: built_collection: ^5.0.0 - built_value: ^8.4.0 + built_value: ^8.5.0 dev_dependencies: build: '>=1.0.0 <3.0.0' build_runner: '>=1.0.0 <3.0.0' - built_value_generator: ^8.4.4 + built_value_generator: ^8.5.0 fixnum: ^1.0.0 pedantic: ^1.4.0 quiver: '>=0.21.0 <4.0.0' test: ^1.16.0 - -dependency_overrides: - built_value: - path: ../built_value - built_value_generator: - path: ../built_value_generator diff --git a/example/pubspec.yaml b/example/pubspec.yaml index d6599bf2..2fa2b7cb 100644 --- a/example/pubspec.yaml +++ b/example/pubspec.yaml @@ -9,17 +9,11 @@ environment: dependencies: built_collection: ^5.0.0 - built_value: ^8.4.0 + built_value: ^8.5.0 dev_dependencies: build_runner: '>=1.0.0 <3.0.0' - built_value_generator: ^8.4.4 + built_value_generator: ^8.5.0 pedantic: ^1.4.0 quiver: '>=0.21.0 <4.0.0' test: ^1.0.0 - -dependency_overrides: - built_value: - path: ../built_value - built_value_generator: - path: ../built_value_generator