Add support for React 18 and later to jest-preset-default#44680
Add support for React 18 and later to jest-preset-default#44680gziolo merged 1 commit intoWordPress:trunkfrom
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. |
|
@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. |
tyxla
left a comment
There was a problem hiding this comment.
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
reactandreact-domto">=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