yarnpkg/yarn

yarn should warn if a resolution appears to attempt to change a top level dependency

Open

#7320 opened on Jun 5, 2019

View on GitHub
 (18 comments) (0 reactions) (0 assignees)JavaScript (41,514 stars) (2,731 forks)batch import
cat-featuregood first issue

Description

Do you want to request a feature or report a bug? feature request

What is the current behavior? Currently yarn why won't indicate any package info in the resolutions field

If the current behavior is a bug, please provide the steps to reproduce.

  1. install a package with any version, e.g "pkg": "^1.0.0"
  2. add resolutions field in package.json, pkg: "1.0.0"
  3. update "pkg": "^1.0.0" to "pkg": "^2.0.0" in deps
  4. run yarn why pkg

It only displays "pkg": "^2.0.0" being used, but no info about pkg: "1.0.0", while in yarn.lock, can find pkg: "1.0.0" related info

What 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

Contributor guide