fix: prevent from logging peer-dependencies that are met #2796
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
Solves the problem where peerDependencies are warning even though they are met.
Test plan
Run
yarn add react react-dom
Before:
After:
I don't really know if the fix is legit. I removed a line of code, it may be doing something else than it was in my context, but the error is from
lib/package-resolver.js
L370, where it removes the peerDependencies we expect to have ( later adding the peerDep? ) . May need further investigation, but from the second check inlib/package-linker
, it returns undefined for the package, since it has been removed fromthis.patterns
. My suggestion, if this PR is somewhat volatile, is to check the packages you've got from the upper-tree against the ones you have, and then remove dupes.Related:
If there's anything you need for me, feel free to assign me for other stuff.
Even