diff --git a/package.json b/package.json index a1d58bee32..3765facb60 100644 --- a/package.json +++ b/package.json @@ -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", @@ -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", @@ -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", diff --git a/src/core/components/id.js b/src/core/components/id.js index 8e5fcab862..998303da7c 100644 --- a/src/core/components/id.js +++ b/src/core/components/id.js @@ -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' diff --git a/test/cli/files.js b/test/cli/files.js index 336c1dd62c..7872e0bf5a 100644 --- a/test/cli/files.js +++ b/test/cli/files.js @@ -158,7 +158,6 @@ 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) @@ -166,7 +165,6 @@ describe('files', () => runOnAndOff((thing) => { 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) @@ -174,7 +172,6 @@ describe('files', () => runOnAndOff((thing) => { 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) @@ -182,7 +179,6 @@ describe('files', () => runOnAndOff((thing) => { 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 = [ @@ -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)