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

Commit

Permalink
fix: add missing dependencies
Browse files Browse the repository at this point in the history
fix: deps semver

fix: remove safe-buffer

fix: use defaults-deep instead of deep-extend

fix: rebase, sort webrtc and add more paths to dep-check

fix: change to peer deps
  • Loading branch information
hugomrdias committed Nov 14, 2018
1 parent 345ce91 commit cd12d56
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 7 deletions.
11 changes: 10 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,8 @@
"release-minor": "aegir release --type minor -t node -t browser",
"release-major": "aegir release --type major -t node -t browser",
"coverage": "aegir coverage",
"coverage-publish": "aegir-coverage publish"
"coverage-publish": "aegir-coverage publish",
"dep-check": "npx dependency-check package.json './test/**/*.js' './src/**/*.js'"
},
"repository": {
"type": "git",
Expand Down Expand Up @@ -87,6 +88,7 @@
"cid-tool": "~0.1.0",
"cids": "~0.5.5",
"debug": "^4.1.0",
"deep-extend": "~0.6.0",
"err-code": "^1.1.2",
"file-type": "^10.2.0",
"fnv1a": "^1.0.1",
Expand Down Expand Up @@ -142,12 +144,14 @@
"multiaddr-to-uri": "^4.0.0",
"multibase": "~0.5.0",
"multihashes": "~0.4.14",
"multihashing-async": "^0.5.1",
"once": "^1.4.0",
"peer-book": "~0.8.0",
"peer-id": "~0.12.0",
"peer-info": "~0.14.1",
"progress": "^2.0.1",
"promisify-es6": "^1.0.3",
"protons": "^1.0.1",
"pull-abortable": "^4.1.1",
"pull-catch": "^1.0.0",
"pull-defer": "~0.2.3",
Expand All @@ -168,12 +172,17 @@
"temp": "~0.8.3",
"update-notifier": "^2.5.0",
"yargs": "^12.0.2",
"varint": "^5.0.0",
"yargs-promise": "^1.1.0"
},
"optionalDependencies": {
"prom-client": "^11.1.3",
"prometheus-gc-stats": "~0.6.0"
},
"peerDependencies": {
"electron-webrtc": "~0.3.0",
"wrtc": "~0.2.1"
},
"contributors": [
"0xflotus <[email protected]>",
"A_A <[email protected]>",
Expand Down
4 changes: 2 additions & 2 deletions src/core/components/pre-start.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ const PeerInfo = require('peer-info')
const multiaddr = require('multiaddr')
const waterfall = require('async/waterfall')
const Keychain = require('libp2p-keychain')
const extend = require('deep-extend')
const defaultsDeep = require('@nodeutils/defaults-deep')
const NoKeychain = require('./no-keychain')
/*
* Load stuff from Repo into memory
Expand All @@ -22,7 +22,7 @@ module.exports = function preStart (self) {
return cb(null, config)
}

extend(config, self._options.config)
config = defaultsDeep(self._options.config, config)

self.config.replace(config, (err) => {
if (err) {
Expand Down
6 changes: 3 additions & 3 deletions src/core/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ const PeerBook = require('peer-book')
const multibase = require('multibase')
const CID = require('cids')
const debug = require('debug')
const extend = require('deep-extend')
const defaultsDeep = require('@nodeutils/defaults-deep')
const EventEmitter = require('events')

const config = require('./config')
Expand Down Expand Up @@ -62,7 +62,7 @@ class IPFS extends EventEmitter {
constructor (options) {
super()

this._options = {
const defaults = {
init: true,
start: true,
EXPERIMENTAL: {},
Expand All @@ -77,7 +77,7 @@ class IPFS extends EventEmitter {

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

extend(this._options, options)
this._options = defaultsDeep(options, defaults)

if (options.init === false) {
this._options.init = false
Expand Down
1 change: 0 additions & 1 deletion src/http/api/resources/block.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

const CID = require('cids')
const multipart = require('ipfs-multipart')
const Buffer = require('safe-buffer').Buffer
const debug = require('debug')
const log = debug('jsipfs:http-api:block')
log.error = debug('jsipfs:http-api:block:error')
Expand Down

0 comments on commit cd12d56

Please sign in to comment.