From 2c09ad7459a33f5c692de2e4db00e912ca8ab9ea Mon Sep 17 00:00:00 2001 From: John Dean Date: Sat, 25 Mar 2017 12:51:13 -0500 Subject: [PATCH 1/3] Use bitcore-lib as a peerDependency --- package.json | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index f8df68d..1a7ebf5 100644 --- a/package.json +++ b/package.json @@ -22,14 +22,15 @@ "type": "git", "url": "https://github.com/bitpay/bitcore-message.git" }, - "dependencies": { - "bitcore-lib": "^0.13.7" - }, + "dependencies": {}, "devDependencies": { "bitcore-build": "bitpay/bitcore-build", "brfs": "^1.3.0", "chai": "~1.10.0", "gulp": "^3.8.10" }, + "peerDependencies": { + "bitcore-lib": "^0.14" + }, "license": "MIT" } From c090e45f6e397ee087984184124f8b37404054af Mon Sep 17 00:00:00 2001 From: John Dean Date: Sat, 25 Mar 2017 13:36:12 -0500 Subject: [PATCH 2/3] Explicitly install bitcore-lib --- .travis.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.travis.yml b/.travis.yml index f2d7cd0..2f24aec 100644 --- a/.travis.yml +++ b/.travis.yml @@ -7,5 +7,6 @@ before_install: - sh -e /etc/init.d/xvfb start install: - npm install + - npm install bitcore-lib after_script: - gulp coveralls From b2347d07fdf5afaf04441e73ed84daa66fd01291 Mon Sep 17 00:00:00 2001 From: John Dean Date: Sat, 25 Mar 2017 17:45:38 -0500 Subject: [PATCH 3/3] Install peerDependencies conditionally --- .travis.yml | 4 +++- package.json | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 2f24aec..df6277c 100644 --- a/.travis.yml +++ b/.travis.yml @@ -6,7 +6,9 @@ before_install: - export DISPLAY=:99.0 - sh -e /etc/init.d/xvfb start install: + # Install peerDependencies on > npm3 + # When all dependencies declare bitcore-lib as a peerDependency this can be bumped up, but this matches the current ecosystem version expected by dependencies + - if [ $(npm --version | sed 's/\..*//g') -ge 3 ]; then npm install bitcore-lib@0.13.7; fi - npm install - - npm install bitcore-lib after_script: - gulp coveralls diff --git a/package.json b/package.json index 1a7ebf5..4c524f7 100644 --- a/package.json +++ b/package.json @@ -30,7 +30,7 @@ "gulp": "^3.8.10" }, "peerDependencies": { - "bitcore-lib": "^0.14" + "bitcore-lib": "~0.13.7" }, "license": "MIT" }