-
Notifications
You must be signed in to change notification settings - Fork 297
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
Was moving request to peerDependencies the best choice? #142
Comments
Sorry to bump an old thread, I was having conflicting issues with the latest versions of request (2.81.0) and request-promise (4.2.1). I wasn't able to use the object literal as an argument when passing into rp(...). It worked well with a string URI. Do we need to specifically save request@2.34.0? Thanks! Node.js v5.12.0 |
Hi @ConAntonakos , I just reran the CI build with |
Thanks, @analog-nico! It was weird because the latest version that works for me right now is 2.79.0, but not 2.81.0. I appreciate the help, and I apologize again for the bump. |
My pleasure @ConAntonakos ! |
Ok, figured it out! I added the Leaving it here in case it helps anyone else! 😄 Here was my old configuration:
And the updated one:
|
I've got a project that (by normal |
@lorenwest explained in #137 a drawback of
request
being a peerDependency:Fortunately,
request-promise
loosely depends onrequest@^2.34
. However, issues will indeed occur oncerequest@3
is released if not all libraries used in a project that depend onrequest
are updated at the same time.Just for reference I created a package that also requires
request
as a peerDependency but an older version^1.9.9
. I got this output when installing it into a project withrequest-promise
already installed:Defining
request
as a regular dependency would resolve this but also reopen multiple issues which requested to moverequest
intopeerDependencies
in order to have more control over the used version ofrequest
:request
version in the project.request
version in a library used by many projects.IMHO, all available solutions are not perfect:
request
as a regular dependency with a loose defined version^2.34
: See issues above.request
as a regular dependency with a pinned version: This alternative is maybe the best solution. I just ignored it until now becauserequest-promise
,request-promise-native
,request-promise-any
would need to be updated every time a newrequest
version is released.request
as a peer dependency with a loose defined version^2.34
: See @lorenwest 's arguments above.request
as a peer dependency with a pinned version: Not an option because this would immediately clash with other libs.request
as a peer dependency with an even looser defined version>=2.34
:npm
would not complain oncerequest@3
is released but with thatrequest-promise
'spackage.json
would loose its power to specify with whichrequest
versions it is compatible with. At first it probably won't be compatible withrequest@3
– we expect big changes – and afterrequest-promise
is updated it probably won't be compatible withrequest@2
.This is a tough one...
The text was updated successfully, but these errors were encountered: