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

Remove node-fetch from peerDependencies since it is optional #382

Merged
merged 1 commit into from
Oct 21, 2018
Merged

Remove node-fetch from peerDependencies since it is optional #382

merged 1 commit into from
Oct 21, 2018

Conversation

edmorley
Copy link
Contributor

fetch-mock v7 added a peer dependency on node-fetch, however the package is not required for browser-based usages of fetch-mock. Such projects must then either install the dependency even if they don't use it, or else have peer dependency warnings be output by their package manager.

Hopefully in the future package managers will have a way to declare optional peer dependencies (eg yarnpkg/yarn#6487), so version ranges can be enforced iff people are using the dependency - but for now it's best to omit them from peerDependencies entirely.

Fixes #377.

fetch-mock v7 added a peer dependency on `node-fetch`, however the
package is not required for browser-based usages of fetch-mock.
Such projects must then either install the dependency even if they
don't use it, or else have peer dependency warnings be output by
their package manager.

Hopefully in the future package managers will have a way to declare
optional peer dependencies (eg yarnpkg/yarn#6487), so version ranges
can be enforced iff people are using the dependency - but for now
it's best to omit them from `peerDependencies` entirely.

Fixes #377.
@wheresrhys
Copy link
Owner

Thanks

@wheresrhys wheresrhys merged commit 5fa048d into wheresrhys:master Oct 21, 2018
@edmorley edmorley deleted the rm-optional-peer-dep branch October 21, 2018 09:21
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