Skip to content

feat(why): allow specifying a version or range#6992

Open
remypar5 wants to merge 14 commits intoyarnpkg:masterfrom
remypar5:feat/6859-allow-version-range-for-yarn-why
Open

feat(why): allow specifying a version or range#6992
remypar5 wants to merge 14 commits intoyarnpkg:masterfrom
remypar5:feat/6859-allow-version-range-for-yarn-why

Conversation

@remypar5
Copy link

What's the problem this PR addresses?

Allowing users to specify a version or range for yarn why to find out why a specific version appears in the dependency tree. This is particularly useful if you want to address CVEs.

Closes #6859

How did you fix it?

  • Check if a version/range is specified and handling it accordingly
  • For both simple and recursive mode

Checklist

  • I have set the packages that need to be released for my changes to be effective.
  • I will check that all automated PR checks pass before the PR gets reviewed.

Signed-off-by: Remy Parzinski <remypar5@users.noreply.github.com>
Signed-off-by: Remy Parzinski <remypar5@users.noreply.github.com>
@remypar5
Copy link
Author

@arcanis are you available to review this? You refactored yarn why some time ago

Signed-off-by: Remy Parzinski <remypar5@users.noreply.github.com>
Signed-off-by: Remy Parzinski <remypar5@users.noreply.github.com>
Signed-off-by: Remy Parzinski <remypar5@users.noreply.github.com>
Signed-off-by: Remy Parzinski <remypar5@users.noreply.github.com>
@remypar5 remypar5 requested a review from clemyan January 6, 2026 15:39
Signed-off-by: Remy Parzinski <remypar5@users.noreply.github.com>
@clemyan clemyan dismissed their stale review January 19, 2026 16:51

Requested changes have been made

Signed-off-by: Remy Parzinski <remypar5@users.noreply.github.com>
@remypar5 remypar5 requested a review from clemyan February 11, 2026 11:11
Signed-off-by: Remy Parzinski <remypar5@users.noreply.github.com>
@remypar5 remypar5 requested a review from clemyan February 19, 2026 13:57
@clemyan
Copy link
Member

clemyan commented Feb 22, 2026

Okay, since it is a relatively simple change I went ahead and added the last couple lines of code to push this over the finishing line. The only thing I'm still iffy on is having to make a new set of fixture packages in the tests but cleaning that up can be a separate PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature] yarn why for specific package version

2 participants