From fb9fce8713af735241a1356ff2a771f295d15e89 Mon Sep 17 00:00:00 2001 From: Vasco Santos Date: Tue, 26 Jan 2021 09:11:00 +0100 Subject: [PATCH] chore: update deps (#82) * chore: update deps * chore: add prepare script --- package.json | 31 ++++++++++++++++--------------- src/pubsub/peer-streams.js | 2 -- src/pubsub/utils.js | 4 ++-- src/stream-muxer/tests/spawner.js | 2 +- 4 files changed, 19 insertions(+), 20 deletions(-) diff --git a/package.json b/package.json index 8385569..6e2de65 100644 --- a/package.json +++ b/package.json @@ -24,6 +24,7 @@ "scripts": { "lint": "aegir lint", "build": "aegir build", + "prepare": "aegir build --no-bundle", "test": "aegir test", "test:node": "aegir test --target node", "test:browser": "aegir test --target browser", @@ -51,33 +52,33 @@ "abortable-iterator": "^3.0.0", "chai": "^4.2.0", "chai-checkmark": "^1.0.1", - "debug": "^4.1.1", - "delay": "^4.3.0", + "debug": "^4.3.1", + "delay": "^4.4.0", "detect-node": "^2.0.4", "dirty-chai": "^2.0.1", - "err-code": "^2.0.0", - "it-goodbye": "^2.0.1", + "err-code": "^2.0.3", + "it-goodbye": "^2.0.2", "it-length-prefixed": "^3.1.0", "it-pair": "^1.0.0", "it-pipe": "^1.1.0", "it-pushable": "^1.4.0", - "libp2p-crypto": "^0.18.0", + "libp2p-crypto": "^0.19.0", "libp2p-tcp": "^0.15.0", - "multiaddr": "^8.0.0", - "multibase": "^3.0.0", - "multihashes": "^3.0.1", + "multiaddr": "^8.1.2", + "multibase": "^3.1.1", + "multihashes": "^3.1.1", "p-defer": "^3.0.0", - "p-limit": "^2.3.0", - "p-wait-for": "^3.1.0", - "peer-id": "^0.14.0", + "p-limit": "^3.1.0", + "p-wait-for": "^3.2.0", + "peer-id": "^0.14.2", "protons": "^2.0.0", - "sinon": "^9.0.2", - "streaming-iterables": "^5.0.2", - "uint8arrays": "^1.1.0" + "sinon": "^9.2.4", + "streaming-iterables": "^5.0.4", + "uint8arrays": "^2.0.5" }, "devDependencies": { "aegir": "^29.2.0", - "it-handshake": "^1.0.1", + "it-handshake": "^1.0.2", "rimraf": "^3.0.2" }, "contributors": [ diff --git a/src/pubsub/peer-streams.js b/src/pubsub/peer-streams.js index feedca1..837870f 100644 --- a/src/pubsub/peer-streams.js +++ b/src/pubsub/peer-streams.js @@ -6,8 +6,6 @@ const EventEmitter = require('events') const lp = require('it-length-prefixed') -/** @type {typeof import('it-pushable').default} */ -// @ts-ignore const pushable = require('it-pushable') const { pipe } = require('it-pipe') const { source: abortable } = require('abortable-iterator') diff --git a/src/pubsub/utils.js b/src/pubsub/utils.js index 6e45c1c..255ccf3 100644 --- a/src/pubsub/utils.js +++ b/src/pubsub/utils.js @@ -111,10 +111,10 @@ exports.normalizeInRpcMessage = (message, peerId) => { */ exports.normalizeOutRpcMessage = (message) => { const m = Object.assign({}, message) - if (typeof message.from === 'string' || message.from instanceof String) { + if (typeof message.from === 'string') { m.from = uint8ArrayFromString(message.from, 'base58btc') } - if (typeof message.data === 'string' || message.data instanceof String) { + if (typeof message.data === 'string') { m.data = uint8ArrayFromString(message.data) } return m diff --git a/src/stream-muxer/tests/spawner.js b/src/stream-muxer/tests/spawner.js index 28e3fa3..2b2dc2e 100644 --- a/src/stream-muxer/tests/spawner.js +++ b/src/stream-muxer/tests/spawner.js @@ -4,7 +4,7 @@ const { expect } = require('chai') const pair = require('it-pair/duplex') const { pipe } = require('it-pipe') -const pLimit = require('p-limit').default +const pLimit = require('p-limit') const { collect, tap, consume } = require('streaming-iterables') module.exports = async (Muxer, nStreams, nMsg, limit) => {