From eb76a63fd8105a5d08d8005dfbcabde938da637e Mon Sep 17 00:00:00 2001 From: Vasco Santos Date: Wed, 4 Sep 2019 18:36:09 +0200 Subject: [PATCH] chore: remove pubsub flags BREAKING CHANGE: pubsub flags for in-proc daemons will not set values anymore --- package.json | 2 +- src/ipfsd-in-proc.js | 11 +---------- test/spawn-options.spec.js | 2 +- 3 files changed, 3 insertions(+), 12 deletions(-) diff --git a/package.json b/package.json index e2eb5180..41a78d63 100644 --- a/package.json +++ b/package.json @@ -87,7 +87,7 @@ "dirty-chai": "^2.0.1", "go-ipfs-dep": "~0.4.22", "husky": "^3.0.4", - "ipfs": "ipfs/js-ipfs#master", + "ipfs": "~0.37.1", "is-running": "^2.1.0", "lint-staged": "^9.2.5", "proxyquire": "^2.1.3", diff --git a/src/ipfsd-in-proc.js b/src/ipfsd-in-proc.js index 0ff251dc..ddd0ef8d 100644 --- a/src/ipfsd-in-proc.js +++ b/src/ipfsd-in-proc.js @@ -36,19 +36,11 @@ class InProc extends EventEmitter { this.bits = this.opts.initOptions ? this.opts.initOptions.bits : null this.opts.EXPERIMENTAL = defaultsDeep({}, opts.EXPERIMENTAL, { - pubsub: false, sharding: false }) - this.opts.pubsub = defaultsDeep({}, opts.pubsub, { - enabled: false - }) this.opts.args.forEach((arg) => { - if (arg === '--enable-pubsub-experiment') { - this.opts.EXPERIMENTAL.pubsub = true - } else if (arg === '--enable-pubsub') { - this.opts.pubsub.enabled = true - } else if (arg === '--enable-sharding-experiment') { + if (arg === '--enable-sharding-experiment') { this.opts.EXPERIMENTAL.sharding = true } else if (arg === '--enable-namesys-pubsub') { this.opts.EXPERIMENTAL.ipnsPubsub = true @@ -71,7 +63,6 @@ class InProc extends EventEmitter { offline: this.opts.offline, EXPERIMENTAL: this.opts.EXPERIMENTAL, libp2p: this.opts.libp2p, - pubsub: this.opts.pubsub, config: this.opts.config, relay: this.opts.relay }) diff --git a/test/spawn-options.spec.js b/test/spawn-options.spec.js index a62f9eb7..a469e77c 100644 --- a/test/spawn-options.spec.js +++ b/test/spawn-options.spec.js @@ -314,7 +314,7 @@ describe('Spawn options', function () { this.timeout(20 * 1000) const options = { - args: [fOpts.type !== 'go' ? '--enable-pubsub' : '--enable-pubsub-experiment'], + args: ['--enable-namesys-pubsub'], initOptions: { bits: fOpts.bits, profile: 'test' } }