Skip to content

Commit

Permalink
V2: Update to google protobuf v27.0-rc1 (#799)
Browse files Browse the repository at this point in the history
  • Loading branch information
timostamm authored Apr 22, 2024
1 parent dfbe0de commit 91ac90f
Show file tree
Hide file tree
Showing 55 changed files with 3,914 additions and 10,910 deletions.
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 | 126,229 b | 64,861 b | 15,866 b |
| protobuf-es | 127,064 b | 65,515 b | 15,970 b |
| protobuf-javascript | 394,384 b | 288,654 b | 45,122 b |
145 changes: 145 additions & 0 deletions packages/protobuf-conformance/failing_tests_text_format.txt
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,39 @@ Recommended.Proto3.TextFormatInput.StringLiteralUnicodeEscapeSurrogatePairLongSh
Recommended.Proto3.TextFormatInput.StringLiteralUnicodeEscapeSurrogatePairLongShortString
Recommended.Proto3.TextFormatInput.StringLiteralUnicodeEscapeSurrogatePairShortLongBytes
Recommended.Proto3.TextFormatInput.StringLiteralUnicodeEscapeSurrogatePairShortLongString
Recommended.Editions_Proto3.TextFormatInput.StringLiteralLongUnicodeEscapeSurrogateFirstOnlyBytes
Recommended.Editions_Proto3.TextFormatInput.StringLiteralLongUnicodeEscapeSurrogateFirstOnlyString
Recommended.Editions_Proto3.TextFormatInput.StringLiteralLongUnicodeEscapeSurrogatePairBytes
Recommended.Editions_Proto3.TextFormatInput.StringLiteralLongUnicodeEscapeSurrogatePairString
Recommended.Editions_Proto3.TextFormatInput.StringLiteralLongUnicodeEscapeSurrogateSecondOnlyBytes
Recommended.Editions_Proto3.TextFormatInput.StringLiteralLongUnicodeEscapeSurrogateSecondOnlyString
Recommended.Editions_Proto3.TextFormatInput.StringLiteralLongUnicodeEscapesBytes.ProtobufOutput
Recommended.Editions_Proto3.TextFormatInput.StringLiteralLongUnicodeEscapesBytes.TextFormatOutput
Recommended.Editions_Proto3.TextFormatInput.StringLiteralLongUnicodeEscapesString.ProtobufOutput
Recommended.Editions_Proto3.TextFormatInput.StringLiteralLongUnicodeEscapesString.TextFormatOutput
Recommended.Editions_Proto3.TextFormatInput.StringLiteralShortUnicodeEscapeBytes.ProtobufOutput
Recommended.Editions_Proto3.TextFormatInput.StringLiteralShortUnicodeEscapeBytes.TextFormatOutput
Recommended.Editions_Proto3.TextFormatInput.StringLiteralShortUnicodeEscapeString.ProtobufOutput
Recommended.Editions_Proto3.TextFormatInput.StringLiteralShortUnicodeEscapeString.TextFormatOutput
Recommended.Editions_Proto3.TextFormatInput.StringLiteralShortUnicodeEscapeSurrogateFirstOnlyBytes
Recommended.Editions_Proto3.TextFormatInput.StringLiteralShortUnicodeEscapeSurrogateFirstOnlyString
Recommended.Editions_Proto3.TextFormatInput.StringLiteralShortUnicodeEscapeSurrogatePairBytes
Recommended.Editions_Proto3.TextFormatInput.StringLiteralShortUnicodeEscapeSurrogatePairString
Recommended.Editions_Proto3.TextFormatInput.StringLiteralShortUnicodeEscapeSurrogateSecondOnlyBytes
Recommended.Editions_Proto3.TextFormatInput.StringLiteralShortUnicodeEscapeSurrogateSecondOnlyString
Recommended.Editions_Proto3.TextFormatInput.StringLiteralUnicodeEscapeSurrogatePairLongShortBytes
Recommended.Editions_Proto3.TextFormatInput.StringLiteralUnicodeEscapeSurrogatePairLongShortString
Recommended.Editions_Proto3.TextFormatInput.StringLiteralUnicodeEscapeSurrogatePairShortLongBytes
Recommended.Editions_Proto3.TextFormatInput.StringLiteralUnicodeEscapeSurrogatePairShortLongString
Required.Proto2.TextFormatInput.GroupFieldExtension.ProtobufOutput
Required.Proto2.TextFormatInput.GroupFieldExtension.TextFormatOutput
Required.Proto2.TextFormatInput.GroupFieldExtensionGroupName
Required.Proto2.TextFormatInput.GroupFieldLowercased.ProtobufOutput
Required.Proto2.TextFormatInput.GroupFieldLowercased.TextFormatOutput
Required.Proto2.TextFormatInput.GroupFieldLowercasedMultiWord.ProtobufOutput
Required.Proto2.TextFormatInput.GroupFieldLowercasedMultiWord.TextFormatOutput
Required.Proto2.TextFormatInput.GroupFieldMultiWord.ProtobufOutput
Required.Proto2.TextFormatInput.GroupFieldMultiWord.TextFormatOutput
Required.Proto2.TextFormatInput.GroupFieldEmpty.ProtobufOutput
Required.Proto2.TextFormatInput.GroupFieldEmpty.TextFormatOutput
Required.Proto2.TextFormatInput.GroupFieldNoColon.ProtobufOutput
Expand Down Expand Up @@ -111,3 +144,115 @@ Required.Proto3.TextFormatInput.Uint32FieldTooLarge
Required.Proto3.TextFormatInput.Uint64FieldMaxValue.ProtobufOutput
Required.Proto3.TextFormatInput.Uint64FieldMaxValue.TextFormatOutput
Required.Proto3.TextFormatInput.Uint64FieldTooLarge
Required.Editions.TextFormatInput.DelimitedFieldExtension.ProtobufOutput
Required.Editions.TextFormatInput.DelimitedFieldExtension.TextFormatOutput
Required.Editions.TextFormatInput.DelimitedFieldExtensionMessageName
Required.Editions.TextFormatInput.DelimitedFieldLowercased.ProtobufOutput
Required.Editions.TextFormatInput.DelimitedFieldLowercased.TextFormatOutput
Required.Editions.TextFormatInput.DelimitedFieldLowercasedDifferent.ProtobufOutput
Required.Editions.TextFormatInput.DelimitedFieldLowercasedDifferent.TextFormatOutput
Required.Editions.TextFormatInput.GroupFieldEmpty.ProtobufOutput
Required.Editions.TextFormatInput.GroupFieldEmpty.TextFormatOutput
Required.Editions.TextFormatInput.GroupFieldExtension.ProtobufOutput
Required.Editions.TextFormatInput.GroupFieldExtension.TextFormatOutput
Required.Editions.TextFormatInput.GroupFieldNoColon.ProtobufOutput
Required.Editions.TextFormatInput.GroupFieldNoColon.TextFormatOutput
Required.Editions.TextFormatInput.GroupFieldWithColon.ProtobufOutput
Required.Editions.TextFormatInput.GroupFieldWithColon.TextFormatOutput
Required.Editions_Proto2.TextFormatInput.GroupFieldEmpty.ProtobufOutput
Required.Editions_Proto2.TextFormatInput.GroupFieldEmpty.TextFormatOutput
Required.Editions_Proto2.TextFormatInput.GroupFieldExtension.ProtobufOutput
Required.Editions_Proto2.TextFormatInput.GroupFieldExtension.TextFormatOutput
Required.Editions_Proto2.TextFormatInput.GroupFieldExtensionGroupName
Required.Editions_Proto2.TextFormatInput.GroupFieldLowercased.ProtobufOutput
Required.Editions_Proto2.TextFormatInput.GroupFieldLowercased.TextFormatOutput
Required.Editions_Proto2.TextFormatInput.GroupFieldLowercasedMultiWord.ProtobufOutput
Required.Editions_Proto2.TextFormatInput.GroupFieldLowercasedMultiWord.TextFormatOutput
Required.Editions_Proto2.TextFormatInput.GroupFieldMultiWord.ProtobufOutput
Required.Editions_Proto2.TextFormatInput.GroupFieldMultiWord.TextFormatOutput
Required.Editions_Proto2.TextFormatInput.GroupFieldNoColon.ProtobufOutput
Required.Editions_Proto2.TextFormatInput.GroupFieldNoColon.TextFormatOutput
Required.Editions_Proto2.TextFormatInput.GroupFieldWithColon.ProtobufOutput
Required.Editions_Proto2.TextFormatInput.GroupFieldWithColon.TextFormatOutput
Required.Editions_Proto3.TextFormatInput.AlphabeticallySortedMapBoolKeys.ProtobufOutput
Required.Editions_Proto3.TextFormatInput.AlphabeticallySortedMapBoolKeys.TextFormatOutput
Required.Editions_Proto3.TextFormatInput.AlphabeticallySortedMapIntKeys.ProtobufOutput
Required.Editions_Proto3.TextFormatInput.AlphabeticallySortedMapIntKeys.TextFormatOutput
Required.Editions_Proto3.TextFormatInput.AlphabeticallySortedMapStringKeys.ProtobufOutput
Required.Editions_Proto3.TextFormatInput.AlphabeticallySortedMapStringKeys.TextFormatOutput
Required.Editions_Proto3.TextFormatInput.AnyField.ProtobufOutput
Required.Editions_Proto3.TextFormatInput.AnyField.TextFormatOutput
Required.Editions_Proto3.TextFormatInput.AnyFieldWithInvalidType
Required.Editions_Proto3.TextFormatInput.AnyFieldWithRawBytes.ProtobufOutput
Required.Editions_Proto3.TextFormatInput.AnyFieldWithRawBytes.TextFormatOutput
Required.Editions_Proto3.TextFormatInput.BytesFieldBadUTF8Hex.ProtobufOutput
Required.Editions_Proto3.TextFormatInput.BytesFieldBadUTF8Hex.TextFormatOutput
Required.Editions_Proto3.TextFormatInput.BytesFieldBadUTF8Octal.ProtobufOutput
Required.Editions_Proto3.TextFormatInput.BytesFieldBadUTF8Octal.TextFormatOutput
Required.Editions_Proto3.TextFormatInput.DuplicateMapKey.ProtobufOutput
Required.Editions_Proto3.TextFormatInput.FloatField.ProtobufOutput
Required.Editions_Proto3.TextFormatInput.FloatField.TextFormatOutput
Required.Editions_Proto3.TextFormatInput.FloatFieldLargerThanInt64.ProtobufOutput
Required.Editions_Proto3.TextFormatInput.FloatFieldLargerThanInt64.TextFormatOutput
Required.Editions_Proto3.TextFormatInput.FloatFieldLargerThanUint64.ProtobufOutput
Required.Editions_Proto3.TextFormatInput.FloatFieldLargerThanUint64.TextFormatOutput
Required.Editions_Proto3.TextFormatInput.FloatFieldMaxValue.ProtobufOutput
Required.Editions_Proto3.TextFormatInput.FloatFieldMaxValue.TextFormatOutput
Required.Editions_Proto3.TextFormatInput.FloatFieldMinValue.ProtobufOutput
Required.Editions_Proto3.TextFormatInput.FloatFieldMinValue.TextFormatOutput
Required.Editions_Proto3.TextFormatInput.FloatFieldNaNValue.ProtobufOutput
Required.Editions_Proto3.TextFormatInput.FloatFieldNaNValue.TextFormatOutput
Required.Editions_Proto3.TextFormatInput.FloatFieldNegInfValue.ProtobufOutput
Required.Editions_Proto3.TextFormatInput.FloatFieldNegInfValue.TextFormatOutput
Required.Editions_Proto3.TextFormatInput.FloatFieldPosInfValue.ProtobufOutput
Required.Editions_Proto3.TextFormatInput.FloatFieldPosInfValue.TextFormatOutput
Required.Editions_Proto3.TextFormatInput.FloatFieldTooLarge.ProtobufOutput
Required.Editions_Proto3.TextFormatInput.FloatFieldTooLarge.TextFormatOutput
Required.Editions_Proto3.TextFormatInput.FloatFieldTooSmall.ProtobufOutput
Required.Editions_Proto3.TextFormatInput.FloatFieldTooSmall.TextFormatOutput
Required.Editions_Proto3.TextFormatInput.FloatFieldWithInt32Max.ProtobufOutput
Required.Editions_Proto3.TextFormatInput.FloatFieldWithInt32Max.TextFormatOutput
Required.Editions_Proto3.TextFormatInput.FloatFieldWithVeryPreciseNumber.ProtobufOutput
Required.Editions_Proto3.TextFormatInput.FloatFieldWithVeryPreciseNumber.TextFormatOutput
Required.Editions_Proto3.TextFormatInput.HelloWorld.ProtobufOutput
Required.Editions_Proto3.TextFormatInput.HelloWorld.TextFormatOutput
Required.Editions_Proto3.TextFormatInput.Int32FieldMaxValue.ProtobufOutput
Required.Editions_Proto3.TextFormatInput.Int32FieldMaxValue.TextFormatOutput
Required.Editions_Proto3.TextFormatInput.Int32FieldMinValue.ProtobufOutput
Required.Editions_Proto3.TextFormatInput.Int32FieldMinValue.TextFormatOutput
Required.Editions_Proto3.TextFormatInput.Int32FieldTooLarge
Required.Editions_Proto3.TextFormatInput.Int32FieldTooSmall
Required.Editions_Proto3.TextFormatInput.Int64FieldMaxValue.ProtobufOutput
Required.Editions_Proto3.TextFormatInput.Int64FieldMaxValue.TextFormatOutput
Required.Editions_Proto3.TextFormatInput.Int64FieldMinValue.ProtobufOutput
Required.Editions_Proto3.TextFormatInput.Int64FieldMinValue.TextFormatOutput
Required.Editions_Proto3.TextFormatInput.Int64FieldTooLarge
Required.Editions_Proto3.TextFormatInput.Int64FieldTooSmall
Required.Editions_Proto3.TextFormatInput.StringFieldBadUTF8Hex
Required.Editions_Proto3.TextFormatInput.StringFieldBadUTF8Octal
Required.Editions_Proto3.TextFormatInput.StringLiteralBasicEscapesBytes.ProtobufOutput
Required.Editions_Proto3.TextFormatInput.StringLiteralBasicEscapesBytes.TextFormatOutput
Required.Editions_Proto3.TextFormatInput.StringLiteralBasicEscapesString.ProtobufOutput
Required.Editions_Proto3.TextFormatInput.StringLiteralBasicEscapesString.TextFormatOutput
Required.Editions_Proto3.TextFormatInput.StringLiteralConcatBytes.ProtobufOutput
Required.Editions_Proto3.TextFormatInput.StringLiteralConcatBytes.TextFormatOutput
Required.Editions_Proto3.TextFormatInput.StringLiteralConcatString.ProtobufOutput
Required.Editions_Proto3.TextFormatInput.StringLiteralConcatString.TextFormatOutput
Required.Editions_Proto3.TextFormatInput.StringLiteralHexEscapesBytes.ProtobufOutput
Required.Editions_Proto3.TextFormatInput.StringLiteralHexEscapesBytes.TextFormatOutput
Required.Editions_Proto3.TextFormatInput.StringLiteralHexEscapesString.ProtobufOutput
Required.Editions_Proto3.TextFormatInput.StringLiteralHexEscapesString.TextFormatOutput
Required.Editions_Proto3.TextFormatInput.StringLiteralIncludesLFBytes
Required.Editions_Proto3.TextFormatInput.StringLiteralIncludesLFString
Required.Editions_Proto3.TextFormatInput.StringLiteralLongUnicodeEscapeTooLargeBytes
Required.Editions_Proto3.TextFormatInput.StringLiteralLongUnicodeEscapeTooLargeString
Required.Editions_Proto3.TextFormatInput.StringLiteralOctalEscapesBytes.ProtobufOutput
Required.Editions_Proto3.TextFormatInput.StringLiteralOctalEscapesBytes.TextFormatOutput
Required.Editions_Proto3.TextFormatInput.StringLiteralOctalEscapesString.ProtobufOutput
Required.Editions_Proto3.TextFormatInput.StringLiteralOctalEscapesString.TextFormatOutput
Required.Editions_Proto3.TextFormatInput.Uint32FieldMaxValue.ProtobufOutput
Required.Editions_Proto3.TextFormatInput.Uint32FieldMaxValue.TextFormatOutput
Required.Editions_Proto3.TextFormatInput.Uint32FieldTooLarge
Required.Editions_Proto3.TextFormatInput.Uint64FieldMaxValue.ProtobufOutput
Required.Editions_Proto3.TextFormatInput.Uint64FieldMaxValue.TextFormatOutput
Required.Editions_Proto3.TextFormatInput.Uint64FieldTooLarge
18 changes: 18 additions & 0 deletions packages/protobuf-conformance/failing_tests_without_bigint.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,18 @@ Required.Proto2.JsonInput.Int64FieldMinValueNotQuoted.JsonOutput
Required.Proto2.JsonInput.Int64FieldMinValueNotQuoted.ProtobufOutput
Required.Proto2.JsonInput.Uint64FieldMaxValueNotQuoted.JsonOutput
Required.Proto2.JsonInput.Uint64FieldMaxValueNotQuoted.ProtobufOutput
Required.Editions_Proto2.JsonInput.Int64FieldMaxValueNotQuoted.JsonOutput
Required.Editions_Proto2.JsonInput.Int64FieldMaxValueNotQuoted.ProtobufOutput
Required.Editions_Proto2.JsonInput.Int64FieldMinValueNotQuoted.JsonOutput
Required.Editions_Proto2.JsonInput.Int64FieldMinValueNotQuoted.ProtobufOutput
Required.Editions_Proto2.JsonInput.Uint64FieldMaxValueNotQuoted.JsonOutput
Required.Editions_Proto2.JsonInput.Uint64FieldMaxValueNotQuoted.ProtobufOutput
Required.Editions_Proto3.JsonInput.Int64FieldMaxValueNotQuoted.JsonOutput
Required.Editions_Proto3.JsonInput.Int64FieldMaxValueNotQuoted.ProtobufOutput
Required.Editions_Proto3.JsonInput.Int64FieldMinValueNotQuoted.JsonOutput
Required.Editions_Proto3.JsonInput.Int64FieldMinValueNotQuoted.ProtobufOutput
Required.Editions_Proto3.JsonInput.Uint64FieldMaxValueNotQuoted.JsonOutput
Required.Editions_Proto3.JsonInput.Uint64FieldMaxValueNotQuoted.ProtobufOutput

# Without BigInt support, our implementation does not validate that 64-bit
# values are within bounds.
Expand All @@ -24,3 +36,9 @@ Required.Proto3.JsonInput.Uint64FieldTooLarge
Required.Proto2.JsonInput.Int64FieldTooLarge
Required.Proto2.JsonInput.Int64FieldTooSmall
Required.Proto2.JsonInput.Uint64FieldTooLarge
Required.Editions_Proto2.JsonInput.Int64FieldTooLarge
Required.Editions_Proto2.JsonInput.Int64FieldTooSmall
Required.Editions_Proto2.JsonInput.Uint64FieldTooLarge
Required.Editions_Proto3.JsonInput.Int64FieldTooLarge
Required.Editions_Proto3.JsonInput.Int64FieldTooSmall
Required.Editions_Proto3.JsonInput.Uint64FieldTooLarge
4 changes: 2 additions & 2 deletions packages/protobuf-conformance/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
"generate": "protoc --es_out=src/gen --es_opt=ts_nocheck=false,target=ts --proto_path=$(upstream-include conformance) $(upstream-files conformance)",
"postgenerate": "license-header src/gen",
"test": "npm run test:bigint && npm run test:string",
"test:bigint": "BUF_BIGINT_DISABLE=0 conformance_test_runner --enforce_recommended --failure_list failing_tests_with_bigint.txt --text_format_failure_list failing_tests_text_format.txt bin/conformance.js",
"test:string": "BUF_BIGINT_DISABLE=1 conformance_test_runner --enforce_recommended --failure_list failing_tests_without_bigint.txt --text_format_failure_list failing_tests_text_format.txt bin/conformance.js"
"test:bigint": "BUF_BIGINT_DISABLE=0 conformance_test_runner --maximum_edition MAX --enforce_recommended --failure_list failing_tests_with_bigint.txt --text_format_failure_list failing_tests_text_format.txt bin/conformance.js",
"test:string": "BUF_BIGINT_DISABLE=1 conformance_test_runner --maximum_edition MAX --enforce_recommended --failure_list failing_tests_without_bigint.txt --text_format_failure_list failing_tests_text_format.txt bin/conformance.js"
},
"type": "module",
"types": "./dist/types/index.d.ts",
Expand Down
6 changes: 6 additions & 0 deletions packages/protobuf-conformance/src/conformance.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,9 @@ import {
} from "./gen/conformance/conformance_pb.js";
import { fileDesc_google_protobuf_test_messages_proto3 } from "./gen/google/protobuf/test_messages_proto3_pb.js";
import { fileDesc_google_protobuf_test_messages_proto2 } from "./gen/google/protobuf/test_messages_proto2_pb.js";
import { fileDesc_google_protobuf_test_messages_edition2023 } from "./gen/google/protobuf/test_messages_edition2023_pb.js";
import { fileDesc_google_protobuf_test_messages_proto2_editions } from "./gen/google/protobuf/test_messages_proto2_editions_pb.js";
import { fileDesc_google_protobuf_test_messages_proto3_editions } from "./gen/google/protobuf/test_messages_proto3_editions_pb.js";
import {
fileDesc_google_protobuf_any,
fileDesc_google_protobuf_duration,
Expand All @@ -47,6 +50,9 @@ import {
const registry = createRegistry(
fileDesc_google_protobuf_test_messages_proto2,
fileDesc_google_protobuf_test_messages_proto3,
fileDesc_google_protobuf_test_messages_edition2023,
fileDesc_google_protobuf_test_messages_proto2_editions,
fileDesc_google_protobuf_test_messages_proto3_editions,
fileDesc_google_protobuf_any,
fileDesc_google_protobuf_struct,
fileDesc_google_protobuf_field_mask,
Expand Down
Loading

0 comments on commit 91ac90f

Please sign in to comment.