From 679ea759cd0ee533bf4113e35d31f4a464a1ef18 Mon Sep 17 00:00:00 2001 From: Devon Carew Date: Wed, 16 Jul 2025 09:49:43 -0700 Subject: [PATCH] prep for publishing protobuf 4.1.1, protoc_plugin 22.5.0 --- protobuf/CHANGELOG.md | 2 +- protobuf/pubspec.yaml | 2 +- protoc_plugin/CHANGELOG.md | 2 +- protoc_plugin/lib/src/formatter.dart | 2 +- protoc_plugin/pubspec.yaml | 2 +- protoc_plugin/test/goldens/client.pb.dart | 17 ++++++++++++----- .../test/goldens/serviceGenerator.pb.dart | 17 ++++++++++++----- 7 files changed, 29 insertions(+), 15 deletions(-) diff --git a/protobuf/CHANGELOG.md b/protobuf/CHANGELOG.md index d0580b29..1ec9d5f5 100644 --- a/protobuf/CHANGELOG.md +++ b/protobuf/CHANGELOG.md @@ -1,4 +1,4 @@ -## 4.1.1-wip +## 4.1.1 * Minimum SDK dependency bumped from 3.6.0 to 3.7.0. ([#1024]) diff --git a/protobuf/pubspec.yaml b/protobuf/pubspec.yaml index 9bdd790a..0b3a6103 100644 --- a/protobuf/pubspec.yaml +++ b/protobuf/pubspec.yaml @@ -1,5 +1,5 @@ name: protobuf -version: 4.1.1-wip +version: 4.1.1 description: >- Runtime library for protocol buffers support. Use with package:protoc_plugin to generate Dart code for your '.proto' files. diff --git a/protoc_plugin/CHANGELOG.md b/protoc_plugin/CHANGELOG.md index 46f367f9..b12de704 100644 --- a/protoc_plugin/CHANGELOG.md +++ b/protoc_plugin/CHANGELOG.md @@ -1,4 +1,4 @@ -## 22.5.0-wip +## 22.5.0 * Generated files are now formatted using the Dart formatter. The code is formatted using the min. SDK for `package:protoc_plugin`; currently `3.7.0`. diff --git a/protoc_plugin/lib/src/formatter.dart b/protoc_plugin/lib/src/formatter.dart index 63db5e47..10afaea5 100644 --- a/protoc_plugin/lib/src/formatter.dart +++ b/protoc_plugin/lib/src/formatter.dart @@ -6,7 +6,7 @@ import 'package:dart_style/dart_style.dart'; import 'package:pub_semver/pub_semver.dart'; // Note: keep this in sync with the SDK constraint in pubspec.yaml. -final Version formatUsingVersion = Version(3, 6, 0); +final Version formatUsingVersion = Version(3, 7, 0); final DartFormatter _formatter = DartFormatter( languageVersion: formatUsingVersion, diff --git a/protoc_plugin/pubspec.yaml b/protoc_plugin/pubspec.yaml index f92a6f9e..3f6fa260 100644 --- a/protoc_plugin/pubspec.yaml +++ b/protoc_plugin/pubspec.yaml @@ -1,5 +1,5 @@ name: protoc_plugin -version: 22.5.0-wip +version: 22.5.0 description: A protobuf protoc compiler plugin used to generate Dart code. repository: https://github.com/google/protobuf.dart/tree/master/protoc_plugin diff --git a/protoc_plugin/test/goldens/client.pb.dart b/protoc_plugin/test/goldens/client.pb.dart index f35cc451..72133468 100644 --- a/protoc_plugin/test/goldens/client.pb.dart +++ b/protoc_plugin/test/goldens/client.pb.dart @@ -4,10 +4,17 @@ class TestApi { TestApi(this._client); $async.Future aMethod( - $pb.ClientContext? ctx, SomeRequest request) => - _client.invoke(ctx, 'Test', 'AMethod', request, SomeReply()); + $pb.ClientContext? ctx, + SomeRequest request, + ) => _client.invoke(ctx, 'Test', 'AMethod', request, SomeReply()); $async.Future<$0.AnotherReply> anotherMethod( - $pb.ClientContext? ctx, $0.EmptyMessage request) => - _client.invoke<$0.AnotherReply>( - ctx, 'Test', 'AnotherMethod', request, $0.AnotherReply()); + $pb.ClientContext? ctx, + $0.EmptyMessage request, + ) => _client.invoke<$0.AnotherReply>( + ctx, + 'Test', + 'AnotherMethod', + request, + $0.AnotherReply(), + ); } diff --git a/protoc_plugin/test/goldens/serviceGenerator.pb.dart b/protoc_plugin/test/goldens/serviceGenerator.pb.dart index d406ac71..067ea4f0 100644 --- a/protoc_plugin/test/goldens/serviceGenerator.pb.dart +++ b/protoc_plugin/test/goldens/serviceGenerator.pb.dart @@ -1,8 +1,12 @@ abstract class TestServiceBase extends $pb.GeneratedService { $async.Future<$0.SomeReply> aMethod( - $pb.ServerContext ctx, $0.SomeRequest request); + $pb.ServerContext ctx, + $0.SomeRequest request, + ); $async.Future<$1.AnotherReply> anotherMethod( - $pb.ServerContext ctx, $1.EmptyMessage request); + $pb.ServerContext ctx, + $1.EmptyMessage request, + ); $pb.GeneratedMessage createRequest($core.String methodName) { switch (methodName) { @@ -15,8 +19,11 @@ abstract class TestServiceBase extends $pb.GeneratedService { } } - $async.Future<$pb.GeneratedMessage> handleCall($pb.ServerContext ctx, - $core.String methodName, $pb.GeneratedMessage request) { + $async.Future<$pb.GeneratedMessage> handleCall( + $pb.ServerContext ctx, + $core.String methodName, + $pb.GeneratedMessage request, + ) { switch (methodName) { case 'AMethod': return aMethod(ctx, request as $0.SomeRequest); @@ -29,5 +36,5 @@ abstract class TestServiceBase extends $pb.GeneratedService { $core.Map<$core.String, $core.dynamic> get $json => TestServiceBase$json; $core.Map<$core.String, $core.Map<$core.String, $core.dynamic>> - get $messageJson => TestServiceBase$messageJson; + get $messageJson => TestServiceBase$messageJson; }