cborg 1.9.1 → 1.9.4
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/cjs/browser-test/node-test-bin.js +0 -1
- package/cjs/browser-test/noop-bin-test.js +4 -0
- package/cjs/lib/diagnostic.js +4 -1
- package/cjs/node-test/node-test-bin.js +0 -1
- package/cjs/node-test/noop-bin-test.js +4 -0
- package/esm/browser-test/node-test-bin.js +0 -1
- package/esm/browser-test/noop-bin-test.js +1 -0
- package/esm/lib/diagnostic.js +4 -1
- package/esm/node-test/node-test-bin.js +0 -1
- package/esm/node-test/noop-bin-test.js +1 -0
- package/lib/diagnostic.js +1 -1
- package/package.json +4 -4
- package/test/node-test-bin.js +0 -2
- package/test/noop-bin-test.js +3 -0
- package/types/lib/bin.d.ts +1 -1
- package/types/lib/jump.d.ts +1 -1
- package/types/lib/jump.d.ts.map +1 -1
|
@@ -6,7 +6,6 @@ var process = require('process');
|
|
|
6
6
|
var path = require('path');
|
|
7
7
|
var os = require('os');
|
|
8
8
|
var url = require('url');
|
|
9
|
-
require('../lib/bin.js');
|
|
10
9
|
|
|
11
10
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
12
11
|
|
package/cjs/lib/diagnostic.js
CHANGED
|
@@ -9,7 +9,10 @@ var _0uint = require('./0uint.js');
|
|
|
9
9
|
const utf8Encoder = new TextEncoder();
|
|
10
10
|
const utf8Decoder = new TextDecoder();
|
|
11
11
|
function* tokensToDiagnostic(inp, width = 100) {
|
|
12
|
-
const tokeniser = new decode.Tokeniser(inp, {
|
|
12
|
+
const tokeniser = new decode.Tokeniser(inp, {
|
|
13
|
+
retainStringBytes: true,
|
|
14
|
+
allowBigInt: true
|
|
15
|
+
});
|
|
13
16
|
let pos = 0;
|
|
14
17
|
const indent = [];
|
|
15
18
|
const slc = (start, length) => {
|
|
@@ -6,7 +6,6 @@ var process = require('process');
|
|
|
6
6
|
var path = require('path');
|
|
7
7
|
var os = require('os');
|
|
8
8
|
var url = require('url');
|
|
9
|
-
require('../lib/bin.js');
|
|
10
9
|
|
|
11
10
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
12
11
|
|
|
@@ -4,7 +4,6 @@ import process from 'process';
|
|
|
4
4
|
import path from 'path';
|
|
5
5
|
import { platform } from 'os';
|
|
6
6
|
import { fileURLToPath } from 'url';
|
|
7
|
-
import bin from '../lib/bin.js';
|
|
8
7
|
const {assert} = chai;
|
|
9
8
|
const fixture1JsonString = '{"a":1,"b":[2,3],"smile":"\uD83D\uDE00"}';
|
|
10
9
|
const fixture1JsonPrettyString = `{
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import bin from '../lib/bin.js';
|
package/esm/lib/diagnostic.js
CHANGED
|
@@ -7,7 +7,10 @@ import { uintBoundaries } from './0uint.js';
|
|
|
7
7
|
const utf8Encoder = new TextEncoder();
|
|
8
8
|
const utf8Decoder = new TextDecoder();
|
|
9
9
|
function* tokensToDiagnostic(inp, width = 100) {
|
|
10
|
-
const tokeniser = new Tokeniser(inp, {
|
|
10
|
+
const tokeniser = new Tokeniser(inp, {
|
|
11
|
+
retainStringBytes: true,
|
|
12
|
+
allowBigInt: true
|
|
13
|
+
});
|
|
11
14
|
let pos = 0;
|
|
12
15
|
const indent = [];
|
|
13
16
|
const slc = (start, length) => {
|
|
@@ -4,7 +4,6 @@ import process from 'process';
|
|
|
4
4
|
import path from 'path';
|
|
5
5
|
import { platform } from 'os';
|
|
6
6
|
import { fileURLToPath } from 'url';
|
|
7
|
-
import bin from '../lib/bin.js';
|
|
8
7
|
const {assert} = chai;
|
|
9
8
|
const fixture1JsonString = '{"a":1,"b":[2,3],"smile":"\uD83D\uDE00"}';
|
|
10
9
|
const fixture1JsonPrettyString = `{
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import bin from '../lib/bin.js';
|
package/lib/diagnostic.js
CHANGED
|
@@ -10,7 +10,7 @@ const utf8Decoder = new TextDecoder()
|
|
|
10
10
|
* @param {number} [width]
|
|
11
11
|
*/
|
|
12
12
|
function * tokensToDiagnostic (inp, width = 100) {
|
|
13
|
-
const tokeniser = new Tokeniser(inp, { retainStringBytes: true })
|
|
13
|
+
const tokeniser = new Tokeniser(inp, { retainStringBytes: true, allowBigInt: true })
|
|
14
14
|
let pos = 0
|
|
15
15
|
const indent = []
|
|
16
16
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "cborg",
|
|
3
|
-
"version": "1.9.
|
|
3
|
+
"version": "1.9.4",
|
|
4
4
|
"description": "Fast CBOR with a focus on strictness",
|
|
5
5
|
"main": "./cjs/cborg.js",
|
|
6
6
|
"bin": {
|
|
@@ -36,10 +36,10 @@
|
|
|
36
36
|
"chai": "^4.3.4",
|
|
37
37
|
"ipjs": "^5.2.0",
|
|
38
38
|
"ipld-garbage": "^4.0.10",
|
|
39
|
-
"mocha": "^
|
|
40
|
-
"polendina": "~
|
|
39
|
+
"mocha": "^10.0.0",
|
|
40
|
+
"polendina": "~3.1.0",
|
|
41
41
|
"standard": "^17.0.0",
|
|
42
|
-
"typescript": "~4.
|
|
42
|
+
"typescript": "~4.7.2"
|
|
43
43
|
},
|
|
44
44
|
"exports": {
|
|
45
45
|
".": {
|
package/test/node-test-bin.js
CHANGED
package/types/lib/bin.d.ts
CHANGED
package/types/lib/jump.d.ts
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
*/
|
|
5
5
|
export function quickEncodeToken(token: Token): Uint8Array | undefined;
|
|
6
6
|
/** @type {((data:Uint8Array, pos:number, minor:number, options?:DecodeOptions) => any)[]} */
|
|
7
|
-
export const jump: ((data: Uint8Array, pos: number, minor: number, options?:
|
|
7
|
+
export const jump: ((data: Uint8Array, pos: number, minor: number, options?: DecodeOptions) => any)[];
|
|
8
8
|
/** @type {Token[]} */
|
|
9
9
|
export const quick: Token[];
|
|
10
10
|
export type DecodeOptions = import('../interface').DecodeOptions;
|
package/types/lib/jump.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"jump.d.ts","sourceRoot":"","sources":["../../lib/jump.js"],"names":[],"mappings":"AAkKA;;;GAGG;AACH,wCAHW,KAAK,GACH,UAAU,GAAC,SAAS,CA4ChC;AA/KD,6FAA6F;AAC7F,2BADkB,UAAU,OAAM,MAAM,SAAQ,MAAM,
|
|
1
|
+
{"version":3,"file":"jump.d.ts","sourceRoot":"","sources":["../../lib/jump.js"],"names":[],"mappings":"AAkKA;;;GAGG;AACH,wCAHW,KAAK,GACH,UAAU,GAAC,SAAS,CA4ChC;AA/KD,6FAA6F;AAC7F,2BADkB,UAAU,OAAM,MAAM,SAAQ,MAAM,YAAW,aAAa,KAAK,GAAG,IAChE;AAuGtB,sBAAsB;AACtB,oBADW,KAAK,EAAE,CACK;4BA7HV,OAAO,cAAc,EAAE,aAAa"}
|