From 3bf32308b06b2ecaa4d80f8a326ac0a7d2a1f194 Mon Sep 17 00:00:00 2001 From: Isan-Rivkin Date: Thu, 21 Feb 2019 12:47:34 +0200 Subject: [PATCH 1/5] chore: unsubscribe with no handler --- src/pubsub.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/pubsub.js b/src/pubsub.js index f539d0e3a..6b298351d 100644 --- a/src/pubsub.js +++ b/src/pubsub.js @@ -77,7 +77,11 @@ module.exports = (arg) => { return setImmediate(() => callback(err)) } - ps.removeListener(topic, handler) + if (!handler && !callback) { + ps.removeAllListeners(topic) + } else { + ps.removeListener(topic, handler) + } // Drop the request once we are actually done if (ps.listenerCount(topic) === 0) { From 1449b2ed86b577fbef1ef9a476ea54a950fc784b Mon Sep 17 00:00:00 2001 From: Isan-Rivkin Date: Tue, 26 Feb 2019 12:04:23 +0200 Subject: [PATCH 2/5] chore: update interface-ipfs-core version --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index a16e7896e..a14884b08 100644 --- a/package.json +++ b/package.json @@ -83,7 +83,7 @@ "dirty-chai": "^2.0.1", "eslint-plugin-react": "^7.11.1", "go-ipfs-dep": "~0.4.18", - "interface-ipfs-core": "~0.96.0", + "interface-ipfs-core": "~0.98.0", "ipfsd-ctl": "github:ipfs/js-ipfsd-ctl", "nock": "^10.0.2", "pull-stream": "^3.6.9", From e1994f8bbc6f41616bb24bb3b1f197b79c8fb646 Mon Sep 17 00:00:00 2001 From: Isan-Rivkin Date: Wed, 27 Feb 2019 00:02:28 +0200 Subject: [PATCH 3/5] test: fixed path to interface-ipfs-core --- .aegir.js | 2 +- test/get.spec.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.aegir.js b/.aegir.js index bbe8a75e9..51aedf024 100644 --- a/.aegir.js +++ b/.aegir.js @@ -12,7 +12,7 @@ module.exports = { }, karma: { files: [{ - pattern: 'node_modules/interface-ipfs-core/js/test/fixtures/**/*', + pattern: 'node_modules/interface-ipfs-core/test/fixtures/**/*', watched: false, served: true, included: false diff --git a/test/get.spec.js b/test/get.spec.js index c789ce971..2c5adb6d9 100644 --- a/test/get.spec.js +++ b/test/get.spec.js @@ -23,7 +23,7 @@ describe('.get (specific go-ipfs features)', function () { const smallFile = { cid: 'Qma4hjFTnCasJ8PVp3mZbZK5g2vGDT4LByLJ7m8ciyRFZP', - data: fixture('js/test/fixtures/testfile.txt') + data: fixture('test/fixtures/testfile.txt') } let ipfsd From ba3b2bc6ce1be88c04def413837c27cb078b3bdf Mon Sep 17 00:00:00 2001 From: Alan Shaw Date: Wed, 13 Mar 2019 15:21:32 +0000 Subject: [PATCH 4/5] fix: compatibility with go-ipfs 0.4.19 License: MIT Signed-off-by: Alan Shaw --- package.json | 6 +++--- test/interface.spec.js | 4 ++++ 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index a14884b08..1e87728e9 100644 --- a/package.json +++ b/package.json @@ -82,9 +82,9 @@ "cross-env": "^5.2.0", "dirty-chai": "^2.0.1", "eslint-plugin-react": "^7.11.1", - "go-ipfs-dep": "~0.4.18", - "interface-ipfs-core": "~0.98.0", - "ipfsd-ctl": "github:ipfs/js-ipfsd-ctl", + "go-ipfs-dep": "~0.4.19-0", + "interface-ipfs-core": "github:ipfs/interface-js-ipfs-core#fix/go-ipfs-0419-ls-file-sizes", + "ipfsd-ctl": "~0.42.0", "nock": "^10.0.2", "pull-stream": "^3.6.9", "stream-equal": "^1.1.1" diff --git a/test/interface.spec.js b/test/interface.spec.js index 3d7cb7970..a5eed428c 100644 --- a/test/interface.spec.js +++ b/test/interface.spec.js @@ -72,6 +72,10 @@ describe('interface-ipfs-core tests', () => { { name: 'should get by CID string + path', reason: 'FIXME vmx 2018-02-22: Currently not supported in go-ipfs, it might be possible once https://github.com/ipfs/go-ipfs/issues/4728 is done' + }, + { + name: 'should get only a CID, due to resolving locally only', + reason: 'FIXME: go-ipfs does not support localResolve option' } ] }) From 3f20ade8b640227909c35d6b3448839e4170dfcd Mon Sep 17 00:00:00 2001 From: Alan Shaw Date: Wed, 13 Mar 2019 16:30:15 +0000 Subject: [PATCH 5/5] chore: update deps --- package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 1e87728e9..615c2417e 100644 --- a/package.json +++ b/package.json @@ -82,8 +82,8 @@ "cross-env": "^5.2.0", "dirty-chai": "^2.0.1", "eslint-plugin-react": "^7.11.1", - "go-ipfs-dep": "~0.4.19-0", - "interface-ipfs-core": "github:ipfs/interface-js-ipfs-core#fix/go-ipfs-0419-ls-file-sizes", + "go-ipfs-dep": "~0.4.19", + "interface-ipfs-core": "~0.99.0", "ipfsd-ctl": "~0.42.0", "nock": "^10.0.2", "pull-stream": "^3.6.9",