@ipld/car 5.0.0 → 5.0.1

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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/src/decoder.js +3 -3
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ipld/car",
3
- "version": "5.0.0",
3
+ "version": "5.0.1",
4
4
  "description": "Content Addressable aRchive format reader and writer",
5
5
  "author": "Rod <rod@vagg.org> (http://r.va.gg/)",
6
6
  "license": "Apache-2.0 OR MIT",
package/src/decoder.js CHANGED
@@ -33,7 +33,7 @@ async function readVarint (reader) {
33
33
  throw new Error('Unexpected end of data')
34
34
  }
35
35
  const i = varint.decode(bytes)
36
- reader.seek(varint.decode.bytes)
36
+ reader.seek(/** @type {number} */(varint.decode.bytes))
37
37
  return i
38
38
  /* c8 ignore next 2 */
39
39
  // Node.js 12 c8 bug
@@ -117,9 +117,9 @@ async function readMultihash (reader) {
117
117
 
118
118
  const bytes = await reader.upTo(8)
119
119
  varint.decode(bytes) // code
120
- const codeLength = varint.decode.bytes
120
+ const codeLength = /** @type {number} */(varint.decode.bytes)
121
121
  const length = varint.decode(bytes.subarray(varint.decode.bytes))
122
- const lengthLength = varint.decode.bytes
122
+ const lengthLength = /** @type {number} */(varint.decode.bytes)
123
123
  const mhLength = codeLength + lengthLength + length
124
124
  const multihash = await reader.exactly(mhLength)
125
125
  reader.seek(mhLength)