-
Notifications
You must be signed in to change notification settings - Fork 4.6k
Types: Update to be compatible with React 19 #71374
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
Conversation
|
Size Change: 0 B Total Size: 1.92 MB ℹ️ View Unchanged
|
|
Flaky tests detected in a47ef54. 🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/17270878534
|
|
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message. To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
Mamaduka
left a comment
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.
Thanks for cherry-picking these changes, @tyxla!
|
Looks like |
|
Seems like a coincidence. The type changes would have failed at build and shouldn't actually affect the app's behavior. Examining the traces, I see errors related to the inline scripts, but I am unable to reproduce them locally. @sirreal, do you think this could be related to the changes from WordPress/wordpress-develop@62f89e9? Screenshots
|
I did not expect any negative impact from that, the encoding should be equivalent, but I've been surprised before. I also landed some changes to include sourceURL comments in inline scripts that touch this area. I can't commit to look closely before Monday, but if this is not resolved on Monday I'll investigate then. |
|
I don't think these could possibly break any e2e test. These are just compatible type changes, and they don't fail the build. |
|
It does seem like the sourceURL comments are to blame. Revert in WordPress/wordpress-develop#9671. |
|
After the revert in Core the test is passing again. |


What?
Removes usage of types that are deprecated in React 19 in favor of their recommended counterparts.
Why?
To prepare for React 19 compatibility.
See #71336 for the full effort.
See #61521 for the PR where these commits are coming from.
How?
We're removing usage of a few types that were deprecated in React 19 in favor of their recommended counterparts:
ReactChild:ReactElement | number | stringReactNodeArray:ReadonlyArray< ReactNode >ReactFragment:Iterable< ReactNode >ReactText:number | stringPulls in part of #61521 to be landed separately.
Testing Instructions
Verify all checks are green.
Testing Instructions for Keyboard
None
Screenshots or screencast
None