protoc 34.2.0 → 35.0.0-rc2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -1,7 +1,7 @@
1
1
  protoc
2
2
  ======
3
3
 
4
- This package provides the Protobuf compiler `protoc` <!-- inject: release.tag_name -->v34.2<!-- end -->.
4
+ This package provides the Protobuf compiler `protoc` <!-- inject: release.tag_name -->v35.0-rc2<!-- end -->.
5
5
 
6
6
  ```shell script
7
7
  npm install --save-dev protoc
package/assets.json CHANGED
@@ -1,39 +1,39 @@
1
1
  [
2
2
  {
3
- "name": "protoc-34.2-linux-aarch_64.zip",
4
- "browser_download_url": "https://github.com/protocolbuffers/protobuf/releases/download/v34.2/protoc-34.2-linux-aarch_64.zip",
3
+ "name": "protoc-35.0-rc-2-linux-aarch_64.zip",
4
+ "browser_download_url": "https://github.com/protocolbuffers/protobuf/releases/download/v35.0-rc2/protoc-35.0-rc-2-linux-aarch_64.zip",
5
5
  "platform": "linux",
6
6
  "arch": "arm64",
7
7
  "dotExe": false,
8
8
  "executable": "protoc-linux-aarch_64"
9
9
  },
10
10
  {
11
- "name": "protoc-34.2-linux-x86_64.zip",
12
- "browser_download_url": "https://github.com/protocolbuffers/protobuf/releases/download/v34.2/protoc-34.2-linux-x86_64.zip",
11
+ "name": "protoc-35.0-rc-2-linux-x86_64.zip",
12
+ "browser_download_url": "https://github.com/protocolbuffers/protobuf/releases/download/v35.0-rc2/protoc-35.0-rc-2-linux-x86_64.zip",
13
13
  "platform": "linux",
14
14
  "arch": "x64",
15
15
  "dotExe": false,
16
16
  "executable": "protoc-linux-x86_64"
17
17
  },
18
18
  {
19
- "name": "protoc-34.2-osx-aarch_64.zip",
20
- "browser_download_url": "https://github.com/protocolbuffers/protobuf/releases/download/v34.2/protoc-34.2-osx-aarch_64.zip",
19
+ "name": "protoc-35.0-rc-2-osx-aarch_64.zip",
20
+ "browser_download_url": "https://github.com/protocolbuffers/protobuf/releases/download/v35.0-rc2/protoc-35.0-rc-2-osx-aarch_64.zip",
21
21
  "platform": "darwin",
22
22
  "arch": "arm64",
23
23
  "dotExe": false,
24
24
  "executable": "protoc-osx-aarch_64"
25
25
  },
26
26
  {
27
- "name": "protoc-34.2-osx-x86_64.zip",
28
- "browser_download_url": "https://github.com/protocolbuffers/protobuf/releases/download/v34.2/protoc-34.2-osx-x86_64.zip",
27
+ "name": "protoc-35.0-rc-2-osx-x86_64.zip",
28
+ "browser_download_url": "https://github.com/protocolbuffers/protobuf/releases/download/v35.0-rc2/protoc-35.0-rc-2-osx-x86_64.zip",
29
29
  "platform": "darwin",
30
30
  "arch": "x64",
31
31
  "dotExe": false,
32
32
  "executable": "protoc-osx-x86_64"
33
33
  },
34
34
  {
35
- "name": "protoc-34.2-win64.zip",
36
- "browser_download_url": "https://github.com/protocolbuffers/protobuf/releases/download/v34.2/protoc-34.2-win64.zip",
35
+ "name": "protoc-35.0-rc-2-win64.zip",
36
+ "browser_download_url": "https://github.com/protocolbuffers/protobuf/releases/download/v35.0-rc2/protoc-35.0-rc-2-win64.zip",
37
37
  "platform": "win32",
38
38
  "arch": "x64",
39
39
  "dotExe": true,
Binary file
Binary file
Binary file
Binary file
Binary file
@@ -42,121 +42,65 @@ option csharp_namespace = "Google.Protobuf.WellKnownTypes";
42
42
  // `Any` contains an arbitrary serialized protocol buffer message along with a
43
43
  // URL that describes the type of the serialized message.
44
44
  //
45
- // Protobuf library provides support to pack/unpack Any values in the form
46
- // of utility functions or additional generated methods of the Any type.
47
- //
48
- // Example 1: Pack and unpack a message in C++.
49
- //
50
- // Foo foo = ...;
51
- // Any any;
52
- // any.PackFrom(foo);
53
- // ...
54
- // if (any.UnpackTo(&foo)) {
55
- // ...
56
- // }
57
- //
58
- // Example 2: Pack and unpack a message in Java.
59
- //
60
- // Foo foo = ...;
61
- // Any any = Any.pack(foo);
62
- // ...
63
- // if (any.is(Foo.class)) {
64
- // foo = any.unpack(Foo.class);
65
- // }
66
- // // or ...
67
- // if (any.isSameTypeAs(Foo.getDefaultInstance())) {
68
- // foo = any.unpack(Foo.getDefaultInstance());
69
- // }
70
- //
71
- // Example 3: Pack and unpack a message in Python.
72
- //
73
- // foo = Foo(...)
74
- // any = Any()
75
- // any.Pack(foo)
76
- // ...
77
- // if any.Is(Foo.DESCRIPTOR):
78
- // any.Unpack(foo)
79
- // ...
80
- //
81
- // Example 4: Pack and unpack a message in Go
82
- //
83
- // foo := &pb.Foo{...}
84
- // any, err := anypb.New(foo)
85
- // if err != nil {
86
- // ...
87
- // }
88
- // ...
89
- // foo := &pb.Foo{}
90
- // if err := any.UnmarshalTo(foo); err != nil {
91
- // ...
92
- // }
93
- //
94
- // The pack methods provided by protobuf library will by default use
95
- // 'type.googleapis.com/full.type.name' as the type URL and the unpack
96
- // methods only use the fully qualified type name after the last '/'
97
- // in the type URL, for example "foo.bar.com/x/y.z" will yield type
98
- // name "y.z".
99
- //
100
- // JSON
101
- // ====
102
- // The JSON representation of an `Any` value uses the regular
103
- // representation of the deserialized, embedded message, with an
104
- // additional field `@type` which contains the type URL. Example:
105
- //
106
- // package google.profile;
107
- // message Person {
108
- // string first_name = 1;
109
- // string last_name = 2;
110
- // }
111
- //
112
- // {
113
- // "@type": "type.googleapis.com/google.profile.Person",
114
- // "firstName": <string>,
115
- // "lastName": <string>
116
- // }
117
- //
118
- // If the embedded message type is well-known and has a custom JSON
119
- // representation, that representation will be embedded adding a field
120
- // `value` which holds the custom JSON in addition to the `@type`
121
- // field. Example (for message [google.protobuf.Duration][]):
122
- //
123
- // {
124
- // "@type": "type.googleapis.com/google.protobuf.Duration",
125
- // "value": "1.212s"
126
- // }
127
- //
45
+ // In its binary encoding, an `Any` is an ordinary message; but in other wire
46
+ // forms like JSON, it has a special encoding. The format of the type URL is
47
+ // described on the `type_url` field.
48
+ //
49
+ // Protobuf APIs provide utilities to interact with `Any` values:
50
+ //
51
+ // - A 'pack' operation accepts a message and constructs a generic `Any` wrapper
52
+ // around it.
53
+ // - An 'unpack' operation reads the content of an `Any` message, either into an
54
+ // existing message or a new one. Unpack operations must check the type of the
55
+ // value they unpack against the declared `type_url`.
56
+ // - An 'is' operation decides whether an `Any` contains a message of the given
57
+ // type, i.e. whether it can 'unpack' that type.
58
+ //
59
+ // The JSON format representation of an `Any` follows one of these cases:
60
+ //
61
+ // - For types without special-cased JSON encodings, the JSON format
62
+ // representation of the `Any` is the same as that of the message, with an
63
+ // additional `@type` field which contains the type URL.
64
+ // - For types with special-cased JSON encodings (typically called 'well-known'
65
+ // types, listed in https://protobuf.dev/programming-guides/json/#any), the
66
+ // JSON format representation has a key `@type` which contains the type URL
67
+ // and a key `value` which contains the JSON-serialized value.
68
+ //
69
+ // The text format representation of an `Any` is like a message with one field
70
+ // whose name is the type URL in brackets. For example, an `Any` containing a
71
+ // `foo.Bar` message may be written `[type.googleapis.com/foo.Bar] { a: 2 }`.
128
72
  message Any {
129
- // A URL/resource name that uniquely identifies the type of the serialized
130
- // protocol buffer message. This string must contain at least
131
- // one "/" character. The last segment of the URL's path must represent
132
- // the fully qualified name of the type (as in
133
- // `path/google.protobuf.Duration`). The name should be in a canonical form
134
- // (e.g., leading "." is not accepted).
73
+ // Identifies the type of the serialized Protobuf message with a URI reference
74
+ // consisting of a prefix ending in a slash and the fully-qualified type name.
135
75
  //
136
- // In practice, teams usually precompile into the binary all types that they
137
- // expect it to use in the context of Any. However, for URLs which use the
138
- // scheme `http`, `https`, or no scheme, one can optionally set up a type
139
- // server that maps type URLs to message definitions as follows:
76
+ // Example: type.googleapis.com/google.protobuf.StringValue
140
77
  //
141
- // * If no scheme is provided, `https` is assumed.
142
- // * An HTTP GET on the URL must yield a [google.protobuf.Type][]
143
- // value in binary format, or produce an error.
144
- // * Applications are allowed to cache lookup results based on the
145
- // URL, or have them precompiled into a binary to avoid any
146
- // lookup. Therefore, binary compatibility needs to be preserved
147
- // on changes to types. (Use versioned type names to manage
148
- // breaking changes.)
78
+ // This string must contain at least one `/` character, and the content after
79
+ // the last `/` must be the fully-qualified name of the type in canonical
80
+ // form, without a leading dot. Do not write a scheme on these URI references
81
+ // so that clients do not attempt to contact them.
149
82
  //
150
- // Note: this functionality is not currently available in the official
151
- // protobuf release, and it is not used for type URLs beginning with
152
- // type.googleapis.com. As of May 2023, there are no widely used type server
153
- // implementations and no plans to implement one.
83
+ // The prefix is arbitrary and Protobuf implementations are expected to
84
+ // simply strip off everything up to and including the last `/` to identify
85
+ // the type. `type.googleapis.com/` is a common default prefix that some
86
+ // legacy implementations require. This prefix does not indicate the origin of
87
+ // the type, and URIs containing it are not expected to respond to any
88
+ // requests.
154
89
  //
155
- // Schemes other than `http`, `https` (or the empty scheme) might be
156
- // used with implementation specific semantics.
90
+ // All type URL strings must be legal URI references with the additional
91
+ // restriction (for the text format) that the content of the reference
92
+ // must consist only of alphanumeric characters, percent-encoded escapes, and
93
+ // characters in the following set (not including the outer backticks):
94
+ // `/-.~_!$&()*+,;=`. Despite our allowing percent encodings, implementations
95
+ // should not unescape them to prevent confusion with existing parsers. For
96
+ // example, `type.googleapis.com%2FFoo` should be rejected.
157
97
  //
98
+ // In the original design of `Any`, the possibility of launching a type
99
+ // resolution service at these type URLs was considered but Protobuf never
100
+ // implemented one and considers contacting these URLs to be problematic and
101
+ // a potential security issue. Do not attempt to contact type URLs.
158
102
  string type_url = 1;
159
103
 
160
- // Must be a valid serialized protocol buffer of the above specified type.
104
+ // Holds a Protobuf serialization of the type described by type_url.
161
105
  bytes value = 2;
162
106
  }
@@ -0,0 +1,23 @@
1
+ // Protocol Buffers - Google's data interchange format
2
+ // Copyright 2026 Google Inc. All rights reserved.
3
+ //
4
+ // Use of this source code is governed by a BSD-style
5
+ // license that can be found in the LICENSE file or at
6
+ // https://developers.google.com/open-source/licenses/bsd
7
+
8
+ syntax = "proto2";
9
+
10
+ package pb;
11
+
12
+ option csharp_namespace = "Google.Protobuf.Reflection";
13
+ option java_multiple_files = true;
14
+ option java_outer_classname = "CSharpFeaturesOuterClass";
15
+
16
+ import "google/protobuf/descriptor.proto";
17
+
18
+ extend google.protobuf.FeatureSet {
19
+ optional CSharpFeatures csharp = 1004;
20
+ }
21
+
22
+ message CSharpFeatures {
23
+ }
@@ -1,5 +1,5 @@
1
1
  // Protocol Buffers - Google's data interchange format
2
- // Copyright 2023 Google Inc. All rights reserved.
2
+ // Copyright 2023 Google LLC. All rights reserved.
3
3
  //
4
4
  // Use of this source code is governed by a BSD-style
5
5
  // license that can be found in the LICENSE file or at
@@ -64,4 +64,24 @@ message CppFeatures {
64
64
  edition_defaults = { edition: EDITION_LEGACY, value: "false" },
65
65
  edition_defaults = { edition: EDITION_2024, value: "true" }
66
66
  ];
67
+
68
+ enum RepeatedType {
69
+ REPEATED_TYPE_UNKNOWN = 0;
70
+ // The repeated field will be backed by proto2::Repeated(Ptr)Field, and
71
+ // accessors will return a reference/pointer to this type.
72
+ LEGACY = 1;
73
+ // The repeated field has an opaque backing type, and accessors will return
74
+ // a RepeatedFieldProxy.
75
+ PROXY = 2;
76
+ }
77
+
78
+ optional RepeatedType repeated_type = 4 [
79
+ retention = RETENTION_RUNTIME,
80
+ targets = TARGET_TYPE_FIELD,
81
+ targets = TARGET_TYPE_FILE,
82
+ feature_support = {
83
+ edition_introduced: EDITION_UNSTABLE,
84
+ },
85
+ edition_defaults = { edition: EDITION_LEGACY, value: "LEGACY" }
86
+ ];
67
87
  }
@@ -1,32 +1,9 @@
1
1
  // Protocol Buffers - Google's data interchange format
2
- // Copyright 2008 Google Inc. All rights reserved.
3
- // https://developers.google.com/protocol-buffers/
2
+ // Copyright 2008 Google LLC. All rights reserved.
4
3
  //
5
- // Redistribution and use in source and binary forms, with or without
6
- // modification, are permitted provided that the following conditions are
7
- // met:
8
- //
9
- // * Redistributions of source code must retain the above copyright
10
- // notice, this list of conditions and the following disclaimer.
11
- // * Redistributions in binary form must reproduce the above
12
- // copyright notice, this list of conditions and the following disclaimer
13
- // in the documentation and/or other materials provided with the
14
- // distribution.
15
- // * Neither the name of Google Inc. nor the names of its
16
- // contributors may be used to endorse or promote products derived from
17
- // this software without specific prior written permission.
18
- //
19
- // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
20
- // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
21
- // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
22
- // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
23
- // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
24
- // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
25
- // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
26
- // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
27
- // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
28
- // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
29
- // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
4
+ // Use of this source code is governed by a BSD-style
5
+ // license that can be found in the LICENSE file or at
6
+ // https://developers.google.com/open-source/licenses/bsd
30
7
 
31
8
  // Author: kenton@google.com (Kenton Varda)
32
9
  // Based on original Protocol Buffers design by
@@ -85,6 +62,7 @@ enum Edition {
85
62
  // comparison.
86
63
  EDITION_2023 = 1000;
87
64
  EDITION_2024 = 1001;
65
+ EDITION_2026 = 1002;
88
66
 
89
67
  // A placeholder edition for developing and testing unscheduled features.
90
68
  EDITION_UNSTABLE = 9999;
@@ -189,6 +167,9 @@ message DescriptorProto {
189
167
  }
190
168
 
191
169
  message ExtensionRangeOptions {
170
+ // Range reserved for first-class custom options defined by the Protobuf
171
+ // team. User custom options must use the 1000+ range instead.
172
+ extensions 990 to 998;
192
173
  // The parser stores options it doesn't recognize here. See above.
193
174
  repeated UninterpretedOption uninterpreted_option = 999;
194
175
 
@@ -583,6 +564,14 @@ message FileOptions {
583
564
  // developers should rely on the protoreflect APIs for their client language.
584
565
  optional FeatureSet features = 50;
585
566
 
567
+ // Range reserved for first-class custom options defined by the Protobuf
568
+ // team. User custom options must use the 1000+ range instead.
569
+ extensions 990 to 998 [declaration = {
570
+ number: 990,
571
+ full_name: ".pb.file.cpp",
572
+ type: ".pb.file.CppFileOptions"
573
+ }];
574
+
586
575
  // The parser stores options it doesn't recognize here.
587
576
  // See the documentation for the "Options" section above.
588
577
  repeated UninterpretedOption uninterpreted_option = 999;
@@ -672,6 +661,10 @@ message MessageOptions {
672
661
  // developers should rely on the protoreflect APIs for their client language.
673
662
  optional FeatureSet features = 12;
674
663
 
664
+ // Range reserved for first-class custom options defined by the Protobuf
665
+ // team. User custom options must use the 1000+ range instead.
666
+ extensions 990 to 998;
667
+
675
668
  // The parser stores options it doesn't recognize here. See above.
676
669
  repeated UninterpretedOption uninterpreted_option = 999;
677
670
 
@@ -842,6 +835,10 @@ message FieldOptions {
842
835
  }
843
836
  optional FeatureSupport feature_support = 22;
844
837
 
838
+ // Range reserved for first-class custom options defined by the Protobuf
839
+ // team. User custom options must use the 1000+ range instead.
840
+ extensions 990 to 998;
841
+
845
842
  // The parser stores options it doesn't recognize here. See above.
846
843
  repeated UninterpretedOption uninterpreted_option = 999;
847
844
 
@@ -859,6 +856,10 @@ message OneofOptions {
859
856
  // developers should rely on the protoreflect APIs for their client language.
860
857
  optional FeatureSet features = 1;
861
858
 
859
+ // Range reserved for first-class custom options defined by the Protobuf
860
+ // team. User custom options must use the 1000+ range instead.
861
+ extensions 990 to 998;
862
+
862
863
  // The parser stores options it doesn't recognize here. See above.
863
864
  repeated UninterpretedOption uninterpreted_option = 999;
864
865
 
@@ -894,6 +895,10 @@ message EnumOptions {
894
895
  // developers should rely on the protoreflect APIs for their client language.
895
896
  optional FeatureSet features = 7;
896
897
 
898
+ // Range reserved for first-class custom options defined by the Protobuf
899
+ // team. User custom options must use the 1000+ range instead.
900
+ extensions 990 to 998;
901
+
897
902
  // The parser stores options it doesn't recognize here. See above.
898
903
  repeated UninterpretedOption uninterpreted_option = 999;
899
904
 
@@ -922,6 +927,10 @@ message EnumValueOptions {
922
927
  // Information about the support window of a feature value.
923
928
  optional FieldOptions.FeatureSupport feature_support = 4;
924
929
 
930
+ // Range reserved for first-class extension options defined by the Protobuf
931
+ // team. Custom options must use the 1000+ range instead.
932
+ extensions 990 to 998;
933
+
925
934
  // The parser stores options it doesn't recognize here. See above.
926
935
  repeated UninterpretedOption uninterpreted_option = 999;
927
936
 
@@ -948,6 +957,10 @@ message ServiceOptions {
948
957
  // this is a formalization for deprecating services.
949
958
  optional bool deprecated = 33 [default = false];
950
959
 
960
+ // Range reserved for first-class custom options defined by the Protobuf
961
+ // team. User custom options must use the 1000+ range instead.
962
+ extensions 990 to 998;
963
+
951
964
  // The parser stores options it doesn't recognize here. See above.
952
965
  repeated UninterpretedOption uninterpreted_option = 999;
953
966
 
@@ -985,6 +998,10 @@ message MethodOptions {
985
998
  // developers should rely on the protoreflect APIs for their client language.
986
999
  optional FeatureSet features = 35;
987
1000
 
1001
+ // Range reserved for first-class custom options defined by the Protobuf
1002
+ // team. User custom options must use the 1000+ range instead.
1003
+ extensions 990 to 998;
1004
+
988
1005
  // The parser stores options it doesn't recognize here. See above.
989
1006
  repeated UninterpretedOption uninterpreted_option = 999;
990
1007
 
@@ -1133,6 +1150,7 @@ message FeatureSet {
1133
1150
  ENFORCE_NAMING_STYLE_UNKNOWN = 0;
1134
1151
  STYLE2024 = 1;
1135
1152
  STYLE_LEGACY = 2;
1153
+ STYLE2026 = 3;
1136
1154
  }
1137
1155
  optional EnforceNamingStyle enforce_naming_style = 7 [
1138
1156
  retention = RETENTION_SOURCE,
@@ -1149,7 +1167,8 @@ message FeatureSet {
1149
1167
  edition_introduced: EDITION_2024,
1150
1168
  },
1151
1169
  edition_defaults = { edition: EDITION_LEGACY, value: "STYLE_LEGACY" },
1152
- edition_defaults = { edition: EDITION_2024, value: "STYLE2024" }
1170
+ edition_defaults = { edition: EDITION_2024, value: "STYLE2024" },
1171
+ edition_defaults = { edition: EDITION_UNSTABLE, value: "STYLE2026" }
1153
1172
  ];
1154
1173
 
1155
1174
  message VisibilityFeature {
@@ -1202,6 +1221,11 @@ message FeatureSet {
1202
1221
  full_name: ".pb.python",
1203
1222
  type: ".pb.PythonFeatures"
1204
1223
  },
1224
+ declaration = {
1225
+ number: 1004,
1226
+ full_name: ".pb.csharp",
1227
+ type: ".pb.CSharpFeatures"
1228
+ },
1205
1229
  declaration = {
1206
1230
  number: 1100,
1207
1231
  full_name: ".imp.impress_feature_set",
@@ -40,55 +40,71 @@ option java_multiple_files = true;
40
40
  option objc_class_prefix = "GPB";
41
41
  option csharp_namespace = "Google.Protobuf.WellKnownTypes";
42
42
 
43
- // `Struct` represents a structured data value, consisting of fields
44
- // which map to dynamically typed values. In some languages, `Struct`
45
- // might be supported by a native representation. For example, in
46
- // scripting languages like JS a struct is represented as an
47
- // object. The details of that representation are described together
48
- // with the proto support for the language.
43
+ // Represents a JSON object.
49
44
  //
50
- // The JSON representation for `Struct` is JSON object.
45
+ // An unordered key-value map, intending to perfectly capture the semantics of a
46
+ // JSON object. This enables parsing any arbitrary JSON payload as a message
47
+ // field in ProtoJSON format.
48
+ //
49
+ // This follows RFC 8259 guidelines for interoperable JSON: notably this type
50
+ // cannot represent large Int64 values or `NaN`/`Infinity` numbers,
51
+ // since the JSON format generally does not support those values in its number
52
+ // type.
53
+ //
54
+ // If you do not intend to parse arbitrary JSON into your message, a custom
55
+ // typed message should be preferred instead of using this type.
51
56
  message Struct {
52
57
  // Unordered map of dynamically typed values.
53
58
  map<string, Value> fields = 1;
54
59
  }
55
60
 
61
+ // Represents a JSON value.
62
+ //
56
63
  // `Value` represents a dynamically typed value which can be either
57
64
  // null, a number, a string, a boolean, a recursive struct value, or a
58
65
  // list of values. A producer of value is expected to set one of these
59
- // variants. Absence of any variant indicates an error.
60
- //
61
- // The JSON representation for `Value` is JSON value.
66
+ // variants. Absence of any variant is an invalid state.
62
67
  message Value {
63
68
  // The kind of value.
64
69
  oneof kind {
65
- // Represents a null value.
70
+ // Represents a JSON `null`.
66
71
  NullValue null_value = 1;
67
- // Represents a double value.
72
+
73
+ // Represents a JSON number. Must not be `NaN`, `Infinity` or
74
+ // `-Infinity`, since those are not supported in JSON. This also cannot
75
+ // represent large Int64 values, since JSON format generally does not
76
+ // support them in its number type.
68
77
  double number_value = 2;
69
- // Represents a string value.
78
+
79
+ // Represents a JSON string.
70
80
  string string_value = 3;
71
- // Represents a boolean value.
81
+
82
+ // Represents a JSON boolean (`true` or `false` literal in JSON).
72
83
  bool bool_value = 4;
73
- // Represents a structured value.
84
+
85
+ // Represents a JSON object.
74
86
  Struct struct_value = 5;
75
- // Represents a repeated `Value`.
87
+
88
+ // Represents a JSON array.
76
89
  ListValue list_value = 6;
77
90
  }
78
91
  }
79
92
 
80
- // `NullValue` is a singleton enumeration to represent the null value for the
81
- // `Value` type union.
93
+ // Represents a JSON `null`.
82
94
  //
83
- // The JSON representation for `NullValue` is JSON `null`.
95
+ // `NullValue` is a sentinel, using an enum with only one value to represent
96
+ // the null value for the `Value` type union.
97
+ //
98
+ // A field of type `NullValue` with any value other than `0` is considered
99
+ // invalid. Most ProtoJSON serializers will emit a Value with a `null_value` set
100
+ // as a JSON `null` regardless of the integer value, and so will round trip to
101
+ // a `0` value.
84
102
  enum NullValue {
85
103
  // Null value.
86
104
  NULL_VALUE = 0;
87
105
  }
88
106
 
89
- // `ListValue` is a wrapper around a repeated field of values.
90
- //
91
- // The JSON representation for `ListValue` is JSON array.
107
+ // Represents a JSON array.
92
108
  message ListValue {
93
109
  // Repeated field of dynamically typed values.
94
110
  repeated Value values = 1;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "protoc",
3
- "version": "34.2.0",
4
- "upstreamVersion": "v34.2",
3
+ "version": "35.0.0-rc2",
4
+ "upstreamVersion": "v35.0-rc2",
5
5
  "description": "Installs the protocol buffer compiler \"protoc\" for you.",
6
6
  "bin": {
7
7
  "protoc": "protoc.cjs"