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

Add support for React 18 and later to jest-preset-default #44680

Merged
merged 1 commit into from
Oct 5, 2022

Conversation

PooSham
Copy link
Contributor

@PooSham PooSham commented Oct 4, 2022

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 and react-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

@github-actions
Copy link

github-actions bot commented Oct 4, 2022

👋 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.

@github-actions github-actions bot added the First-time Contributor Pull request opened by a first-time contributor to Gutenberg repository label Oct 4, 2022
Copy link
Member

@gziolo gziolo left a 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 gziolo requested review from tyxla and ciampo October 5, 2022 13:36
@gziolo gziolo added [Tool] Jest preset /packages/jest-preset-default [Type] Enhancement A suggestion for improvement. labels Oct 5, 2022
@PooSham PooSham mentioned this pull request Oct 5, 2022
@PooSham
Copy link
Contributor Author

PooSham commented Oct 5, 2022

@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?

@gziolo
Copy link
Member

gziolo commented Oct 5, 2022

I have no idea. Let’s try to run it again.

Copy link
Member

@tyxla tyxla left a 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.

@gziolo gziolo merged commit 46179e2 into WordPress:trunk Oct 5, 2022
@github-actions
Copy link

github-actions bot commented Oct 5, 2022

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!

@github-actions github-actions bot added this to the Gutenberg 14.4 milestone Oct 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
First-time Contributor Pull request opened by a first-time contributor to Gutenberg repository [Tool] Jest preset /packages/jest-preset-default [Type] Enhancement A suggestion for improvement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants