protobufjs 8.3.0 → 8.4.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.
- package/README.md +1 -0
- package/dist/light/protobuf.js +9 -7
- package/dist/light/protobuf.js.map +1 -1
- package/dist/light/protobuf.min.js +3 -3
- package/dist/light/protobuf.min.js.map +1 -1
- package/dist/minimal/protobuf.js +3 -3
- package/dist/minimal/protobuf.js.map +1 -1
- package/dist/minimal/protobuf.min.js +2 -2
- package/dist/minimal/protobuf.min.js.map +1 -1
- package/dist/protobuf.js +9 -7
- package/dist/protobuf.js.map +1 -1
- package/dist/protobuf.min.js +3 -3
- package/dist/protobuf.min.js.map +1 -1
- package/index.d.ts +1 -1
- package/package.json +2 -2
- package/src/converter.js +5 -3
- package/src/type.js +1 -1
- package/src/util/pool.js +1 -1
package/dist/protobuf.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* protobuf.js v8.
|
|
3
|
-
* compiled
|
|
2
|
+
* protobuf.js v8.4.0 (c) 2016, daniel wirtz
|
|
3
|
+
* compiled mon, 18 may 2026 17:55:10 utc
|
|
4
4
|
* licensed under the bsd-3-clause license
|
|
5
5
|
* see: https://github.com/dcodeio/protobuf.js for details
|
|
6
6
|
*/
|
|
@@ -652,7 +652,9 @@ function genValuePartial_toObject(gen, field, fieldIndex, dstProp, srcProp) {
|
|
|
652
652
|
case "sint64":
|
|
653
653
|
case "fixed64":
|
|
654
654
|
case "sfixed64": gen
|
|
655
|
-
("if(typeof
|
|
655
|
+
("if(typeof BigInt!==\"undefined\"&&o.longs===BigInt)")
|
|
656
|
+
("d%s=typeof m%s===\"number\"?BigInt(m%s):util.Long.fromBits(m%s.low>>>0,m%s.high>>>0,%j).toBigInt()", dstProp, srcProp, srcProp, srcProp, srcProp, isUnsigned)
|
|
657
|
+
("else if(typeof m%s===\"number\")", srcProp)
|
|
656
658
|
("d%s=o.longs===String?String(m%s):m%s", dstProp, srcProp, srcProp)
|
|
657
659
|
("else") // Long-like
|
|
658
660
|
("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", dstProp, srcProp, srcProp, srcProp, isUnsigned ? "true": "", srcProp);
|
|
@@ -720,9 +722,9 @@ converter.toObject = function toObject(mtype) {
|
|
|
720
722
|
else if (field.long) gen
|
|
721
723
|
("if(util.Long){")
|
|
722
724
|
("var n=new util.Long(%i,%i,%j)", field.typeDefault.low, field.typeDefault.high, field.typeDefault.unsigned)
|
|
723
|
-
("d%s=o.longs===String?n.toString():o.longs===Number?n.toNumber():n", prop)
|
|
725
|
+
("d%s=o.longs===String?n.toString():o.longs===Number?n.toNumber():typeof BigInt!==\"undefined\"&&o.longs===BigInt?n.toBigInt():n", prop)
|
|
724
726
|
("}else")
|
|
725
|
-
("d%s=o.longs===String?%j:%i", prop, field.typeDefault.toString(), field.typeDefault.toNumber());
|
|
727
|
+
("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());
|
|
726
728
|
else if (field.bytes) {
|
|
727
729
|
var arrayDefault = Array.prototype.slice.call(field.typeDefault);
|
|
728
730
|
gen
|
|
@@ -7042,7 +7044,7 @@ Type.prototype.fromObject = function fromObject(object) { // eslint-disable-line
|
|
|
7042
7044
|
* Conversion options as used by {@link Type#toObject} and {@link Message.toObject}.
|
|
7043
7045
|
* @interface IConversionOptions
|
|
7044
7046
|
* @property {Function} [longs] Long conversion type.
|
|
7045
|
-
* Valid values are `String` and `Number` (the global types).
|
|
7047
|
+
* Valid values are `BigInt`, `String` and `Number` (the global types).
|
|
7046
7048
|
* Defaults to copy the present value, which is a possibly unsafe number without and a {@link Long} with a long library.
|
|
7047
7049
|
* @property {Function} [enums] Enum value conversion type.
|
|
7048
7050
|
* Only valid value is `String` (the global type).
|
|
@@ -9236,7 +9238,7 @@ module.exports = pool;
|
|
|
9236
9238
|
* @param {number} start Start offset
|
|
9237
9239
|
* @param {number} end End offset
|
|
9238
9240
|
* @returns {Uint8Array} Buffer slice
|
|
9239
|
-
* @this
|
|
9241
|
+
* @this Uint8Array
|
|
9240
9242
|
*/
|
|
9241
9243
|
|
|
9242
9244
|
/**
|