protobufjs 8.6.5 → 8.6.6

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "protobufjs",
3
- "version": "8.6.5",
3
+ "version": "8.6.6",
4
4
  "description": "Protocol Buffers for JavaScript & TypeScript.",
5
5
  "author": "Daniel Wirtz <dcode+protobufjs@dcode.io>",
6
6
  "license": "BSD-3-Clause",
package/src/parse.js CHANGED
@@ -745,6 +745,9 @@ function parse(source, root, options) {
745
745
  }
746
746
 
747
747
  while (token !== "=") {
748
+ if (token === null) {
749
+ throw illegal(token, "end of input");
750
+ }
748
751
  if (token === "(") {
749
752
  var parensValue = next();
750
753
  skip(")");
package/src/wrappers.js CHANGED
@@ -45,7 +45,7 @@ wrappers[".google.protobuf.Any"] = {
45
45
  if (object && object["@type"]) {
46
46
  // Only use fully qualified type name after the last '/'
47
47
  var name = object["@type"].substring(object["@type"].lastIndexOf("/") + 1);
48
- var type = this.lookup(name);
48
+ var type = this.lookup(name, [ this.constructor ]);
49
49
  /* istanbul ignore else */
50
50
  if (type) {
51
51
  // type_url does not accept leading "."
@@ -81,7 +81,7 @@ wrappers[".google.protobuf.Any"] = {
81
81
  name = message.type_url.substring(message.type_url.lastIndexOf("/") + 1);
82
82
  // Separate the prefix used
83
83
  prefix = message.type_url.substring(0, message.type_url.lastIndexOf("/") + 1);
84
- var type = this.lookup(name);
84
+ var type = this.lookup(name, [ this.constructor ]);
85
85
  /* istanbul ignore else */
86
86
  if (type)
87
87
  message = type.decode(message.value, undefined, undefined, depth + 1);