Skip to content

feat: enhance peer dependency rules#4876

Merged
zkochan merged 7 commits into
pnpm:mainfrom
TravisJRyan:feat/enhance-peer-warning-control
Jun 13, 2022
Merged

feat: enhance peer dependency rules#4876
zkochan merged 7 commits into
pnpm:mainfrom
TravisJRyan:feat/enhance-peer-warning-control

Conversation

@TravisJRyan

Copy link
Copy Markdown
Contributor

Issue
Ref #4835

Summary
This PR adds two enhancements to peerDependencyRules:

  • Expands ignoreMissing support with pattern matching
  • Adds a comparable ignoreVersion field to peer dependency rules which will allow any version of a given peer dependency (also pattern-matched) to exist. Pnpm already supports this with exhaustively listed dependencies and a "*" for allowed version, so this field adds comparable functionality to the ignoreMissing above with a pattern-matched list.

Justification
This should allow pnpm greater control of peer dependency warnings without encouraging silencing warnings with something like a "silence all warnings" flag, as discussed in the issue. Users will have greater flexibility on which peer warnings (dependency missing or version-related) that they ignore and reduce noise.

Open to any feedback. Thanks for having a look.

@TravisJRyan TravisJRyan requested a review from zkochan as a code owner June 10, 2022 17:25
@welcome

welcome Bot commented Jun 10, 2022

Copy link
Copy Markdown

💖 Thanks for opening this pull request! 💖
Please be patient and we will get back to you as soon as we can.

@TravisJRyan TravisJRyan changed the title fear: enhance peer dependency rules feat: enhance peer dependency rules Jun 10, 2022

@zkochan zkochan left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add changesets

Comment thread packages/core/src/install/createPeerDependencyPatcher.ts Outdated
Comment thread packages/core/test/install/createPeerDependencyPatcher.test.ts Outdated
Comment thread packages/core/src/install/createPeerDependencyPatcher.ts Outdated
Comment thread packages/core/src/install/createPeerDependencyPatcher.ts Outdated
Comment thread packages/core/src/install/createPeerDependencyPatcher.ts Outdated
@zkochan zkochan requested a review from a team June 13, 2022 00:14
@TravisJRyan

Copy link
Copy Markdown
Contributor Author

@zkochan Thanks for your follow-up on this - let me know if you need anything else from me to move ahead with this.

@zkochan zkochan merged commit fb5bbfd into pnpm:main Jun 13, 2022
@welcome

welcome Bot commented Jun 13, 2022

Copy link
Copy Markdown

Congrats on merging your first pull request! 🎉🎉🎉

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.

2 participants