Skip to content

Add graphql to peerDependencies#196

Merged
jaydenseric merged 3 commits intojaydenseric:masterfrom
adriencohen:master
Jun 28, 2020
Merged

Add graphql to peerDependencies#196
jaydenseric merged 3 commits intojaydenseric:masterfrom
adriencohen:master

Conversation

@adriencohen
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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.

2 participants