Skip to content

chore: optional jest peer dep #1101

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

Merged
merged 1 commit into from
Sep 9, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,13 @@
"peerDependencies": {
"react": ">=16.0.0",
"react-native": ">=0.59",
"react-test-renderer": ">=16.0.0"
"react-test-renderer": ">=16.0.0",
"jest": ">=28.0.0"
},
"peerDependenciesMeta": {
"jest": {
"optional": true
Copy link
Member

Choose a reason for hiding this comment

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

does this work with npm too? otherwise jest will be installed as a part of npm install

Copy link
Member Author

Choose a reason for hiding this comment

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

Copy link
Member

Choose a reason for hiding this comment

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

FYI. npm 8 is available since node 16. node 14 and 15 has npm 7

Copy link
Member Author

Choose a reason for hiding this comment

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

Npm v7 docs also mentions support for peerDepsMeta + optional: https://docs.npmjs.com/cli/v7/configuring-npm/package-json#peerdependenciesmeta

}
},
"scripts": {
"clean": "del build",
Expand Down