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

chore: update deps #2730

Closed
wants to merge 12 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 6 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@
"hapi-pino": "^6.1.0",
"hashlru": "^2.3.0",
"interface-datastore": "~0.8.0",
"ipfs-bitswap": "github:ipfs/js-ipfs-bitswap#refactor/libp2p-async",
"ipfs-bitswap": "^0.27.0",
"ipfs-block": "~0.8.1",
"ipfs-block-service": "~0.16.0",
"ipfs-http-client": "^42.0.0-pre.0",
Expand Down Expand Up @@ -122,13 +122,13 @@
"just-safe-set": "^2.1.0",
"ky": "^0.15.0",
"ky-universal": "~0.3.0",
"libp2p": "github:libp2p/js-libp2p#refactor/async-await",
"libp2p": "^0.27.0",
"libp2p-bootstrap": "^0.10.2",
"libp2p-crypto": "^0.17.1",
"libp2p-delegated-content-routing": "^0.4.1",
"libp2p-delegated-peer-routing": "^0.4.0",
"libp2p-floodsub": "^0.20.0",
"libp2p-gossipsub": "github:ChainSafe/gossipsub-js#71cb905983b125b50c64a9b75d745dfd7fb8f094",
"libp2p-gossipsub": "^0.2.2",
"libp2p-kad-dht": "^0.18.3",
"libp2p-keychain": "^0.6.0",
"libp2p-mdns": "^0.13.0",
Expand Down Expand Up @@ -172,13 +172,14 @@
"base64url": "^3.0.1",
"clear-module": "^4.0.0",
"delay": "^4.1.0",
"dir-compare": "^1.7.3",
"dir-compare": "^2.0.1",
"execa": "^3.0.0",
"form-data": "^3.0.0",
"go-ipfs-dep": "^0.4.22",
"hat": "0.0.3",
"interface-ipfs-core": "^0.129.0",
"ipfs-interop": "github:ipfs/interop#refactor/async-await",
"ipfsd-ctl": "github:ipfs/js-ipfsd-ctl#feat/force-kill",
"ipfsd-ctl": "^2.1.0",
"ncp": "^2.0.0",
"p-event": "^4.1.0",
"p-map": "^3.0.0",
Expand Down
16 changes: 14 additions & 2 deletions src/core/components/id.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,24 @@ const pkgversion = require('../../../package.json').version

module.exports = ({ peerInfo }) => {
return async function id () { // eslint-disable-line require-await
const id = peerInfo.id.toB58String()

return {
id: peerInfo.id.toB58String(),
id,
publicKey: peerInfo.id.pubKey.bytes.toString('base64'),
addresses: peerInfo.multiaddrs
.toArray()
.map(ma => `${ma}/p2p/${peerInfo.id.toB58String()}`)
.map(ma => {
const str = ma.toString()

// some relay-style transports add our peer id to the ma for us
// so don't double-add
if (str.endsWith(`/p2p/${id}`)) {
return str
}

return `${str}/p2p/${id}`
})
.sort(),
agentVersion: `js-ipfs/${pkgversion}`,
protocolVersion: '9000'
Expand Down
5 changes: 0 additions & 5 deletions test/cli/files.js
Original file line number Diff line number Diff line change
Expand Up @@ -158,31 +158,27 @@ describe('files', () => runOnAndOff((thing) => {
.to.eql('added QmPZ9gcCEpqKTo6aq61g2nXGUhM4iCL3ewB6LDXZCtioEB readme\n')
})

// TODO: FIXME bugs in it-glob
it('add recursively test', async function () {
this.timeout(60 * 1000)

const out = await ipfs('add -r test/fixtures/test-data/recursive-get-dir')
expect(out).to.equal(recursiveGetDirResults.join('\n') + '\n')
})

// TODO: FIXME bugs in it-glob
it('add recursively including hidden files', async function () {
this.timeout(60 * 1000)

const out = await ipfs('add -r -H test/fixtures/test-data/recursive-get-dir')
expect(out).to.include('added QmdBd5zgdJQHsyaaAm9Vnth7NWwj23gj3Ew17r6bTvVkch recursive-get-dir/.hidden.txt')
})

// TODO: FIXME bugs in it-glob
it('add directory with trailing slash test', async function () {
this.timeout(30 * 1000)

const out = await ipfs('add -r test/fixtures/test-data/recursive-get-dir/')
expect(out).to.equal(recursiveGetDirResults.join('\n') + '\n')
})

// TODO: FIXME bugs in it-glob
it('add directory with odd name', async function () {
this.timeout(30 * 1000)
const expected = [
Expand Down Expand Up @@ -442,7 +438,6 @@ describe('files', () => runOnAndOff((thing) => {
rimraf(file)
})

// TODO: FIXME bugs in it-glob
// FIXME: tests that depend on output of other tests
it('get recursively', async function () {
this.timeout(20 * 1000)
Expand Down