cbor-x 1.5.5 → 1.5.7

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/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "cbor-x",
3
3
  "author": "Kris Zyp",
4
- "version": "1.5.5",
4
+ "version": "1.5.7",
5
5
  "description": "Ultra-fast and conformant CBOR (RFC 8949) implementation with support for numerous tag extensions including records and structured cloning",
6
6
  "license": "MIT",
7
7
  "types": "./index.d.ts",
@@ -69,7 +69,7 @@
69
69
  "node:buffer": false
70
70
  },
71
71
  "optionalDependencies": {
72
- "cbor-extract": "^2.1.1"
72
+ "cbor-extract": "^2.2.0"
73
73
  },
74
74
  "devDependencies": {
75
75
  "@rollup/plugin-json": "^5.0.1",
package/stream.js CHANGED
@@ -39,13 +39,12 @@ export class DecoderStream extends Transform {
39
39
  let values
40
40
  try {
41
41
  values = this.decoder.decodeMultiple(chunk)
42
- callback()
43
42
  } catch(error) {
44
43
  if (error.incomplete) {
45
44
  this.incompleteBuffer = chunk.slice(error.lastPosition)
46
45
  values = error.values
47
46
  } else {
48
- callback(error)
47
+ return callback(error)
49
48
  }
50
49
  } finally {
51
50
  for (let value of values || []) {
@@ -54,6 +53,7 @@ export class DecoderStream extends Transform {
54
53
  this.push(value)
55
54
  }
56
55
  }
56
+ callback()
57
57
  }
58
58
  getNullValue() {
59
59
  return Symbol.for(null)