Remove the subscriptions-transport-ws peer dependency#235
Remove the subscriptions-transport-ws peer dependency#235jaydenseric merged 1 commit intojaydenseric:masterfrom
Conversation
jaydenseric
left a comment
There was a problem hiding this comment.
I totally agree, and your PR is how I originally had it. The thing is, I had users complain that Yarn “Berry” PnP strict mode apparently required the peer dependencies to be declared in this package, see:
What do you think about it? I don't use Yarn, so I'm not sure if the situation has changed and it's safe to remove the extra peer dependencies again.
|
Unfortunately this still happens with yarn 2.3.3. I was not aware of this behavior, but was able to reproduce it by publishing myself a test version of this lib and running: rm -rf /tmp/test-peer && mkdir /tmp/test-peer && cd /tmp/test-peer && yarn set version berry && yarn --version && yarn init && yarn add apollo-upload-client-test-without-peer @apollo/client graphqlThis would lead to the following output: Where we can see that yarn complains about Anyway, since apollo 3.2.1 subscriptions-transport-ws is also optional. So the only peer we need to match is graphql itself. I updated my PR accordingly. |
|
Should we also mark |
|
There is no need to mention I also tested it out with my test package. Right now if you run the command mentionned in This would get you this correct output: Another proof that it is not necessary is the fact that |
jaydenseric
left a comment
There was a problem hiding this comment.
We need to add a changelog.md entry that includes this PR link.
|
done in a squashed commit |
It can be safely removed because it’s not used by this package and it’s now an optional @apollo/client peer dependency.
|
Published in |
Because @apollo/client is declared as a hard dependencies, and it
itself declare its own dependencies, there is no need to match them here,
since we don't reference any of those packages in our code.