You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
## What's the problem this PR addresses?
When an incompatible peer warning occurs, the warning message shown
during install simply uses the first peer requester found but that may
not have any relation to the unsatisfied request.
See #6205 (comment)
(partial fix)
## How did you fix it?
Actually find the first unsatisfied requester, prioritizing root
requesters (i.e. direct dependencies).
If an unsatisfied root requester is found, the warning message looks
similar to 4.2.2

```
➤ YN0000: ┌ Post-resolution validation
➤ YN0060: │ react is listed by your project with version 18.3.1 (pfa021), which doesn't satisfy what reflux and other dependencies request (but they have non-overlapping ranges!).
➤ YN0086: │ Some peer dependencies are incorrectly met by your project; run yarn explain peer-requirements <hash> for details, where <hash> is the six-letter p-prefixed code.
➤ YN0000: └ Completed
```
If all root requesters are satisfied, then an unsatisfied requester is
found and reported with one of the corresponding root requesters

```
➤ YN0000: ┌ Post-resolution validation
➤ YN0060: │ react is listed by your project with version 18.3.1 (pfa021), which doesn't satisfy what reflux (via @local/test-reflux-dependent) and other dependencies request
(but they have non-overlapping ranges!).
➤ YN0086: │ Some peer dependencies are incorrectly met by your project; run yarn explain peer-requirements <hash> for details, where <hash> is the six-letter p-prefixed code.
➤ YN0000: └ Completed
```
One concern I had was that it will make the message longer, but we are
already way past the common terminal width so I don't think that's a big
issue.
## Checklist
<!--- Don't worry if you miss something, chores are automatically
tested. -->
<!--- This checklist exists to help you remember doing the chores when
you submit a PR. -->
<!--- Put an `x` in all the boxes that apply. -->
- [x] I have read the [Contributing
Guide](https://yarnpkg.com/advanced/contributing).
<!-- See
https://yarnpkg.com/advanced/contributing#preparing-your-pr-to-be-released
for more details. -->
<!-- Check with `yarn version check` and fix with `yarn version check
-i` -->
- [x] I have set the packages that need to be released for my changes to
be effective.
<!-- The "Testing chores" workflow validates that your PR follows our
guidelines. -->
<!-- If it doesn't pass, click on it to see details as to what your PR
might be missing. -->
- [x] I will check that all automated PR checks pass before the PR gets
reviewed.
---------
Co-authored-by: Maël Nison <[email protected]>
0 commit comments