This repository was archived by the owner on Feb 12, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 4 files changed +15
-7
lines changed Expand file tree Collapse file tree 4 files changed +15
-7
lines changed Original file line number Diff line number Diff line change 44
44
"release-minor" : " aegir release --type minor -t node -t browser" ,
45
45
"release-major" : " aegir release --type major -t node -t browser" ,
46
46
"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'"
48
49
},
49
50
"repository" : {
50
51
"type" : " git" ,
87
88
"cid-tool" : " ~0.1.0" ,
88
89
"cids" : " ~0.5.5" ,
89
90
"debug" : " ^4.1.0" ,
91
+ "deep-extend" : " ~0.6.0" ,
90
92
"err-code" : " ^1.1.2" ,
91
93
"file-type" : " ^10.2.0" ,
92
94
"fnv1a" : " ^1.0.1" ,
142
144
"multiaddr-to-uri" : " ^4.0.0" ,
143
145
"multibase" : " ~0.5.0" ,
144
146
"multihashes" : " ~0.4.14" ,
147
+ "multihashing-async" : " ~0.5.1" ,
145
148
"once" : " ^1.4.0" ,
146
149
"peer-book" : " ~0.8.0" ,
147
150
"peer-id" : " ~0.12.0" ,
148
151
"peer-info" : " ~0.14.1" ,
149
152
"progress" : " ^2.0.1" ,
150
153
"promisify-es6" : " ^1.0.3" ,
154
+ "protons" : " ^1.0.1" ,
151
155
"pull-abortable" : " ^4.1.1" ,
152
156
"pull-catch" : " ^1.0.0" ,
153
157
"pull-defer" : " ~0.2.3" ,
168
172
"temp" : " ~0.8.3" ,
169
173
"update-notifier" : " ^2.5.0" ,
170
174
"yargs" : " ^12.0.2" ,
175
+ "varint" : " ^5.0.0" ,
171
176
"yargs-promise" : " ^1.1.0"
172
177
},
173
178
"optionalDependencies" : {
174
179
"prom-client" : " ^11.1.3" ,
175
180
"prometheus-gc-stats" : " ~0.6.0"
176
181
},
182
+ "peerDependencies" : {
183
+ "electron-webrtc" : " ~0.3.0" ,
184
+ "wrtc" : " ~0.2.1"
185
+ },
177
186
"contributors" : [
178
187
179
188
Original file line number Diff line number Diff line change @@ -5,7 +5,7 @@ const PeerInfo = require('peer-info')
5
5
const multiaddr = require ( 'multiaddr' )
6
6
const waterfall = require ( 'async/waterfall' )
7
7
const Keychain = require ( 'libp2p-keychain' )
8
- const extend = require ( 'deep-extend ' )
8
+ const defaultsDeep = require ( '@nodeutils/defaults-deep ' )
9
9
const NoKeychain = require ( './no-keychain' )
10
10
/*
11
11
* Load stuff from Repo into memory
@@ -22,7 +22,7 @@ module.exports = function preStart (self) {
22
22
return cb ( null , config )
23
23
}
24
24
25
- extend ( config , self . _options . config )
25
+ config = defaultsDeep ( self . _options . config , config )
26
26
27
27
self . config . replace ( config , ( err ) => {
28
28
if ( err ) {
Original file line number Diff line number Diff line change @@ -12,7 +12,7 @@ const PeerBook = require('peer-book')
12
12
const multibase = require ( 'multibase' )
13
13
const CID = require ( 'cids' )
14
14
const debug = require ( 'debug' )
15
- const extend = require ( 'deep-extend ' )
15
+ const defaultsDeep = require ( '@nodeutils/defaults-deep ' )
16
16
const EventEmitter = require ( 'events' )
17
17
18
18
const config = require ( './config' )
@@ -62,7 +62,7 @@ class IPFS extends EventEmitter {
62
62
constructor ( options ) {
63
63
super ( )
64
64
65
- this . _options = {
65
+ const defaults = {
66
66
init : true ,
67
67
start : true ,
68
68
EXPERIMENTAL : { } ,
@@ -77,7 +77,7 @@ class IPFS extends EventEmitter {
77
77
78
78
options = config . validate ( options || { } )
79
79
80
- extend ( this . _options , options )
80
+ this . _options = defaultsDeep ( options , defaults )
81
81
82
82
if ( options . init === false ) {
83
83
this . _options . init = false
Original file line number Diff line number Diff line change 2
2
3
3
const CID = require ( 'cids' )
4
4
const multipart = require ( 'ipfs-multipart' )
5
- const Buffer = require ( 'safe-buffer' ) . Buffer
6
5
const debug = require ( 'debug' )
7
6
const log = debug ( 'jsipfs:http-api:block' )
8
7
log . error = debug ( 'jsipfs:http-api:block:error' )
You can’t perform that action at this time.
0 commit comments