protoc 30.2.0 → 31.0.0-rc1

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 -->v30.2<!-- end -->.
4
+ This package provides the Protobuf compiler `protoc` <!-- inject: release.tag_name -->v31.0-rc1<!-- 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-30.2-linux-aarch_64.zip",
4
- "browser_download_url": "https://github.com/protocolbuffers/protobuf/releases/download/v30.2/protoc-30.2-linux-aarch_64.zip",
3
+ "name": "protoc-31.0-rc-1-linux-aarch_64.zip",
4
+ "browser_download_url": "https://github.com/protocolbuffers/protobuf/releases/download/v31.0-rc1/protoc-31.0-rc-1-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-30.2-linux-x86_64.zip",
12
- "browser_download_url": "https://github.com/protocolbuffers/protobuf/releases/download/v30.2/protoc-30.2-linux-x86_64.zip",
11
+ "name": "protoc-31.0-rc-1-linux-x86_64.zip",
12
+ "browser_download_url": "https://github.com/protocolbuffers/protobuf/releases/download/v31.0-rc1/protoc-31.0-rc-1-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-30.2-osx-aarch_64.zip",
20
- "browser_download_url": "https://github.com/protocolbuffers/protobuf/releases/download/v30.2/protoc-30.2-osx-aarch_64.zip",
19
+ "name": "protoc-31.0-rc-1-osx-aarch_64.zip",
20
+ "browser_download_url": "https://github.com/protocolbuffers/protobuf/releases/download/v31.0-rc1/protoc-31.0-rc-1-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-30.2-osx-x86_64.zip",
28
- "browser_download_url": "https://github.com/protocolbuffers/protobuf/releases/download/v30.2/protoc-30.2-osx-x86_64.zip",
27
+ "name": "protoc-31.0-rc-1-osx-x86_64.zip",
28
+ "browser_download_url": "https://github.com/protocolbuffers/protobuf/releases/download/v31.0-rc1/protoc-31.0-rc-1-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-30.2-win64.zip",
36
- "browser_download_url": "https://github.com/protocolbuffers/protobuf/releases/download/v30.2/protoc-30.2-win64.zip",
35
+ "name": "protoc-31.0-rc-1-win64.zip",
36
+ "browser_download_url": "https://github.com/protocolbuffers/protobuf/releases/download/v31.0-rc1/protoc-31.0-rc-1-win64.zip",
37
37
  "platform": "win32",
38
38
  "arch": "x64",
39
39
  "dotExe": true,
Binary file
Binary file
Binary file
Binary file
Binary file
@@ -113,6 +113,10 @@ message FileDescriptorProto {
113
113
  // For Google-internal migration only. Do not use.
114
114
  repeated int32 weak_dependency = 11;
115
115
 
116
+ // Names of files imported by this file purely for the purpose of providing
117
+ // option extensions. These are excluded from the dependency list above.
118
+ repeated string option_dependency = 15;
119
+
116
120
  // All top-level definitions in this file.
117
121
  repeated DescriptorProto message_type = 4;
118
122
  repeated EnumDescriptorProto enum_type = 5;
@@ -176,6 +180,9 @@ message DescriptorProto {
176
180
  // Reserved field names, which may not be used by fields in the same message.
177
181
  // A given name may only be reserved once.
178
182
  repeated string reserved_name = 10;
183
+
184
+ // Support for `export` and `local` keywords on enums.
185
+ optional SymbolVisibility visibility = 11;
179
186
  }
180
187
 
181
188
  message ExtensionRangeOptions {
@@ -372,6 +379,9 @@ message EnumDescriptorProto {
372
379
  // Reserved enum value names, which may not be reused. A given name may only
373
380
  // be reserved once.
374
381
  repeated string reserved_name = 5;
382
+
383
+ // Support for `export` and `local` keywords on enums.
384
+ optional SymbolVisibility visibility = 6;
375
385
  }
376
386
 
377
387
  // Describes a value within an enum.
@@ -1121,6 +1131,37 @@ message FeatureSet {
1121
1131
  edition_defaults = { edition: EDITION_2024, value: "STYLE2024" }
1122
1132
  ];
1123
1133
 
1134
+ message VisibilityFeature {
1135
+ enum DefaultSymbolVisibility {
1136
+ DEFAULT_SYMBOL_VISIBILITY_UNKNOWN = 0;
1137
+
1138
+ // Default pre-EDITION_2024, all UNSET visibility are export.
1139
+ EXPORT_ALL = 1;
1140
+
1141
+ // All top-level symbols default to export, nested default to local.
1142
+ EXPORT_TOP_LEVEL = 2;
1143
+
1144
+ // All symbols default to local.
1145
+ LOCAL_ALL = 3;
1146
+
1147
+ // All symbols local by default. Nested types cannot be exported.
1148
+ // With special case caveat for message { enum {} reserved 1 to max; }
1149
+ // This is the recommended setting for new protos.
1150
+ STRICT = 4;
1151
+ }
1152
+ reserved 1 to max;
1153
+ }
1154
+ optional VisibilityFeature.DefaultSymbolVisibility default_symbol_visibility =
1155
+ 8 [
1156
+ retention = RETENTION_SOURCE,
1157
+ targets = TARGET_TYPE_FILE,
1158
+ feature_support = {
1159
+ edition_introduced: EDITION_2024,
1160
+ },
1161
+ edition_defaults = { edition: EDITION_LEGACY, value: "EXPORT_ALL" },
1162
+ edition_defaults = { edition: EDITION_2024, value: "EXPORT_TOP_LEVEL" }
1163
+ ];
1164
+
1124
1165
  reserved 999;
1125
1166
 
1126
1167
  extensions 1000 to 9994 [
@@ -1363,3 +1404,14 @@ message GeneratedCodeInfo {
1363
1404
  optional Semantic semantic = 5;
1364
1405
  }
1365
1406
  }
1407
+
1408
+ // Describes the 'visibility' of a symbol with respect to the proto import
1409
+ // system. Symbols can only be imported when the visibility rules do not prevent
1410
+ // it (ex: local symbols cannot be imported). Visibility modifiers can only set
1411
+ // on `message` and `enum` as they are the only types available to be referenced
1412
+ // from other files.
1413
+ enum SymbolVisibility {
1414
+ VISIBILITY_UNSET = 0;
1415
+ VISIBILITY_LOCAL = 1;
1416
+ VISIBILITY_EXPORT = 2;
1417
+ }
@@ -40,8 +40,7 @@ message JavaFeatures {
40
40
  edition_defaults = { edition: EDITION_PROTO3, value: "false" }
41
41
  ];
42
42
 
43
- // The UTF8 validation strategy to use. See go/editions-utf8-validation for
44
- // more information on this feature.
43
+ // The UTF8 validation strategy to use.
45
44
  enum Utf8Validation {
46
45
  // Invalid default, which should never be used.
47
46
  UTF8_VALIDATION_UNKNOWN = 0;
@@ -68,6 +67,18 @@ message JavaFeatures {
68
67
  edition_defaults = { edition: EDITION_LEGACY, value: "DEFAULT" }
69
68
  ];
70
69
 
70
+ // Allows creation of large Java enums, extending beyond the standard
71
+ // constant limits imposed by the Java language.
72
+ optional bool large_enum = 3 [
73
+ retention = RETENTION_RUNTIME,
74
+ targets = TARGET_TYPE_ENUM,
75
+ targets = TARGET_TYPE_FILE,
76
+ feature_support = {
77
+ edition_introduced: EDITION_2024,
78
+ },
79
+ edition_defaults = { edition: EDITION_LEGACY, value: "false" }
80
+ ];
81
+
71
82
  // Whether to use the old default outer class name scheme, or the new feature
72
83
  // which adds a "Proto" suffix to the outer class name.
73
84
  //
@@ -84,4 +95,36 @@ message JavaFeatures {
84
95
  edition_defaults = { edition: EDITION_LEGACY, value: "true" },
85
96
  edition_defaults = { edition: EDITION_2024, value: "false" }
86
97
  ];
98
+
99
+ message NestInFileClassFeature {
100
+ enum NestInFileClass {
101
+ // Invalid default, which should never be used.
102
+ NEST_IN_FILE_CLASS_UNKNOWN = 0;
103
+ // Do not nest the generated class in the file class.
104
+ NO = 1;
105
+ // Nest the generated class in the file class.
106
+ YES = 2;
107
+ // Fall back to the `java_multiple_files` option. Users won't be able to
108
+ // set this option.
109
+ LEGACY = 3 [feature_support = {
110
+ edition_introduced: EDITION_2024
111
+ edition_removed: EDITION_2024
112
+ }];
113
+ }
114
+ reserved 1 to max;
115
+ }
116
+
117
+ // Whether to nest the generated class in the generated file class. This is
118
+ // only applicable to *top-level* messages, enums, and services.
119
+ optional NestInFileClassFeature.NestInFileClass nest_in_file_class = 5 [
120
+ retention = RETENTION_SOURCE,
121
+ targets = TARGET_TYPE_MESSAGE,
122
+ targets = TARGET_TYPE_ENUM,
123
+ targets = TARGET_TYPE_SERVICE,
124
+ feature_support = {
125
+ edition_introduced: EDITION_2024,
126
+ },
127
+ edition_defaults = { edition: EDITION_LEGACY, value: "LEGACY" },
128
+ edition_defaults = { edition: EDITION_2024, value: "NO" }
129
+ ];
87
130
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "protoc",
3
- "version": "30.2.0",
4
- "upstreamVersion": "v30.2",
3
+ "version": "31.0.0-rc1",
4
+ "upstreamVersion": "v31.0-rc1",
5
5
  "description": "Installs the protocol buffer compiler \"protoc\" for you.",
6
6
  "bin": {
7
7
  "protoc": "protoc.cjs"