protobufjs 7.2.1 → 7.2.2

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/dist/protobuf.js CHANGED
@@ -1,6 +1,6 @@
1
1
  /*!
2
- * protobuf.js v7.2.1 (c) 2016, daniel wirtz
3
- * compiled thu, 02 feb 2023 21:27:33 utc
2
+ * protobuf.js v7.1.0 (c) 2016, daniel wirtz
3
+ * compiled fri, 09 sep 2022 03:02:57 utc
4
4
  * licensed under the bsd-3-clause license
5
5
  * see: https://github.com/dcodeio/protobuf.js for details
6
6
  */
@@ -1530,20 +1530,18 @@ var Enum = require(15),
1530
1530
  * @ignore
1531
1531
  */
1532
1532
  function genValuePartial_fromObject(gen, field, fieldIndex, prop) {
1533
- var defaultAlreadyEmitted = false;
1534
1533
  /* eslint-disable no-unexpected-multiline, block-scoped-var, no-redeclare */
1535
1534
  if (field.resolvedType) {
1536
1535
  if (field.resolvedType instanceof Enum) { gen
1537
1536
  ("switch(d%s){", prop);
1538
1537
  for (var values = field.resolvedType.values, keys = Object.keys(values), i = 0; i < keys.length; ++i) {
1539
1538
  // enum unknown values passthrough
1540
- if (values[keys[i]] === field.typeDefault && !defaultAlreadyEmitted) { gen
1539
+ if (values[keys[i]] === field.typeDefault) { gen
1541
1540
  ("default:")
1542
1541
  ("if(typeof(d%s)===\"number\"){m%s=d%s;break}", prop, prop, prop);
1543
1542
  if (!field.repeated) gen // fallback to default value only for
1544
1543
  // arrays, to avoid leaving holes.
1545
1544
  ("break"); // for non-repeated fields, just ignore
1546
- defaultAlreadyEmitted = true;
1547
1545
  }
1548
1546
  gen
1549
1547
  ("case%j:", keys[i])
@@ -3358,8 +3356,9 @@ Object.defineProperty(Namespace.prototype, "nestedArray", {
3358
3356
  /**
3359
3357
  * Any nested object descriptor.
3360
3358
  * @typedef AnyNestedObject
3361
- * @type {IEnum|IType|IService|AnyExtensionField|INamespace|IOneOf}
3359
+ * @type {IEnum|IType|IService|AnyExtensionField|INamespace}
3362
3360
  */
3361
+ // ^ BEWARE: VSCode hangs forever when using more than 5 types (that's why AnyExtensionField exists in the first place)
3363
3362
 
3364
3363
  /**
3365
3364
  * Converts this namespace to a namespace descriptor.
@@ -5572,7 +5571,6 @@ Root.prototype.load = function load(filename, options, callback) {
5572
5571
 
5573
5572
  // Fetches a single file
5574
5573
  function fetch(filename, weak) {
5575
- filename = getBundledFileName(filename) || filename;
5576
5574
 
5577
5575
  // Skip if already loaded / attempted
5578
5576
  if (self.files.indexOf(filename) > -1)
@@ -8077,7 +8075,7 @@ function newError(name) {
8077
8075
  configurable: true,
8078
8076
  },
8079
8077
  name: {
8080
- get: function get() { return name; },
8078
+ get() { return name; },
8081
8079
  set: undefined,
8082
8080
  enumerable: false,
8083
8081
  // configurable: false would accurately preserve the behavior of
@@ -8087,7 +8085,7 @@ function newError(name) {
8087
8085
  configurable: true,
8088
8086
  },
8089
8087
  toString: {
8090
- value: function value() { return this.name + ": " + this.message; },
8088
+ value() { return this.name + ": " + this.message; },
8091
8089
  writable: true,
8092
8090
  enumerable: false,
8093
8091
  configurable: true,