chore(npm): point peer-dependency warning at the overrides remedy (#35196)#35205
Open
tsushanth wants to merge 2 commits into
Open
chore(npm): point peer-dependency warning at the overrides remedy (#35196)#35205tsushanth wants to merge 2 commits into
tsushanth wants to merge 2 commits into
Conversation
Deno Individual Contributor License AgreementThe following contributors need to sign the CLA before this PR can be merged: Click here to review and sign the CLA | Re-run CLA check This is an automated message from CLA Assistant |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Closes #35196.
The current
"The following peer dependency issues were found:"line lists the conflicts but says nothing about how to fix them. Reporters in #35196 and #32801 independently arrived at the same workaround — pinning the affected packages under"overrides"inpackage.json— but only after going through several iterations of trimming imports and finding the older issue. Putting the remedy on the line right next to the warning is the cheapest way to shortcut that.The change is a single
format!string inpeer_dep_diagnostics_to_display_treeinlibs/npm_installer/resolution.rsplus the matching.outupdate undertests/specs/install/peer_dep_specific_constraint/. The tree itself is untouched, so the existingsame_ancestor_peer_dep_messageunit test (which only asserts children counts) continues to pass.Scope notes for the maintainer:
package.jsonoverrides, sinceWorkspace::npm_overrides()readsroot_pkg_json().overridesexclusively; there's nodeno.json-side equivalent today and I'd rather not invent one in a warning message.UnmetPeerDepDiagnostic.ancestorsback up to the entry specifier, which is a bigger change than belongs in this PR.