Skip to content

Commit e972a48

Browse files
committed
chore: update dependencies
A few `@ts-ignore`s are needed until js-dag-cbor is updated to work properly with CommonJS and TypeScript types.
1 parent 031bf2d commit e972a48

File tree

5 files changed

+8
-3
lines changed

5 files changed

+8
-3
lines changed

packages/ipfs-unixfs-exporter/package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -56,14 +56,14 @@
5656
"util": "^0.12.3"
5757
},
5858
"dependencies": {
59-
"@ipld/dag-cbor": "^3.0.0",
59+
"@ipld/dag-cbor": "^4.0.0",
6060
"@ipld/dag-pb": "^0.0.1",
6161
"err-code": "^3.0.1",
6262
"hamt-sharding": "^2.0.0",
6363
"ipfs-unixfs": "^4.0.1",
6464
"it-last": "^1.0.5",
6565
"multicodec": "^3.0.1",
66-
"multiformats": "^4.6.1",
66+
"multiformats": "^6.0.0",
6767
"multihashing-async": "^2.1.0"
6868
},
6969
"types": "dist/src/index.d.ts",

packages/ipfs-unixfs-exporter/src/resolvers/dag-cbor.js

+1
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ const dagCbor = require('@ipld/dag-cbor')
1313
*/
1414
const resolve = async (cid, name, path, toResolve, resolve, depth, blockService, options) => {
1515
const block = await blockService.get(cid)
16+
// @ts-ignore - TODO vmx 2021-04-01: will work once js-dag-cbor has proper types
1617
const object = dagCbor.decode(block.bytes)
1718
let subObject = object
1819
let subPath = path

packages/ipfs-unixfs-exporter/src/resolvers/unixfs-v1/content/file.js

+1
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,7 @@ async function * emitBytes (blockService, node, start, end, streamPosition = 0,
7777
child = block.bytes
7878
break;
7979
case mc.DAG_CBOR:
80+
// @ts-ignore - TODO vmx 2021-04-01: will work once js-dag-cbor has proper types
8081
child = await dagCbor.decode(block.bytes)
8182
break;
8283
default:

packages/ipfs-unixfs-exporter/test/exporter.spec.js

+3
Original file line numberDiff line numberDiff line change
@@ -973,6 +973,7 @@ describe('exporter', () => {
973973
it('errors when exporting a non-existent key from a cbor node', async () => {
974974
const cborBlock = await Block.encode({
975975
value: { foo: 'bar' },
976+
// @ts-ignore - TODO vmx 2021-04-01: will work once js-dag-cbor has proper types
976977
codec: dagCbor,
977978
hasher: sha256
978979
})
@@ -992,6 +993,7 @@ describe('exporter', () => {
992993

993994
const cborBlock = await Block.encode({
994995
value: node,
996+
// @ts-ignore - TODO vmx 2021-04-01: will work once js-dag-cbor has proper types
995997
codec: dagCbor,
996998
hasher: sha256
997999
})
@@ -1048,6 +1050,7 @@ describe('exporter', () => {
10481050
it('errors we export a unixfs node that has a non-unixfs/dag-pb child', async () => {
10491051
const cborBlock = await Block.encode({
10501052
value: { foo: 'bar' },
1053+
// @ts-ignore - TODO vmx 2021-04-01: will work once js-dag-cbor has proper types
10511054
codec: dagCbor,
10521055
hasher: sha256
10531056
})

packages/ipfs-unixfs-importer/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@
5757
"it-parallel-batch": "^1.0.9",
5858
"merge-options": "^3.0.4",
5959
"multicodec": "^3.0.1",
60-
"multiformats": "^4.6.1",
60+
"multiformats": "^6.0.0",
6161
"multihashing-async": "^2.1.0",
6262
"rabin-wasm": "^0.1.4",
6363
"uint8arrays": "^2.1.2"

0 commit comments

Comments
 (0)