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

fix: add missing dependencies #1663

Merged
merged 2 commits into from
Nov 14, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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"
},
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We get the following warning now when installing dependencies for js-ipfs:

npm WARN [email protected] requires a peer of electron-webrtc@~0.3.0 but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] requires a peer of wrtc@~0.2.1 but none is installed. You must install peer dependencies yourself.

This makes people think that those dependencies are required when they are not. @achingbrain @hugomrdias do you think these should be moved to optionalDependencies instead?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

With optional they get installed and Jenkins goes crazy 😑😑 . It's missing some lib to compile

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🙄 it shouldn't break...reading the docs, that seems to be the whole point of optionalDependencies...

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, remove them for now as they were before...?

"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