Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.
Sign upyarn should warn if a resolution appears to attempt to change a top level dependency #7320
Comments
This comment has been minimized.
This comment has been minimized.
|
Hi @sabrinaluo, according to https://yarnpkg.com/lang/en/docs/selective-version-resolutions/ it is only meant for subdependencies, not the toplevel dependencies as these would be normally set in the lockfile.
|
This comment has been minimized.
This comment has been minimized.
|
Try the following example and
|
This comment has been minimized.
This comment has been minimized.
|
Thanks to your quick response. @DanielRuf Yes I understand it's for sub-dependencies, but there might be users make mistakes like me, so it would be great if this can be improved. The case I encountered is having |
This comment has been minimized.
This comment has been minimized.
|
So this is a feature request? |
This comment has been minimized.
This comment has been minimized.
|
Yes, should be a feature request. Updated the issue type I first thought it's a bug. However, after your explanation, I understand it's not a bug yarn itself but most likely a mistake by users. |
This comment has been minimized.
This comment has been minimized.
|
Maybe we could handle this by checking "if a resolution does not contains a wildcard |
This comment has been minimized.
This comment has been minimized.
|
I'm also going to rename this issue to make it more indicative of the feature request. |
This comment has been minimized.
This comment has been minimized.
|
Hi can I take this up? |
This comment has been minimized.
This comment has been minimized.
|
can I take this up? |
This comment has been minimized.
This comment has been minimized.
|
Sure, do you need help with creating a PR or do you know the needed steps? |


Do you want to request a feature or report a bug?
feature request
What is the current behavior?
Currently
yarn whywon't indicate any package info in the resolutions fieldIf the current behavior is a bug, please provide the steps to reproduce.
"pkg": "^1.0.0"resolutionsfield in package.json,pkg: "1.0.0""pkg": "^1.0.0"to"pkg": "^2.0.0"in depsyarn why pkgIt only displays
"pkg": "^2.0.0"being used, but no info aboutpkg: "1.0.0", while in yarn.lock, can findpkg: "1.0.0"related infoWhat is the expected behavior?
expect to display resolutions package info as well
Please mention your node.js, yarn and operating system version.
yarn: 1.16.0
macOS
node: 8.16.0