protobufjs 6.11.3 → 6.11.5

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 v6.11.0 (c) 2016, daniel wirtz
3
- * compiled thu, 29 apr 2021 02:20:44 utc
2
+ * protobuf.js v6.11.5 (c) 2016, daniel wirtz
3
+ * compiled tue, 14 apr 2026 07:11:28 utc
4
4
  * licensed under the bsd-3-clause license
5
5
  * see: https://github.com/dcodeio/protobuf.js for details
6
6
  */
@@ -2300,13 +2300,13 @@ function Field(name, id, type, rule, extend, options, comment) {
2300
2300
  if (extend !== undefined && !util.isString(extend))
2301
2301
  throw TypeError("extend must be a string");
2302
2302
 
2303
+ if (rule === "proto3_optional") {
2304
+ rule = "optional";
2305
+ }
2303
2306
  /**
2304
2307
  * Field rule, if any.
2305
2308
  * @type {string|undefined}
2306
2309
  */
2307
- if (rule === "proto3_optional") {
2308
- rule = "optional";
2309
- }
2310
2310
  this.rule = rule && rule !== "optional" ? rule : undefined; // toJSON
2311
2311
 
2312
2312
  /**
@@ -3192,6 +3192,7 @@ var ReflectionObject = require(24);
3192
3192
  ((Namespace.prototype = Object.create(ReflectionObject.prototype)).constructor = Namespace).className = "Namespace";
3193
3193
 
3194
3194
  var Field = require(16),
3195
+ OneOf = require(25),
3195
3196
  util = require(37);
3196
3197
 
3197
3198
  var Type, // cyclic
@@ -3403,7 +3404,7 @@ Namespace.prototype.getEnum = function getEnum(name) {
3403
3404
  */
3404
3405
  Namespace.prototype.add = function add(object) {
3405
3406
 
3406
- if (!(object instanceof Field && object.extend !== undefined || object instanceof Type || object instanceof Enum || object instanceof Service || object instanceof Namespace))
3407
+ if (!(object instanceof Field && object.extend !== undefined || object instanceof Type || object instanceof Enum || object instanceof Service || object instanceof Namespace || object instanceof OneOf))
3407
3408
  throw TypeError("object must be a valid nested object");
3408
3409
 
3409
3410
  if (!this.nested)
@@ -3618,7 +3619,7 @@ Namespace._configure = function(Type_, Service_, Enum_) {
3618
3619
  Enum = Enum_;
3619
3620
  };
3620
3621
 
3621
- },{"16":16,"24":24,"37":37}],24:[function(require,module,exports){
3622
+ },{"16":16,"24":24,"25":25,"37":37}],24:[function(require,module,exports){
3622
3623
  "use strict";
3623
3624
  module.exports = ReflectionObject;
3624
3625
 
@@ -7465,6 +7466,9 @@ util.decorateEnum = function decorateEnum(object) {
7465
7466
  util.setProperty = function setProperty(dst, path, value) {
7466
7467
  function setProp(dst, path, value) {
7467
7468
  var part = path.shift();
7469
+ if (part === "__proto__" || part === "prototype") {
7470
+ return dst;
7471
+ }
7468
7472
  if (path.length > 0) {
7469
7473
  dst[part] = setProp(dst[part] || {}, path, value);
7470
7474
  } else {