Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support proto2 groups #640

Merged
merged 3 commits into from
Dec 5, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/protobuf-bench/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,5 @@ server would usually do.

| code generator | bundle size | minified | compressed |
|---------------------|------------------------:|-----------------------:|-------------------:|
| protobuf-es | 90,449 b | 38,193 b | 9,801 b |
| protobuf-es | 91,410 b | 38,462 b | 9,870 b |
| protobuf-javascript | 394,384 b | 288,654 b | 45,122 b |

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

21 changes: 20 additions & 1 deletion packages/protobuf-test/extra/proto2.proto
Original file line number Diff line number Diff line change
Expand Up @@ -74,4 +74,23 @@ enum Proto2Enum {

message Proto2ChildMessage {
optional string string_field = 1;
}
}

message Proto2GroupsMessage {
optional group Group = 1 {
optional int32 int32_field = 1;
optional group NestedGroup = 2 {
optional string string_field = 1;
}
}
repeated group RepeatedGroup = 2 {
optional int32 int32_field = 1;
}
oneof oneof_with_group {
group OneofGroup = 3 {
optional bool bool_field = 1;
}
}
optional Group message_field_using_group = 4;
optional Group.NestedGroup message_field_using_nested_group = 5;
}
151 changes: 151 additions & 0 deletions packages/protobuf-test/src/gen/js/extra/proto2_pb.d.ts

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

59 changes: 59 additions & 0 deletions packages/protobuf-test/src/gen/js/extra/proto2_pb.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading