Skip to content

Commit 0c0f304

Browse files
authoredApr 23, 2020
chore: make ipfs-http-client a peer dependency (#39)
BREAKING CHANGE: The ipfs-http-client must now be installed as a peer dependency. It is no longer included as a dependency of this module. The reason the http-client should be a peerDependency and not a dependency is that its API requires knowledge of the http-client (we pass in the api endpoint details).
1 parent 2c97221 commit 0c0f304

File tree

2 files changed

+12
-1
lines changed

2 files changed

+12
-1
lines changed
 

‎README.md

+8
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,14 @@ Requires access to `/api/v0/dht/findprovs` and `/api/v0/refs` HTTP API endpoints
1616

1717
[Jacob Heun](https://github.com/jacobheun)
1818

19+
## Requirements
20+
21+
`libp2p-delegated-content-routing` leverages the `ipfs-http-client` library and requires it as a peer dependency, as such, both must be installed in order for this module to work properly.
22+
23+
```sh
24+
npm install ipfs-http-client libp2p-delegated-content-routing
25+
```
26+
1927
## Example
2028

2129
```js

‎package.json

+4-1
Original file line numberDiff line numberDiff line change
@@ -22,15 +22,18 @@
2222
"chai": "^4.2.0",
2323
"cids": "^0.8.0",
2424
"go-ipfs-dep": "0.4.23-3",
25+
"ipfs-http-client": "^44.0.0",
2526
"ipfs-utils": "^2.2.0",
2627
"ipfsd-ctl": "^4.0.1",
2728
"it-drain": "^1.0.0",
2829
"it-last": "^1.0.1",
2930
"peer-id": "^0.13.11"
3031
},
32+
"peerDependencies": {
33+
"ipfs-http-client": "^44.0.0"
34+
},
3135
"dependencies": {
3236
"debug": "^4.1.1",
33-
"ipfs-http-client": "^44.0.0",
3437
"it-all": "^1.0.0",
3538
"multiaddr": "^7.4.3",
3639
"p-defer": "^3.0.0",

0 commit comments

Comments
 (0)
Please sign in to comment.