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

Makes peerDependenciesMeta imply peerDependencies #531

Merged
merged 3 commits into from
Oct 14, 2019

Conversation

arcanis
Copy link
Member

@arcanis arcanis commented Oct 14, 2019

What's the problem this PR addresses?

Some projects are concerned about printing warnings to their users, and prefer not to list their peer dependencies to avoid that. We've solved this a while ago with optional peer dependencies, but the npm registry has a bug that prevents the npm client to leverage this information (Yarn isn't affected). Because of this, the field adoption is lower than it should be, which hurts the JavaScript ecosystem.

How did you fix it?

This diff makes the peerDependenciesMeta field imply a generic peerDependencies (on *). This way, even if the npm installs will still suffer from bogus hoisting (because they'll have no idea about the peer dependencies), at least Yarn won't be hit. And if they fix the bug later down the road, they'll directly benefit from peerDependenciesMeta being more widespread.

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.

1 participant