Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Embed request as dependency #16

Closed
moehlone opened this issue Jan 4, 2018 · 2 comments
Closed

Embed request as dependency #16

moehlone opened this issue Jan 4, 2018 · 2 comments

Comments

@moehlone
Copy link

moehlone commented Jan 4, 2018

Hi there,

why is request not installed as dependency in request-promise-native? I think it is overhead to install it manually when only using request-promise-native - people who use dependency checkers will have failing pipelines, because it is unused. Or is there another reason?

Best
Philipp

@mastermatt
Copy link

This comment/question/request is better suited for the https://github.com/request/promise-core repo. That being said, my two cents:

Setting request as a peer would changes the way npm saves that lib in the dependency graph. In the case of simple dep graphs, having a dep next to versus nested under makes no difference. However, if you consider this lib a plugin to the request ecosystem (which I believe the core devs do) then it does make a difference because as soon as you add more than one plugin, the behavior changes in how those plugins interact.

If the core devs do not consider this lib a plugin, then request should be added as a dep of promise-core and that would be that.

As a note: back when the dependancies of this repo were defined (pre-npm3) peerDependencies would auto-install just like dependencies.

@analog-nico
Copy link
Member

Great thoughts @mastermatt ! Since you mention the pre-npm3 era, it’s not a relict from that time. In a few words, npm does not have the perfect type of dependency that would suit the relationship of both libs. For further details, please have a look at my Was moving request to peerDependencies the best choice? issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants