protobufjs 7.5.9 → 7.6.0

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.
@@ -1,6 +1,6 @@
1
1
  /*!
2
- * protobuf.js v7.5.9 (c) 2016, daniel wirtz
3
- * compiled sun, 17 may 2026 16:51:59 utc
2
+ * protobuf.js v7.6.0 (c) 2016, daniel wirtz
3
+ * compiled mon, 18 may 2026 18:11:08 utc
4
4
  * licensed under the bsd-3-clause license
5
5
  * see: https://github.com/dcodeio/protobuf.js for details
6
6
  */
@@ -1,6 +1,6 @@
1
1
  /*!
2
- * protobuf.js v7.5.9 (c) 2016, daniel wirtz
3
- * compiled sun, 17 may 2026 16:51:59 utc
2
+ * protobuf.js v7.6.0 (c) 2016, daniel wirtz
3
+ * compiled mon, 18 may 2026 18:11:08 utc
4
4
  * licensed under the bsd-3-clause license
5
5
  * see: https://github.com/dcodeio/protobuf.js for details
6
6
  */
package/dist/protobuf.js CHANGED
@@ -1,6 +1,6 @@
1
1
  /*!
2
- * protobuf.js v7.5.9 (c) 2016, daniel wirtz
3
- * compiled sun, 17 may 2026 16:51:59 utc
2
+ * protobuf.js v7.6.0 (c) 2016, daniel wirtz
3
+ * compiled mon, 18 may 2026 18:11:08 utc
4
4
  * licensed under the bsd-3-clause license
5
5
  * see: https://github.com/dcodeio/protobuf.js for details
6
6
  */
@@ -1744,7 +1744,9 @@ function genValuePartial_toObject(gen, field, fieldIndex, prop) {
1744
1744
  case "sint64":
1745
1745
  case "fixed64":
1746
1746
  case "sfixed64": gen
1747
- ("if(typeof m%s===\"number\")", prop)
1747
+ ("if(typeof BigInt!==\"undefined\"&&o.longs===BigInt)")
1748
+ ("d%s=typeof m%s===\"number\"?BigInt(m%s):util.Long.fromBits(m%s.low>>>0,m%s.high>>>0,%j).toBigInt()", prop, prop, prop, prop, prop, isUnsigned)
1749
+ ("else if(typeof m%s===\"number\")", prop)
1748
1750
  ("d%s=o.longs===String?String(m%s):m%s", prop, prop, prop)
1749
1751
  ("else") // Long-like
1750
1752
  ("d%s=o.longs===String?util.Long.prototype.toString.call(m%s):o.longs===Number?new util.LongBits(m%s.low>>>0,m%s.high>>>0).toNumber(%s):m%s", prop, prop, prop, prop, isUnsigned ? "true": "", prop);
@@ -1812,9 +1814,9 @@ converter.toObject = function toObject(mtype) {
1812
1814
  else if (field.long) gen
1813
1815
  ("if(util.Long){")
1814
1816
  ("var n=new util.Long(%i,%i,%j)", field.typeDefault.low, field.typeDefault.high, field.typeDefault.unsigned)
1815
- ("d%s=o.longs===String?n.toString():o.longs===Number?n.toNumber():n", prop)
1817
+ ("d%s=o.longs===String?n.toString():o.longs===Number?n.toNumber():typeof BigInt!==\"undefined\"&&o.longs===BigInt?n.toBigInt():n", prop)
1816
1818
  ("}else")
1817
- ("d%s=o.longs===String?%j:%i", prop, field.typeDefault.toString(), field.typeDefault.toNumber());
1819
+ ("d%s=o.longs===String?%j:typeof BigInt!==\"undefined\"&&o.longs===BigInt?BigInt(%j):%i", prop, field.typeDefault.toString(), field.typeDefault.toString(), field.typeDefault.toNumber());
1818
1820
  else if (field.bytes) {
1819
1821
  var arrayDefault = Array.prototype.slice.call(field.typeDefault);
1820
1822
  gen
@@ -7813,7 +7815,7 @@ Type.prototype.fromObject = function fromObject(object, depth) {
7813
7815
  * Conversion options as used by {@link Type#toObject} and {@link Message.toObject}.
7814
7816
  * @interface IConversionOptions
7815
7817
  * @property {Function} [longs] Long conversion type.
7816
- * Valid values are `String` and `Number` (the global types).
7818
+ * Valid values are `BigInt`, `String` and `Number` (the global types).
7817
7819
  * Defaults to copy the present value, which is a possibly unsafe number without and a {@link Long} with a long library.
7818
7820
  * @property {Function} [enums] Enum value conversion type.
7819
7821
  * Only valid value is `String` (the global type).