Skip to content

Commit

Permalink
chore: update deps (#99)
Browse files Browse the repository at this point in the history
Also removes unnecessary multiaddr conversion
  • Loading branch information
achingbrain authored Sep 7, 2022
1 parent 2b2ecc4 commit b4ea958
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 17 deletions.
3 changes: 3 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,6 @@ updates:
interval: daily
time: "10:00"
open-pull-requests-limit: 10
commit-message:
prefix: "deps"
prefix-development: "deps(dev)"
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
- [Requirements](#requirements)
- [Example](#example)
- [License](#license)
- [Contribution](#contribution)
- [Contribute](#contribute)

## Install

Expand Down Expand Up @@ -64,6 +64,6 @@ Licensed under either of
- Apache 2.0, ([LICENSE-APACHE](LICENSE-APACHE) / <http://www.apache.org/licenses/LICENSE-2.0>)
- MIT ([LICENSE-MIT](LICENSE-MIT) / <http://opensource.org/licenses/MIT>)

## Contribution
## Contribute

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.
23 changes: 13 additions & 10 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -62,15 +62,15 @@
"release": "patch"
},
{
"type": "chore",
"type": "docs",
"release": "patch"
},
{
"type": "docs",
"type": "test",
"release": "patch"
},
{
"type": "test",
"type": "deps",
"release": "patch"
},
{
Expand Down Expand Up @@ -100,7 +100,11 @@
},
{
"type": "docs",
"section": "Trivial Changes"
"section": "Documentation"
},
{
"type": "deps",
"section": "Dependencies"
},
{
"type": "test",
Expand Down Expand Up @@ -136,7 +140,6 @@
"@libp2p/interface-peer-info": "^1.0.1",
"@libp2p/interfaces": "^3.0.2",
"@libp2p/logger": "^2.0.0",
"@multiformats/multiaddr": "^10.1.7",
"any-signal": "^3.0.1",
"err-code": "^3.0.1",
"it-drain": "^1.0.5",
Expand All @@ -145,14 +148,14 @@
},
"devDependencies": {
"aegir": "^37.2.0",
"go-ipfs": "^0.13.0",
"ipfs-core-types": "^0.11.0",
"ipfs-http-client": "^57.0.1",
"ipfsd-ctl": "^11.0.0",
"go-ipfs": "^0.15.0",
"ipfs-core-types": "^0.12.0",
"ipfs-http-client": "^58.0.0",
"ipfsd-ctl": "^12.0.2",
"it-all": "^1.0.6",
"it-drain": "^1.0.5",
"uint8arrays": "^3.0.0",
"wherearewe": "^1.0.0"
"wherearewe": "^2.0.1"
},
"browser": {
"go-ipfs": false
Expand Down
4 changes: 1 addition & 3 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import { logger } from '@libp2p/logger'
import drain from 'it-drain'
import PQueue from 'p-queue'
import defer from 'p-defer'
import { multiaddr } from '@multiformats/multiaddr'
import errCode from 'err-code'
import anySignal from 'any-signal'
import type { IPFSHTTPClient, CID, HTTPClientExtraOptions } from 'ipfs-http-client'
Expand Down Expand Up @@ -102,8 +101,7 @@ export class DelegatedContentRouting implements ContentRouting, Startable {
const peerInfo: PeerInfo = {
id: prov.id,
protocols: [],
// @ts-expect-error ipfs-core-types need updating
multiaddrs: prov.multiaddrs.map(m => multiaddr(m.toString()))
multiaddrs: prov.multiaddrs
}

return peerInfo
Expand Down
4 changes: 2 additions & 2 deletions test/index.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { Controller, createFactory } from 'ipfsd-ctl'
import { create, CID } from 'ipfs-http-client'
import all from 'it-all'
import drain from 'it-drain'
import { isNode } from 'wherearewe'
import { isElectronMain, isNode } from 'wherearewe'
import { fromString as uint8ArrayFromString } from 'uint8arrays/from-string'
import { DelegatedContentRouting } from '../src/index.js'
// @ts-expect-error no types
Expand All @@ -18,7 +18,7 @@ import type { PeerInfo } from '@libp2p/interface-peer-info'
const factory = createFactory({
type: 'go',
ipfsHttpModule: { create },
ipfsBin: isNode ? goIpfs.path() : undefined,
ipfsBin: isNode || isElectronMain ? goIpfs.path() : undefined,
test: true,
endpoint: 'http://localhost:57483'
})
Expand Down

0 comments on commit b4ea958

Please sign in to comment.