From 277476ee2385de2317c2784c0375846b0862c260 Mon Sep 17 00:00:00 2001 From: Hugo Dias Date: Sat, 15 Dec 2018 13:12:24 +0000 Subject: [PATCH 1/4] fix: reduce bundle size --- package.json | 6 +++--- src/handler.js | 2 +- src/ping.js | 5 +++-- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/package.json b/package.json index c7ccbb7..98fce42 100644 --- a/package.json +++ b/package.json @@ -35,16 +35,16 @@ }, "homepage": "https://github.com/libp2p/js-libp2p-ping", "devDependencies": { - "aegir": "^18.0.2", + "aegir": "github:ipfs/aegir#feat/make-exp-build-test-default", "async": "^2.6.1", "chai": "^4.2.0", "debug": "^4.1.1", "dirty-chai": "^2.0.1", "libp2p-switch": "~0.41.4", "libp2p-tcp": "~0.13.0", - "multiaddr": "^6.0.2", + "multiaddr": "^6.0.0", "peer-book": "~0.9.0", - "peer-id": "~0.12.1", + "peer-id": "~0.12.0", "peer-info": "~0.15.0", "run-parallel": "^1.1.9" }, diff --git a/src/handler.js b/src/handler.js index ec6c376..12f1793 100644 --- a/src/handler.js +++ b/src/handler.js @@ -1,6 +1,6 @@ 'use strict' -const pull = require('pull-stream') +const pull = require('pull-stream/pull') const handshake = require('pull-handshake') const constants = require('./constants') const PROTOCOL = constants.PROTOCOL diff --git a/src/ping.js b/src/ping.js index 4022a49..2b96cdb 100644 --- a/src/ping.js +++ b/src/ping.js @@ -1,7 +1,8 @@ 'use strict' const EventEmitter = require('events').EventEmitter -const pull = require('pull-stream') +const pull = require('pull-stream/pull') +const empty = require('pull-stream/sources/empty') const handshake = require('pull-handshake') const constants = require('./constants') const util = require('./util') @@ -73,7 +74,7 @@ class Ping extends EventEmitter { this._stopped = true pull( - pull.empty(), + empty(), this.shake.rest() ) } From b29a7b02e19fc657da3ef2eb0fba7da4c8b721f5 Mon Sep 17 00:00:00 2001 From: Hugo Dias Date: Sat, 15 Dec 2018 13:13:15 +0000 Subject: [PATCH 2/4] chore: ignore lock --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index 1c73b37..4db4e02 100644 --- a/.gitignore +++ b/.gitignore @@ -41,3 +41,4 @@ test/test-data/go-ipfs-repo/LOG.old # while testing npm5 package-lock.json +yarn.lock From 0dccde4507941ed08944d9db6a5c974f8085fa32 Mon Sep 17 00:00:00 2001 From: Hugo Dias Date: Sat, 15 Dec 2018 22:09:10 +0000 Subject: [PATCH 3/4] fix: add libp2p-crypto --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 98fce42..4ee450c 100644 --- a/package.json +++ b/package.json @@ -49,7 +49,7 @@ "run-parallel": "^1.1.9" }, "dependencies": { - "libp2p-crypto": "~0.15.0", + "libp2p-crypto": "libp2p/js-libp2p-crypto#feat/bundle-size", "pull-handshake": "^1.1.4", "pull-stream": "^3.6.9" }, From fba802dca3e62a8773a0a4c11469b87b29f1beab Mon Sep 17 00:00:00 2001 From: Hugo Dias Date: Thu, 10 Jan 2019 10:49:53 +0000 Subject: [PATCH 4/4] chore: update deps --- package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 4ee450c..fcd96c6 100644 --- a/package.json +++ b/package.json @@ -35,7 +35,7 @@ }, "homepage": "https://github.com/libp2p/js-libp2p-ping", "devDependencies": { - "aegir": "github:ipfs/aegir#feat/make-exp-build-test-default", + "aegir": "^18.0.3", "async": "^2.6.1", "chai": "^4.2.0", "debug": "^4.1.1", @@ -49,7 +49,7 @@ "run-parallel": "^1.1.9" }, "dependencies": { - "libp2p-crypto": "libp2p/js-libp2p-crypto#feat/bundle-size", + "libp2p-crypto": "~0.16.0", "pull-handshake": "^1.1.4", "pull-stream": "^3.6.9" },