From 22a63ef078a8c63138bc6c19d2552431a4aadddc Mon Sep 17 00:00:00 2001 From: Vasco Santos Date: Mon, 12 Apr 2021 15:57:05 +0200 Subject: [PATCH] chore: update interfaces --- package.json | 10 +++++----- test/utils/create-peer.js | 6 +++--- ts/interfaces.ts | 2 +- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/package.json b/package.json index 64baa6a6..3d91c00b 100644 --- a/package.json +++ b/package.json @@ -43,7 +43,7 @@ "denque": "^1.4.1", "err-code": "^2.0.0", "it-pipe": "^1.0.1", - "libp2p-interfaces": "libp2p/js-libp2p-interfaces#chore/update-pubsub-interface", + "libp2p-interfaces": "^0.10.0", "peer-id": "^0.14.0", "protobufjs": "^6.10.2", "time-cache": "^0.3.0", @@ -68,13 +68,13 @@ "eslint-plugin-promise": "^4.2.1", "eslint-plugin-standard": "^4.0.1", "it-pair": "^1.0.0", - "libp2p": "^0.30.0", - "libp2p-floodsub": "^0.24.1", + "libp2p": "libp2p/js-libp2p#chore/config-ts", + "libp2p-floodsub": "^0.25.0", "libp2p-mplex": "^0.10.0", "libp2p-noise": "^2.0.0", - "libp2p-websockets": "^0.15.4", + "libp2p-websockets": "^0.15.5", "lodash": "^4.17.15", - "multiaddr": "^8.0.0", + "multiaddr": "^9.0.0", "os": "^0.1.1", "p-retry": "^4.2.0", "p-times": "^2.1.0", diff --git a/test/utils/create-peer.js b/test/utils/create-peer.js index 90866062..2fce3c63 100644 --- a/test/utils/create-peer.js +++ b/test/utils/create-peer.js @@ -9,7 +9,7 @@ */ const Libp2p = require('libp2p') -const multiaddr = require('multiaddr') +const { Multiaddr } = require('multiaddr') const PeerId = require('peer-id') const WS = require('libp2p-websockets') @@ -56,10 +56,10 @@ function isBrowser() { function getListenAddress (peerId) { if (isBrowser()) { // browser - return multiaddr(`${RelayPeer.multiaddr}/p2p-circuit/p2p/${peerId.toB58String()}`) + return new Multiaddr(`${RelayPeer.multiaddr}/p2p-circuit/p2p/${peerId.toB58String()}`) } else { // node - return multiaddr('/ip4/127.0.0.1/tcp/0/ws') + return new Multiaddr('/ip4/127.0.0.1/tcp/0/ws') } } diff --git a/ts/interfaces.ts b/ts/interfaces.ts index 81ab8aa7..2b8e5561 100644 --- a/ts/interfaces.ts +++ b/ts/interfaces.ts @@ -1,6 +1,6 @@ import { InMessage } from 'libp2p-interfaces/src/pubsub' import PeerId = require('peer-id') -import Multiaddr = require('multiaddr') +import { Multiaddr } from 'multiaddr' export interface AddrInfo { id: PeerId