@mapwhit/pbf 1.0.1 → 1.0.3
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 -1
- package/index.js +123 -97
- package/package.json +8 -6
package/README.md
CHANGED
|
@@ -309,7 +309,7 @@ The resulting code is clean and simple, so feel free to customize it.
|
|
|
309
309
|
[npm-url]: https://npmjs.org/package/@mapwhit/pbf
|
|
310
310
|
|
|
311
311
|
[build-url]: https://github.com/mapwhit/pbf/actions/workflows/check.yaml
|
|
312
|
-
[build-image]: https://img.shields.io/github/workflow/status/mapwhit/pbf/check
|
|
312
|
+
[build-image]: https://img.shields.io/github/actions/workflow/status/mapwhit/pbf/check.yaml?branch=main
|
|
313
313
|
|
|
314
314
|
[deps-image]: https://img.shields.io/librariesio/release/npm/@mapwhit/pbf
|
|
315
315
|
[deps-url]: https://libraries.io/npm/@mapwhit%2Fpbf
|
package/index.js
CHANGED
|
@@ -9,10 +9,9 @@ const SHIFT_RIGHT_32 = 1 / SHIFT_LEFT_32;
|
|
|
9
9
|
const TEXT_DECODER_MIN_LENGTH = 12;
|
|
10
10
|
const utf8TextDecoder = typeof TextDecoder === 'undefined' ? null : new TextDecoder('utf-8');
|
|
11
11
|
|
|
12
|
-
|
|
13
12
|
class Pbf {
|
|
14
13
|
constructor(buf) {
|
|
15
|
-
this.buf = ArrayBuffer.isView
|
|
14
|
+
this.buf = ArrayBuffer.isView?.(buf) ? buf : new Uint8Array(buf || 0);
|
|
16
15
|
this.pos = 0;
|
|
17
16
|
this.type = 0;
|
|
18
17
|
this.length = this.buf.length;
|
|
@@ -101,7 +100,8 @@ class Pbf {
|
|
|
101
100
|
return readVarintRemainder(val, isSigned, this);
|
|
102
101
|
}
|
|
103
102
|
|
|
104
|
-
readVarint64() {
|
|
103
|
+
readVarint64() {
|
|
104
|
+
// for compatibility with v2.0.1
|
|
105
105
|
return this.readVarint(true);
|
|
106
106
|
}
|
|
107
107
|
|
|
@@ -202,15 +202,22 @@ class Pbf {
|
|
|
202
202
|
skip(val) {
|
|
203
203
|
const type = val & 0x7;
|
|
204
204
|
switch (type) {
|
|
205
|
-
case Pbf.Varint:
|
|
205
|
+
case Pbf.Varint:
|
|
206
|
+
while (this.buf[this.pos++] > 0x7f) {
|
|
207
|
+
/* skip */
|
|
208
|
+
}
|
|
206
209
|
break;
|
|
207
|
-
case Pbf.Bytes:
|
|
210
|
+
case Pbf.Bytes:
|
|
211
|
+
this.pos = this.readVarint() + this.pos;
|
|
208
212
|
break;
|
|
209
|
-
case Pbf.Fixed32:
|
|
213
|
+
case Pbf.Fixed32:
|
|
214
|
+
this.pos += 4;
|
|
210
215
|
break;
|
|
211
|
-
case Pbf.Fixed64:
|
|
216
|
+
case Pbf.Fixed64:
|
|
217
|
+
this.pos += 8;
|
|
212
218
|
break;
|
|
213
|
-
default:
|
|
219
|
+
default:
|
|
220
|
+
assert(false, `Unimplemented type: ${type}`);
|
|
214
221
|
}
|
|
215
222
|
}
|
|
216
223
|
|
|
@@ -275,7 +282,7 @@ class Pbf {
|
|
|
275
282
|
|
|
276
283
|
this.realloc(4);
|
|
277
284
|
|
|
278
|
-
this.buf[this.pos++] = val & 0x7f | (val > 0x7f ? 0x80 : 0);
|
|
285
|
+
this.buf[this.pos++] = (val & 0x7f) | (val > 0x7f ? 0x80 : 0);
|
|
279
286
|
if (val <= 0x7f) return;
|
|
280
287
|
this.buf[this.pos++] = ((val >>>= 7) & 0x7f) | (val > 0x7f ? 0x80 : 0);
|
|
281
288
|
if (val <= 0x7f) return;
|
|
@@ -351,15 +358,33 @@ class Pbf {
|
|
|
351
358
|
this.writeRawMessage(fn, obj);
|
|
352
359
|
}
|
|
353
360
|
|
|
354
|
-
writePackedVarint(tag, arr) {
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
361
|
+
writePackedVarint(tag, arr) {
|
|
362
|
+
if (arr.length) this.writeMessage(tag, writePackedVarint, arr);
|
|
363
|
+
}
|
|
364
|
+
writePackedSVarint(tag, arr) {
|
|
365
|
+
if (arr.length) this.writeMessage(tag, writePackedSVarint, arr);
|
|
366
|
+
}
|
|
367
|
+
writePackedBoolean(tag, arr) {
|
|
368
|
+
if (arr.length) this.writeMessage(tag, writePackedBoolean, arr);
|
|
369
|
+
}
|
|
370
|
+
writePackedFloat(tag, arr) {
|
|
371
|
+
if (arr.length) this.writeMessage(tag, writePackedFloat, arr);
|
|
372
|
+
}
|
|
373
|
+
writePackedDouble(tag, arr) {
|
|
374
|
+
if (arr.length) this.writeMessage(tag, writePackedDouble, arr);
|
|
375
|
+
}
|
|
376
|
+
writePackedFixed32(tag, arr) {
|
|
377
|
+
if (arr.length) this.writeMessage(tag, writePackedFixed32, arr);
|
|
378
|
+
}
|
|
379
|
+
writePackedSFixed32(tag, arr) {
|
|
380
|
+
if (arr.length) this.writeMessage(tag, writePackedSFixed32, arr);
|
|
381
|
+
}
|
|
382
|
+
writePackedFixed64(tag, arr) {
|
|
383
|
+
if (arr.length) this.writeMessage(tag, writePackedFixed64, arr);
|
|
384
|
+
}
|
|
385
|
+
writePackedSFixed64(tag, arr) {
|
|
386
|
+
if (arr.length) this.writeMessage(tag, writePackedSFixed64, arr);
|
|
387
|
+
}
|
|
363
388
|
|
|
364
389
|
writeBytesField(tag, buffer) {
|
|
365
390
|
this.writeTag(tag, Pbf.Bytes);
|
|
@@ -449,8 +474,7 @@ function readVarintRemainder(l, s, p) {
|
|
|
449
474
|
}
|
|
450
475
|
|
|
451
476
|
function readPackedEnd(pbf) {
|
|
452
|
-
return pbf.type === Pbf.Bytes ?
|
|
453
|
-
pbf.readVarint() + pbf.pos : pbf.pos + 1;
|
|
477
|
+
return pbf.type === Pbf.Bytes ? pbf.readVarint() + pbf.pos : pbf.pos + 1;
|
|
454
478
|
}
|
|
455
479
|
|
|
456
480
|
function toNum(low, high, isSigned) {
|
|
@@ -458,16 +482,13 @@ function toNum(low, high, isSigned) {
|
|
|
458
482
|
return high * 0x100000000 + (low >>> 0);
|
|
459
483
|
}
|
|
460
484
|
|
|
461
|
-
return (
|
|
485
|
+
return (high >>> 0) * 0x100000000 + (low >>> 0);
|
|
462
486
|
}
|
|
463
487
|
|
|
464
488
|
function writeBigVarint(val, pbf) {
|
|
465
489
|
/* global DEBUG */
|
|
466
490
|
if (DEBUG) {
|
|
467
|
-
assert(
|
|
468
|
-
val < 0x10000000000000000 && val >= -0x10000000000000000,
|
|
469
|
-
'Given varint doesn\'t fit into 10 bytes'
|
|
470
|
-
);
|
|
491
|
+
assert(val < 0x10000000000000000 && val >= -0x10000000000000000, "Given varint doesn't fit into 10 bytes");
|
|
471
492
|
}
|
|
472
493
|
|
|
473
494
|
let low;
|
|
@@ -494,14 +515,14 @@ function writeBigVarint(val, pbf) {
|
|
|
494
515
|
writeBigVarintHigh(high, pbf);
|
|
495
516
|
}
|
|
496
517
|
|
|
497
|
-
function writeBigVarintLow(low,
|
|
498
|
-
pbf.buf[pbf.pos++] = low & 0x7f | 0x80;
|
|
518
|
+
function writeBigVarintLow(low, _high, pbf) {
|
|
519
|
+
pbf.buf[pbf.pos++] = (low & 0x7f) | 0x80;
|
|
499
520
|
low >>>= 7;
|
|
500
|
-
pbf.buf[pbf.pos++] = low & 0x7f | 0x80;
|
|
521
|
+
pbf.buf[pbf.pos++] = (low & 0x7f) | 0x80;
|
|
501
522
|
low >>>= 7;
|
|
502
|
-
pbf.buf[pbf.pos++] = low & 0x7f | 0x80;
|
|
523
|
+
pbf.buf[pbf.pos++] = (low & 0x7f) | 0x80;
|
|
503
524
|
low >>>= 7;
|
|
504
|
-
pbf.buf[pbf.pos++] = low & 0x7f | 0x80;
|
|
525
|
+
pbf.buf[pbf.pos++] = (low & 0x7f) | 0x80;
|
|
505
526
|
low >>>= 7;
|
|
506
527
|
pbf.buf[pbf.pos] = low & 0x7f;
|
|
507
528
|
}
|
|
@@ -509,69 +530,79 @@ function writeBigVarintLow(low, high, pbf) {
|
|
|
509
530
|
function writeBigVarintHigh(high, pbf) {
|
|
510
531
|
const lsb = (high & 0x07) << 4;
|
|
511
532
|
|
|
512
|
-
pbf.buf[pbf.pos++] |= lsb | ((
|
|
533
|
+
pbf.buf[pbf.pos++] |= lsb | ((high >>>= 3) ? 0x80 : 0);
|
|
513
534
|
if (!high) return;
|
|
514
|
-
pbf.buf[pbf.pos++] = high & 0x7f | ((
|
|
535
|
+
pbf.buf[pbf.pos++] = (high & 0x7f) | ((high >>>= 7) ? 0x80 : 0);
|
|
515
536
|
if (!high) return;
|
|
516
|
-
pbf.buf[pbf.pos++] = high & 0x7f | ((
|
|
537
|
+
pbf.buf[pbf.pos++] = (high & 0x7f) | ((high >>>= 7) ? 0x80 : 0);
|
|
517
538
|
if (!high) return;
|
|
518
|
-
pbf.buf[pbf.pos++] = high & 0x7f | ((
|
|
539
|
+
pbf.buf[pbf.pos++] = (high & 0x7f) | ((high >>>= 7) ? 0x80 : 0);
|
|
519
540
|
if (!high) return;
|
|
520
|
-
pbf.buf[pbf.pos++] = high & 0x7f | ((
|
|
541
|
+
pbf.buf[pbf.pos++] = (high & 0x7f) | ((high >>>= 7) ? 0x80 : 0);
|
|
521
542
|
if (!high) return;
|
|
522
543
|
pbf.buf[pbf.pos++] = high & 0x7f;
|
|
523
544
|
}
|
|
524
545
|
|
|
525
546
|
function makeRoomForExtraLength(startPos, len, pbf) {
|
|
526
547
|
const extraLen =
|
|
527
|
-
len <= 0x3fff ? 1 :
|
|
528
|
-
len <= 0x1fffff ? 2 :
|
|
529
|
-
len <= 0xfffffff ? 3 : Math.floor(Math.log(len) / (Math.LN2 * 7));
|
|
548
|
+
len <= 0x3fff ? 1 : len <= 0x1fffff ? 2 : len <= 0xfffffff ? 3 : Math.floor(Math.log(len) / (Math.LN2 * 7));
|
|
530
549
|
|
|
531
550
|
// if 1 byte isn't enough for encoding message length, shift the data to the right
|
|
532
551
|
pbf.realloc(extraLen);
|
|
533
552
|
for (let i = pbf.pos - 1; i >= startPos; i--) pbf.buf[i + extraLen] = pbf.buf[i];
|
|
534
553
|
}
|
|
535
554
|
|
|
536
|
-
function writePackedVarint(arr, pbf) {
|
|
555
|
+
function writePackedVarint(arr, pbf) {
|
|
556
|
+
for (let i = 0; i < arr.length; i++) pbf.writeVarint(arr[i]);
|
|
557
|
+
}
|
|
537
558
|
|
|
538
|
-
function writePackedSVarint(arr, pbf) {
|
|
559
|
+
function writePackedSVarint(arr, pbf) {
|
|
560
|
+
for (let i = 0; i < arr.length; i++) pbf.writeSVarint(arr[i]);
|
|
561
|
+
}
|
|
539
562
|
|
|
540
|
-
function writePackedFloat(arr, pbf) {
|
|
563
|
+
function writePackedFloat(arr, pbf) {
|
|
564
|
+
for (let i = 0; i < arr.length; i++) pbf.writeFloat(arr[i]);
|
|
565
|
+
}
|
|
541
566
|
|
|
542
|
-
function writePackedDouble(arr, pbf) {
|
|
567
|
+
function writePackedDouble(arr, pbf) {
|
|
568
|
+
for (let i = 0; i < arr.length; i++) pbf.writeDouble(arr[i]);
|
|
569
|
+
}
|
|
543
570
|
|
|
544
|
-
function writePackedBoolean(arr, pbf) {
|
|
571
|
+
function writePackedBoolean(arr, pbf) {
|
|
572
|
+
for (let i = 0; i < arr.length; i++) pbf.writeBoolean(arr[i]);
|
|
573
|
+
}
|
|
545
574
|
|
|
546
|
-
function writePackedFixed32(arr, pbf) {
|
|
575
|
+
function writePackedFixed32(arr, pbf) {
|
|
576
|
+
for (let i = 0; i < arr.length; i++) pbf.writeFixed32(arr[i]);
|
|
577
|
+
}
|
|
547
578
|
|
|
548
|
-
function writePackedSFixed32(arr, pbf) {
|
|
579
|
+
function writePackedSFixed32(arr, pbf) {
|
|
580
|
+
for (let i = 0; i < arr.length; i++) pbf.writeSFixed32(arr[i]);
|
|
581
|
+
}
|
|
549
582
|
|
|
550
|
-
function writePackedFixed64(arr, pbf) {
|
|
583
|
+
function writePackedFixed64(arr, pbf) {
|
|
584
|
+
for (let i = 0; i < arr.length; i++) pbf.writeFixed64(arr[i]);
|
|
585
|
+
}
|
|
551
586
|
|
|
552
|
-
function writePackedSFixed64(arr, pbf) {
|
|
587
|
+
function writePackedSFixed64(arr, pbf) {
|
|
588
|
+
for (let i = 0; i < arr.length; i++) pbf.writeSFixed64(arr[i]);
|
|
589
|
+
}
|
|
553
590
|
|
|
554
591
|
// Buffer code below from https://github.com/feross/buffer, MIT-licensed
|
|
555
592
|
|
|
556
593
|
function readUInt32(buf, pos) {
|
|
557
|
-
return ((buf[pos]) |
|
|
558
|
-
(buf[pos + 1] << 8) |
|
|
559
|
-
(buf[pos + 2] << 16)) +
|
|
560
|
-
(buf[pos + 3] * 0x1000000);
|
|
594
|
+
return (buf[pos] | (buf[pos + 1] << 8) | (buf[pos + 2] << 16)) + buf[pos + 3] * 0x1000000;
|
|
561
595
|
}
|
|
562
596
|
|
|
563
597
|
function writeInt32(buf, val, pos) {
|
|
564
598
|
buf[pos] = val;
|
|
565
|
-
buf[pos + 1] =
|
|
566
|
-
buf[pos + 2] =
|
|
567
|
-
buf[pos + 3] =
|
|
599
|
+
buf[pos + 1] = val >>> 8;
|
|
600
|
+
buf[pos + 2] = val >>> 16;
|
|
601
|
+
buf[pos + 3] = val >>> 24;
|
|
568
602
|
}
|
|
569
603
|
|
|
570
604
|
function readInt32(buf, pos) {
|
|
571
|
-
return ((buf[pos]) |
|
|
572
|
-
(buf[pos + 1] << 8) |
|
|
573
|
-
(buf[pos + 2] << 16)) +
|
|
574
|
-
(buf[pos + 3] << 24);
|
|
605
|
+
return (buf[pos] | (buf[pos + 1] << 8) | (buf[pos + 2] << 16)) + (buf[pos + 3] << 24);
|
|
575
606
|
}
|
|
576
607
|
|
|
577
608
|
function readUtf8(buf, pos, end) {
|
|
@@ -581,10 +612,7 @@ function readUtf8(buf, pos, end) {
|
|
|
581
612
|
while (i < end) {
|
|
582
613
|
const b0 = buf[i];
|
|
583
614
|
let c = null; // codepoint
|
|
584
|
-
let bytesPerSequence =
|
|
585
|
-
b0 > 0xEF ? 4 :
|
|
586
|
-
b0 > 0xDF ? 3 :
|
|
587
|
-
b0 > 0xBF ? 2 : 1;
|
|
615
|
+
let bytesPerSequence = b0 > 0xef ? 4 : b0 > 0xdf ? 3 : b0 > 0xbf ? 2 : 1;
|
|
588
616
|
|
|
589
617
|
if (i + bytesPerSequence > end) break;
|
|
590
618
|
|
|
@@ -598,18 +626,18 @@ function readUtf8(buf, pos, end) {
|
|
|
598
626
|
}
|
|
599
627
|
} else if (bytesPerSequence === 2) {
|
|
600
628
|
b1 = buf[i + 1];
|
|
601
|
-
if ((b1 &
|
|
602
|
-
c = (b0 &
|
|
603
|
-
if (c <=
|
|
629
|
+
if ((b1 & 0xc0) === 0x80) {
|
|
630
|
+
c = ((b0 & 0x1f) << 0x6) | (b1 & 0x3f);
|
|
631
|
+
if (c <= 0x7f) {
|
|
604
632
|
c = null;
|
|
605
633
|
}
|
|
606
634
|
}
|
|
607
635
|
} else if (bytesPerSequence === 3) {
|
|
608
636
|
b1 = buf[i + 1];
|
|
609
637
|
b2 = buf[i + 2];
|
|
610
|
-
if ((b1 &
|
|
611
|
-
c = (b0 &
|
|
612
|
-
if (c <=
|
|
638
|
+
if ((b1 & 0xc0) === 0x80 && (b2 & 0xc0) === 0x80) {
|
|
639
|
+
c = ((b0 & 0xf) << 0xc) | ((b1 & 0x3f) << 0x6) | (b2 & 0x3f);
|
|
640
|
+
if (c <= 0x7ff || (c >= 0xd800 && c <= 0xdfff)) {
|
|
613
641
|
c = null;
|
|
614
642
|
}
|
|
615
643
|
}
|
|
@@ -617,22 +645,21 @@ function readUtf8(buf, pos, end) {
|
|
|
617
645
|
b1 = buf[i + 1];
|
|
618
646
|
b2 = buf[i + 2];
|
|
619
647
|
b3 = buf[i + 3];
|
|
620
|
-
if ((b1 &
|
|
621
|
-
c = (b0 &
|
|
622
|
-
if (c <=
|
|
648
|
+
if ((b1 & 0xc0) === 0x80 && (b2 & 0xc0) === 0x80 && (b3 & 0xc0) === 0x80) {
|
|
649
|
+
c = ((b0 & 0xf) << 0x12) | ((b1 & 0x3f) << 0xc) | ((b2 & 0x3f) << 0x6) | (b3 & 0x3f);
|
|
650
|
+
if (c <= 0xffff || c >= 0x110000) {
|
|
623
651
|
c = null;
|
|
624
652
|
}
|
|
625
653
|
}
|
|
626
654
|
}
|
|
627
655
|
|
|
628
656
|
if (c === null) {
|
|
629
|
-
c =
|
|
657
|
+
c = 0xfffd;
|
|
630
658
|
bytesPerSequence = 1;
|
|
631
|
-
|
|
632
|
-
} else if (c > 0xFFFF) {
|
|
659
|
+
} else if (c > 0xffff) {
|
|
633
660
|
c -= 0x10000;
|
|
634
|
-
str += String.fromCharCode(c >>> 10 &
|
|
635
|
-
c =
|
|
661
|
+
str += String.fromCharCode(((c >>> 10) & 0x3ff) | 0xd800);
|
|
662
|
+
c = 0xdc00 | (c & 0x3ff);
|
|
636
663
|
}
|
|
637
664
|
|
|
638
665
|
str += String.fromCharCode(c);
|
|
@@ -650,32 +677,31 @@ function writeUtf8(buf, str, pos) {
|
|
|
650
677
|
for (let i = 0, c, lead; i < str.length; i++) {
|
|
651
678
|
c = str.charCodeAt(i); // code point
|
|
652
679
|
|
|
653
|
-
if (c >
|
|
680
|
+
if (c > 0xd7ff && c < 0xe000) {
|
|
654
681
|
if (lead) {
|
|
655
|
-
if (c <
|
|
656
|
-
buf[pos++] =
|
|
657
|
-
buf[pos++] =
|
|
658
|
-
buf[pos++] =
|
|
682
|
+
if (c < 0xdc00) {
|
|
683
|
+
buf[pos++] = 0xef;
|
|
684
|
+
buf[pos++] = 0xbf;
|
|
685
|
+
buf[pos++] = 0xbd;
|
|
659
686
|
lead = c;
|
|
660
687
|
continue;
|
|
661
|
-
} else {
|
|
662
|
-
c = lead - 0xD800 << 10 | c - 0xDC00 | 0x10000;
|
|
663
|
-
lead = null;
|
|
664
688
|
}
|
|
689
|
+
c = ((lead - 0xd800) << 10) | (c - 0xdc00) | 0x10000;
|
|
690
|
+
lead = null;
|
|
665
691
|
} else {
|
|
666
|
-
if (c >
|
|
667
|
-
buf[pos++] =
|
|
668
|
-
buf[pos++] =
|
|
669
|
-
buf[pos++] =
|
|
692
|
+
if (c > 0xdbff || i + 1 === str.length) {
|
|
693
|
+
buf[pos++] = 0xef;
|
|
694
|
+
buf[pos++] = 0xbf;
|
|
695
|
+
buf[pos++] = 0xbd;
|
|
670
696
|
} else {
|
|
671
697
|
lead = c;
|
|
672
698
|
}
|
|
673
699
|
continue;
|
|
674
700
|
}
|
|
675
701
|
} else if (lead) {
|
|
676
|
-
buf[pos++] =
|
|
677
|
-
buf[pos++] =
|
|
678
|
-
buf[pos++] =
|
|
702
|
+
buf[pos++] = 0xef;
|
|
703
|
+
buf[pos++] = 0xbf;
|
|
704
|
+
buf[pos++] = 0xbd;
|
|
679
705
|
lead = null;
|
|
680
706
|
}
|
|
681
707
|
|
|
@@ -683,17 +709,17 @@ function writeUtf8(buf, str, pos) {
|
|
|
683
709
|
buf[pos++] = c;
|
|
684
710
|
} else {
|
|
685
711
|
if (c < 0x800) {
|
|
686
|
-
buf[pos++] = c >> 0x6 |
|
|
712
|
+
buf[pos++] = (c >> 0x6) | 0xc0;
|
|
687
713
|
} else {
|
|
688
714
|
if (c < 0x10000) {
|
|
689
|
-
buf[pos++] = c >>
|
|
715
|
+
buf[pos++] = (c >> 0xc) | 0xe0;
|
|
690
716
|
} else {
|
|
691
|
-
buf[pos++] = c >> 0x12 |
|
|
692
|
-
buf[pos++] = c >>
|
|
717
|
+
buf[pos++] = (c >> 0x12) | 0xf0;
|
|
718
|
+
buf[pos++] = ((c >> 0xc) & 0x3f) | 0x80;
|
|
693
719
|
}
|
|
694
|
-
buf[pos++] = c >> 0x6 &
|
|
720
|
+
buf[pos++] = ((c >> 0x6) & 0x3f) | 0x80;
|
|
695
721
|
}
|
|
696
|
-
buf[pos++] = c &
|
|
722
|
+
buf[pos++] = (c & 0x3f) | 0x80;
|
|
697
723
|
}
|
|
698
724
|
}
|
|
699
725
|
return pos;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mapwhit/pbf",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.3",
|
|
4
4
|
"description": "a low-level, lightweight protocol buffers implementation in JavaScript",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -9,7 +9,10 @@
|
|
|
9
9
|
"files": [
|
|
10
10
|
"index.js"
|
|
11
11
|
],
|
|
12
|
-
"repository":
|
|
12
|
+
"repository": {
|
|
13
|
+
"type": "git",
|
|
14
|
+
"url": "git+https://github.com/mapwhit/pbf.git"
|
|
15
|
+
},
|
|
13
16
|
"keywords": [
|
|
14
17
|
"protocol",
|
|
15
18
|
"buffer",
|
|
@@ -32,14 +35,13 @@
|
|
|
32
35
|
"ieee754": "^1.1.12"
|
|
33
36
|
},
|
|
34
37
|
"devDependencies": {
|
|
38
|
+
"@biomejs/biome": "2.0.5",
|
|
35
39
|
"benchmark": "^2.1.4",
|
|
36
|
-
"
|
|
37
|
-
"protobufjs": "~6",
|
|
40
|
+
"protobufjs": "~7",
|
|
38
41
|
"protocol-buffers": "~5",
|
|
39
|
-
"tap": "~16",
|
|
40
42
|
"tile-stats-runner": "^1.0.0"
|
|
41
43
|
},
|
|
42
44
|
"browser": {
|
|
43
45
|
"assert": "@pirxpilot/nanoassert"
|
|
44
46
|
}
|
|
45
|
-
}
|
|
47
|
+
}
|