Skip to content

Commit a1b1b5e

Browse files
authored
chore: make ipfs-http-client a peer dependency (#32)
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 f49ddc0 commit a1b1b5e

File tree

2 files changed

+12
-1
lines changed

2 files changed

+12
-1
lines changed

README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,14 @@ Requires access to `/api/v0/dht/findpeer` HTTP API endpoint of the delegate node
88

99
[Jacob Heun](https://github.com/jacobheun)
1010

11+
## Requirements
12+
13+
`libp2p-delegated-peer-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.
14+
15+
```sh
16+
npm install ipfs-http-client libp2p-delegated-peer-routing
17+
```
18+
1119
## Example
1220

1321
```js

package.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,14 @@
2323
"dirty-chai": "^2.0.1",
2424
"go-ipfs-dep": "0.4.23-3",
2525
"ipfs-utils": "^2.2.0",
26+
"ipfs-http-client": "^44.0.0",
2627
"ipfsd-ctl": "^4.0.1"
2728
},
29+
"peerDependencies": {
30+
"ipfs-http-client": "^44.0.0"
31+
},
2832
"dependencies": {
2933
"debug": "^4.1.1",
30-
"ipfs-http-client": "^44.0.0",
3134
"p-queue": "^6.3.0",
3235
"peer-id": "^0.13.11"
3336
},

0 commit comments

Comments
 (0)