Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Comments

Use bitcore-lib as a peerDependency#500

Open
CaptEmulation wants to merge 5 commits intobitpay:master from
CaptEmulation:bitcore-lib-as-peer-depdency
Open

Use bitcore-lib as a peerDependency #500
CaptEmulation wants to merge 5 commits intobitpay:master from
CaptEmulation:bitcore-lib-as-peer-depdency

Conversation

@CaptEmulation
Copy link

@CaptEmulation CaptEmulation commented Mar 25, 2017
edited
Loading

One wrinkle to using the bitcore stack is the obvious need to have a singleton bitcore-lib. The bitcoin-lib package hosts the bitcoind library and there are good reasons to not wanting to have multiple bitcoind instances running on the same machine.

However, I am not a fan of the runtime check and would rather have all packages be declaring bitcoin-lib in peerDependencies. This way the enclosing package can specify whatever version of bitcoin-lib it wants and npm will inform user if there is an unmet dependency at install time rather than run time.

I have a working example of bitcore-lib running as a peerDependency at bitcore-docker-build which is also running testnet at bitcore.soapbubble.online/insight

I also updated bitcore-lib to 0.14 because bitcore-wallet-service has already done so and I figured if it was good enough for bitcoin-wallet-service it's good enough for everything else 😄

martindale reacted with thumbs up emoji
@CaptEmulation CaptEmulation force-pushed the bitcore-lib-as-peer-depdency branch 2 times, most recently from 5eb2dac to ffef84a Compare March 27, 2017 02:57
Copy link
Author

re: the travis failures on node v0.10.25 which runs with npm 1.x. Can reproduce locally. They do not occur for me locally on v0.10.48 which runs with npm 2.x. So it appears that peerDependencies only really works with >= npm2. Installing bitcore-lib on the side on npm1 just leads to the duplicate bitcore-lib problem. 😞

Copy link
Author

CaptEmulation commented May 10, 2017
edited
Loading

So are node 0.10.x and npm 1 still supported? These versions have been EOL since last year: https://github.com/nodejs/LTS#lts-schedule1

peerDependencies give you the control of enabling better control of runaway copies of installed modules as well as the install time version checks. The existing duplication check code can remain to cover issues of projects pulling in other projects that themselves have a hard dependency on bitcore-lib.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

1 participant

AltStyle によって変換されたページ (->オリジナル) /