-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
Pinning dependencies behaves differently than npm. #681
Comments
Note that a manual edit to the |
Perhaps the right solution is a |
Something like |
This issue seems to be fixed. Let me know if it's not.
|
This issue was fixed, but now I'm seeing it again with v0.27.3. (It was working in v0.24.6.) package.json: "dependencies": {
"color-parse": "1.2.0",
"left-pad": "1.1.1"
} yarn v0.24.6:
yarn v0.27.3:
npm v5.0.4:
|
Do you want to request a feature or report a bug?
Bug, or at least a behavior deviation.
What is the current behavior?
Pinning a package to an exact version in package.json does not also pin it for dependencies, even if the pinned version satisfied the range.
If the current behavior is a bug, please provide the steps to reproduce.
I've created a reproduction repository here.
In short, I've pinned
left-pad
to1.1.1
at the root, which satisfiescolor-parse
's dependency of"left-pad": "^1.1.1"
. However, yarn gives1.1.3
to color-parse, and1.1.1
to the root. npm just uses1.1.1
for both.Note the differences in the npm & yarn tree:
npm 3.10.3
yarn
What is the expected behavior?
I would expect that because a stricter definition of a root-level dependency satisfies the sub-dependency's version, it is used instead.
Please mention your node.js, yarn and operating system version.
Node 6.7.0, OSX 10.11, yarn 0.15.1 & npm 3.10.3.
This can be fixed by editing the yarn.lock directly but this could be error-prone.
The text was updated successfully, but these errors were encountered: