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

Add graphql to peerDependencies #196

Merged
merged 3 commits into from Jun 28, 2020
Merged

Add graphql to peerDependencies #196

merged 3 commits into from Jun 28, 2020

Conversation

adriencohen
Copy link
Contributor

Quick PR to support yarn berry. As apollo-link and apollo-link-http-common have graphql as a peerDependencies this package should also have it

@jaydenseric
Copy link
Owner

I'm not so sure, graphql is not imported or directly used anywhere in this codebase.

What specific problem would this PR alleviate? I'm not familiar what it has to do with Yarn berry.

@adriencohen
Copy link
Contributor Author

PnP strict mode (default one) of yarn berry is now following this rule:

PnP operating under strict mode will prevent packages to require dependencies that they don't explicitly list (even if one of their others dependencies happens to depend on it)
(https://yarnpkg.com/features/pnp)

This mean that as this package is using apollo-link which has graphql as a peer dependencies yarn will show the following errors:

➤ YN0002: │ apollo-upload-client@npm:13.0.0 doesn't provide graphql@^0.11.3 || ^0.12.3 || ^0.13.0 || ^14.0.0 || ^15.0.0 requested by apollo-link@npm:1.2.14
➤ YN0002: │ apollo-upload-client@npm:13.0.0 doesn't provide graphql@^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0 || ^15.0.0 requested by apollo-link-http-common@npm:0.2.16

Obviously yarn offers a way to fix this locally with packageExtensions but it's better if it's directly in the package.json of the library.

I came across this article if you want more informations: https://dev.to/arcanis/implicit-transitive-peer-dependencies-ed0

Copy link
Owner

@jaydenseric jaydenseric left a comment

Choose a reason for hiding this comment

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

Thanks for your contribution, and the additional explanation :)

@jaydenseric jaydenseric merged commit b52dfb2 into jaydenseric:master Jun 28, 2020
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