protobufjs 7.3.1 → 7.3.3
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 +1 -1
- package/package.json +2 -3
- package/src/parse.js +4 -0
package/README.md
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "protobufjs",
|
|
3
|
-
"version": "7.3.
|
|
3
|
+
"version": "7.3.3",
|
|
4
4
|
"versionScheme": "~",
|
|
5
5
|
"description": "Protocol Buffers for JavaScript (& TypeScript).",
|
|
6
6
|
"author": "Daniel Wirtz <dcode+protobufjs@dcode.io>",
|
|
@@ -59,8 +59,7 @@
|
|
|
59
59
|
"@protobufjs/pool": "^1.1.0",
|
|
60
60
|
"@protobufjs/utf8": "^1.1.0",
|
|
61
61
|
"@types/node": ">=13.7.0",
|
|
62
|
-
"long": "^5.0.0"
|
|
63
|
-
"packument": "^2.0.0"
|
|
62
|
+
"long": "^5.0.0"
|
|
64
63
|
},
|
|
65
64
|
"devDependencies": {
|
|
66
65
|
"benchmark": "^2.1.4",
|
package/src/parse.js
CHANGED
|
@@ -263,6 +263,10 @@ function parse(source, root, options) {
|
|
|
263
263
|
if (!isProto3 && syntax !== "proto2")
|
|
264
264
|
throw illegal(syntax, "syntax");
|
|
265
265
|
|
|
266
|
+
// Syntax is needed to understand the meaning of the optional field rule
|
|
267
|
+
// Otherwise the meaning is ambiguous between proto2 and proto3
|
|
268
|
+
root.setOption("syntax", syntax);
|
|
269
|
+
|
|
266
270
|
skip(";");
|
|
267
271
|
}
|
|
268
272
|
|