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
jquery-ujs package installs it's own nested version of jquery when dependency should be satisfied #5561
Comments
confirmed on v1.5.1, but I suspect this issue has been in yarn for a long time. Seems to be somehow connected to: https://github.com/yarnpkg/yarn/blob/master/src/package-request.js#L207
The I don't really understand the above logic. if
so it finds the highest already-installed version that matches exactly 3.3.1. Which is why the second version of jquery is installed. @arcanis a |
Yep I remember the hoisting became less efficient at some point, it might very well be related. That being said, another issue at play here is that
You're right, that doesn't make a lot of sense :/ I think what I wanted to do was "if this is not a version but is a range, then use the one we already have if possible" (since the goal of the PR was to not do optimization when reading from the lockfile). As such the condition should probably be: const solvedRange = semver.valid(range) && !semver.validRange(range) ? range : info.version; |
Do you want to request a feature or report a bug?
Possible bug
What is the current behavior?
When installing the jquery-ujs package a nested version of jquery is installed which is different to the version specified in package.json
If the current behavior is a bug, please provide the steps to reproduce.
package.json contents:
What is the expected behavior?
The dependency of jquery-ujs is jquery >=1.8.0 so it should be satisfied by the jquery 3.2.1 already added
Please mention your node.js, yarn and operating system version.
yarn 1.5.1
node 9.9.0
osx 10.13.3
The text was updated successfully, but these errors were encountered: