Join GitHub today
GitHub is home to over 50 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
|
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.
|
|
Try the following example and
|
|
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 |
|
So this is a feature request? |
|
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. |
|
Maybe we could handle this by checking "if a resolution does not contains a wildcard |
|
I'm also going to rename this issue to make it more indicative of the feature request. |
|
Hi can I take this up? |
|
can I take this up? |
|
Sure, do you need help with creating a PR or do you know the needed steps? |
|
Hi, I want to contribute to this issue. Can you please walk me through the steps about how to do a git pull? |
|
@farjanaHuq first ensure that you fork the repo to your own account. After this clone the repository to your computer using some terminal / shell. Then create a new branch, check it out, work on the needed files, commit the changes and push to your fork. After this you can create the PR here. Did you already check https://help.github.com/en/github/collaborating-with-issues-and-pull-requests/creating-a-pull-request for the needed steps? With which exact step do you need help? |
|
@DanielRuf Is this issue still open? There is a pull request from @gonzachr. |
|
@mehulbechra as you can see the issue is still open. I do not know what the current status is, I did not open this issue. At least the PR is not merged and still open. So I guess this is still unresolved. |
…ependency Closes yarnpkg#7320.


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