Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: enhance peer dependency rules #4876

Merged
merged 7 commits into from Jun 13, 2022

Conversation

TravisJRyan
Copy link
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.

@welcome
Copy link

welcome bot commented Jun 10, 2022

💖 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
Copy link
Member

@zkochan zkochan left a comment

Choose a reason for hiding this comment

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

Add changesets

packages/core/src/install/createPeerDependencyPatcher.ts Outdated Show resolved Hide resolved
packages/core/src/install/createPeerDependencyPatcher.ts Outdated Show resolved Hide resolved
packages/core/src/install/createPeerDependencyPatcher.ts Outdated Show resolved Hide resolved
packages/core/src/install/createPeerDependencyPatcher.ts Outdated Show resolved Hide resolved
@zkochan zkochan requested a review from a team June 13, 2022 00:14
@TravisJRyan
Copy link
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
Copy link

welcome bot commented Jun 13, 2022

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.

None yet

2 participants