-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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 support for React 18 and later to jest-preset-default #44680
Conversation
👋 Thanks for your first Pull Request and for helping build the future of Gutenberg and WordPress, @PooSham! In case you missed it, we'd love to have you join us in our Slack community, where we hold regularly weekly meetings open to anyone to coordinate with each other. If you want to learn more about WordPress development in general, check out the Core Handbook full of helpful information. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@tyxla landed PR that removed enzyme from this Jest preset so we don’t need to keep it limited to React 17 👍
@gziolo Thanks for the approval! I'm not sure why the react native e2e tests fail though. Is there something I can do about it? |
I have no idea. Let’s try to run it again. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks good to me 👍 I don't see why the failure would be related.
Congratulations on your first merged pull request, @PooSham! We'd like to credit you for your contribution in the post announcing the next WordPress release, but we can't find a WordPress.org profile associated with your GitHub account. When you have a moment, visit the following URL and click "link your GitHub account" under "GitHub Username" to link your accounts: https://profiles.wordpress.org/me/profile/edit/ And if you don't have a WordPress.org account, you can create one on this page: https://login.wordpress.org/register Kudos! |
What?
jest-preset-default only allowed for react to be of version 17.x its peer dependencies. I made it so it allows React 17 and all versions after
Why?
I don't see a reason for jest-preset-default to only allow react 17. React 18 has been out for long and is very stable. This way, developers using react 18 won't get warnings/errors about mismatching versions.
How?
I changed the peerDependencies for
react
andreact-dom
to">=17"
. I don't see what else is needed to be changed really, since I think all code still applies to react 18.Testing Instructions
Screenshots or screencast