Skip to content
This repository has been archived by the owner on Feb 12, 2024. It is now read-only.

Commit

Permalink
chore: upgrade ipld-raw (#3113)
Browse files Browse the repository at this point in the history
Resolve now throws if the path is not '/'.
  • Loading branch information
achingbrain authored Jun 23, 2020
1 parent e542647 commit c487207
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/ipfs-http-client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
"ipld-block": "^0.9.1",
"ipld-dag-cbor": "^0.15.2",
"ipld-dag-pb": "^0.18.5",
"ipld-raw": "^4.0.1",
"ipld-raw": "^5.0.0",
"iso-url": "^0.4.7",
"it-tar": "^1.2.2",
"it-to-buffer": "^1.0.0",
Expand Down
4 changes: 4 additions & 0 deletions packages/ipfs-http-client/src/dag/get.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,10 @@ module.exports = configure((api, options) => {
)
}

if (block.cid.codec === 'raw' && !resolved.remPath) {
resolved.remPath = '/'
}

return dagResolver.resolve(block.data, resolved.remPath)
}
})
2 changes: 1 addition & 1 deletion packages/ipfs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@
"ipld-dag-pb": "^0.18.5",
"ipld-ethereum": "^4.0.0",
"ipld-git": "^0.5.0",
"ipld-raw": "^4.0.1",
"ipld-raw": "^5.0.0",
"ipld-zcash": "^0.4.0",
"ipns": "^0.7.1",
"is-domain-name": "^1.0.1",
Expand Down

0 comments on commit c487207

Please sign in to comment.