Skip to content
This repository was archived by the owner on Mar 10, 2020. It is now read-only.

Commit c1279ce

Browse files
committed
chore: revert multiaddr upgrade
1 parent 27c0c48 commit c1279ce

File tree

3 files changed

+11
-11
lines changed

3 files changed

+11
-11
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@
7979
"ky-universal": "^0.3.0",
8080
"lru-cache": "^5.1.1",
8181
"merge-options": "^1.0.1",
82-
"multiaddr": "^7.1.0",
82+
"multiaddr": "^6.0.6",
8383
"multibase": "~0.6.0",
8484
"multicodec": "~0.5.1",
8585
"multihashes": "~0.4.14",

test/constructor.spec.js

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -24,15 +24,15 @@ describe('ipfs-http-client constructor tests', () => {
2424

2525
it('opts', () => {
2626
const host = 'wizard.world'
27-
const port = 999
27+
const port = '999'
2828
const protocol = 'https'
2929
const ipfs = ipfsClient({ host, port, protocol })
3030
expectConfig(ipfs, { host, port, protocol })
3131
})
3232

3333
it('multiaddr dns4 string (implicit http)', () => {
3434
const host = 'foo.com'
35-
const port = 1001
35+
const port = '1001'
3636
const protocol = 'http' // default to http if not specified in multiaddr
3737
const addr = `/dns4/${host}/tcp/${port}`
3838
const ipfs = ipfsClient(addr)
@@ -41,7 +41,7 @@ describe('ipfs-http-client constructor tests', () => {
4141

4242
it('multiaddr dns4 string (explicit https)', () => {
4343
const host = 'foo.com'
44-
const port = 1001
44+
const port = '1001'
4545
const protocol = 'https'
4646
const addr = `/dns4/${host}/tcp/${port}/${protocol}`
4747
const ipfs = ipfsClient(addr)
@@ -50,7 +50,7 @@ describe('ipfs-http-client constructor tests', () => {
5050

5151
it('multiaddr dns4 string, explicit https in opts', () => {
5252
const host = 'foo.com'
53-
const port = 1001
53+
const port = '1001'
5454
const protocol = 'https'
5555
const addr = `/dns4/${host}/tcp/${port}`
5656
const ipfs = ipfsClient(addr, { protocol })
@@ -59,7 +59,7 @@ describe('ipfs-http-client constructor tests', () => {
5959

6060
it('multiaddr ipv4 string (implicit http)', () => {
6161
const host = '101.101.101.101'
62-
const port = 1001
62+
const port = '1001'
6363
const protocol = 'http'
6464
const addr = `/ip4/${host}/tcp/${port}`
6565
const ipfs = ipfsClient(addr)
@@ -68,7 +68,7 @@ describe('ipfs-http-client constructor tests', () => {
6868

6969
it('multiaddr ipv4 string (explicit https)', () => {
7070
const host = '101.101.101.101'
71-
const port = 1001
71+
const port = '1001'
7272
const protocol = 'https'
7373
const addr = `/ip4/${host}/tcp/${port}/${protocol}`
7474
const ipfs = ipfsClient(addr)
@@ -77,22 +77,22 @@ describe('ipfs-http-client constructor tests', () => {
7777

7878
it('multiaddr instance', () => {
7979
const host = 'ace.place'
80-
const port = 1001
80+
const port = '1001'
8181
const addr = multiaddr(`/dns4/${host}/tcp/${port}`)
8282
const ipfs = ipfsClient(addr)
8383
expectConfig(ipfs, { host, port })
8484
})
8585

8686
it('host and port strings', () => {
8787
const host = '1.1.1.1'
88-
const port = 9999
88+
const port = '9999'
8989
const ipfs = ipfsClient(host, port)
9090
expectConfig(ipfs, { host, port })
9191
})
9292

9393
it('host, port and api path', () => {
9494
const host = '10.100.100.255'
95-
const port = 9999
95+
const port = '9999'
9696
const apiPath = '/future/api/v1/'
9797
const ipfs = ipfsClient(host, port, { 'api-path': apiPath })
9898
expectConfig(ipfs, { host, port, apiPath })

test/node/swarm.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ describe('.swarm.peers', function () {
4848
expect(res).to.be.a('array')
4949
expect(res.length).to.equal(1)
5050
expect(res[0].error).to.not.exist()
51-
expect(res[0].addr.toString()).to.equal('/ip4/73.109.217.59/tcp/49311/p2p/QmWjxEGC7BthJrCf7QTModrcsRweHbupdPTY4oGMVoDZXm')
51+
expect(res[0].addr.toString()).to.equal('/ip4/73.109.217.59/tcp/49311/ipfs/QmWjxEGC7BthJrCf7QTModrcsRweHbupdPTY4oGMVoDZXm')
5252
expect(res[0].peer.toB58String()).to.equal('QmWjxEGC7BthJrCf7QTModrcsRweHbupdPTY4oGMVoDZXm')
5353
expect(scope.isDone()).to.equal(true)
5454
})

0 commit comments

Comments
 (0)