Skip to content
This repository was archived by the owner on Feb 12, 2024. It is now read-only.

Commit 4bcf4a7

Browse files
hugomrdiasAlan Shaw
authored and
Alan Shaw
committed
fix: add missing dependencies (#1663)
1 parent 345ce91 commit 4bcf4a7

File tree

4 files changed

+15
-7
lines changed

4 files changed

+15
-7
lines changed

package.json

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,8 @@
4444
"release-minor": "aegir release --type minor -t node -t browser",
4545
"release-major": "aegir release --type major -t node -t browser",
4646
"coverage": "aegir coverage",
47-
"coverage-publish": "aegir-coverage publish"
47+
"coverage-publish": "aegir-coverage publish",
48+
"dep-check": "npx dependency-check package.json './test/**/*.js' './src/**/*.js'"
4849
},
4950
"repository": {
5051
"type": "git",
@@ -87,6 +88,7 @@
8788
"cid-tool": "~0.1.0",
8889
"cids": "~0.5.5",
8990
"debug": "^4.1.0",
91+
"deep-extend": "~0.6.0",
9092
"err-code": "^1.1.2",
9193
"file-type": "^10.2.0",
9294
"fnv1a": "^1.0.1",
@@ -142,12 +144,14 @@
142144
"multiaddr-to-uri": "^4.0.0",
143145
"multibase": "~0.5.0",
144146
"multihashes": "~0.4.14",
147+
"multihashing-async": "~0.5.1",
145148
"once": "^1.4.0",
146149
"peer-book": "~0.8.0",
147150
"peer-id": "~0.12.0",
148151
"peer-info": "~0.14.1",
149152
"progress": "^2.0.1",
150153
"promisify-es6": "^1.0.3",
154+
"protons": "^1.0.1",
151155
"pull-abortable": "^4.1.1",
152156
"pull-catch": "^1.0.0",
153157
"pull-defer": "~0.2.3",
@@ -168,12 +172,17 @@
168172
"temp": "~0.8.3",
169173
"update-notifier": "^2.5.0",
170174
"yargs": "^12.0.2",
175+
"varint": "^5.0.0",
171176
"yargs-promise": "^1.1.0"
172177
},
173178
"optionalDependencies": {
174179
"prom-client": "^11.1.3",
175180
"prometheus-gc-stats": "~0.6.0"
176181
},
182+
"peerDependencies": {
183+
"electron-webrtc": "~0.3.0",
184+
"wrtc": "~0.2.1"
185+
},
177186
"contributors": [
178187
"0xflotus <[email protected]>",
179188

src/core/components/pre-start.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ const PeerInfo = require('peer-info')
55
const multiaddr = require('multiaddr')
66
const waterfall = require('async/waterfall')
77
const Keychain = require('libp2p-keychain')
8-
const extend = require('deep-extend')
8+
const defaultsDeep = require('@nodeutils/defaults-deep')
99
const NoKeychain = require('./no-keychain')
1010
/*
1111
* Load stuff from Repo into memory
@@ -22,7 +22,7 @@ module.exports = function preStart (self) {
2222
return cb(null, config)
2323
}
2424

25-
extend(config, self._options.config)
25+
config = defaultsDeep(self._options.config, config)
2626

2727
self.config.replace(config, (err) => {
2828
if (err) {

src/core/index.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ const PeerBook = require('peer-book')
1212
const multibase = require('multibase')
1313
const CID = require('cids')
1414
const debug = require('debug')
15-
const extend = require('deep-extend')
15+
const defaultsDeep = require('@nodeutils/defaults-deep')
1616
const EventEmitter = require('events')
1717

1818
const config = require('./config')
@@ -62,7 +62,7 @@ class IPFS extends EventEmitter {
6262
constructor (options) {
6363
super()
6464

65-
this._options = {
65+
const defaults = {
6666
init: true,
6767
start: true,
6868
EXPERIMENTAL: {},
@@ -77,7 +77,7 @@ class IPFS extends EventEmitter {
7777

7878
options = config.validate(options || {})
7979

80-
extend(this._options, options)
80+
this._options = defaultsDeep(options, defaults)
8181

8282
if (options.init === false) {
8383
this._options.init = false

src/http/api/resources/block.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22

33
const CID = require('cids')
44
const multipart = require('ipfs-multipart')
5-
const Buffer = require('safe-buffer').Buffer
65
const debug = require('debug')
76
const log = debug('jsipfs:http-api:block')
87
log.error = debug('jsipfs:http-api:block:error')

0 commit comments

Comments
 (0)