Skip to content

Commit

Permalink
chore: make ipfs-http-client a peer dependency (#39)
Browse files Browse the repository at this point in the history
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).
  • Loading branch information
jacobheun authored Apr 23, 2020
1 parent 2c97221 commit 0c0f304
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,14 @@ Requires access to `/api/v0/dht/findprovs` and `/api/v0/refs` HTTP API endpoints

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

## Requirements

`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.

```sh
npm install ipfs-http-client libp2p-delegated-content-routing
```

## Example

```js
Expand Down
5 changes: 4 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,18 @@
"chai": "^4.2.0",
"cids": "^0.8.0",
"go-ipfs-dep": "0.4.23-3",
"ipfs-http-client": "^44.0.0",
"ipfs-utils": "^2.2.0",
"ipfsd-ctl": "^4.0.1",
"it-drain": "^1.0.0",
"it-last": "^1.0.1",
"peer-id": "^0.13.11"
},
"peerDependencies": {
"ipfs-http-client": "^44.0.0"
},
"dependencies": {
"debug": "^4.1.1",
"ipfs-http-client": "^44.0.0",
"it-all": "^1.0.0",
"multiaddr": "^7.4.3",
"p-defer": "^3.0.0",
Expand Down

0 comments on commit 0c0f304

Please sign in to comment.