react
react copied to clipboard
Add hermes-transform infra
Add hermes-transform infra
This adds hermes-transform as a dependency for scripts to allow us to run some codemods updating tests.
If this turns out useful, there's obviously more that can be done to the script, but as these internal codemods are pretty one-off, I'm also okay to keep it fairly rough.
The included codemod is a starting point to convert tests to crateRoot. Due to many different patterns in tests, this does just the following:
- convert
itandexpectcalls that containReactDOM.renderto the async variant, soawaitcan be used inside. - convert
ReactDOM.render(el, container)toroot.render(el). Note that this does not createrootand that needs to be updated manually.
Stack created with Sapling. Best reviewed with ReviewStack.
- #27994
- -> #27921