react-native
react-native copied to clipboard
chore: Unify codegen Flow and TS default case from translateTypeAnnotation
Summary
This PR unifies the Flow and TS default: case from codegen translateTypeAnnotation function into a single function
called translateDefault inside parser-commons.js as requested on https://github.com/facebook/react-native/issues/34872.
Changelog
[Internal] [Changed] - Unify codegen Flow and TS default case from translateTypeAnnotation
Test Plan
Run yarn jest react-native-codegen and ensure CI is green

PR build artifact for bc8600f9494b85b49e96499b66c5fcec7aa26b71 is ready.
To use, download tarball from "Artifacts" tab in this CircleCI job then run yarn add <path to tarball> in your React Native project.
PR build artifact for 347d80775e1d64bfe3589c30a33b0568ddcd8fb5 is ready.
To use, download tarball from "Artifacts" tab in this CircleCI job then run yarn add <path to tarball> in your React Native project.
PR build artifact for 9dad211d05e2d199ecb58150253d4b9620b78ba8 is ready.
To use, download tarball from "Artifacts" tab in this CircleCI job then run yarn add <path to tarball> in your React Native project.
| Platform | Engine | Arch | Size (bytes) | Diff |
|---|---|---|---|---|
| ios | - | universal | n/a | -- |
Base commit: 76c7ccaa60c4e820757c5d8cd8ccc80a2cb5f4a0 Branch: main
| Platform | Engine | Arch | Size (bytes) | Diff |
|---|---|---|---|---|
| android | hermes | arm64-v8a | 7,003,350 | -19 |
| android | hermes | armeabi-v7a | 6,379,695 | -18 |
| android | hermes | x86 | 7,416,186 | -30 |
| android | hermes | x86_64 | 7,280,093 | -19 |
| android | jsc | arm64-v8a | 8,868,346 | +5 |
| android | jsc | armeabi-v7a | 7,606,652 | -6 |
| android | jsc | x86 | 8,926,232 | -5 |
| android | jsc | x86_64 | 9,409,473 | -8 |
Base commit: 76c7ccaa60c4e820757c5d8cd8ccc80a2cb5f4a0 Branch: main
PR build artifact for 5af6ddd73913d77d9e5f496e4f5060fbba4eecb6 is ready.
To use, download tarball from "Artifacts" tab in this CircleCI job then run yarn add <path to tarball> in your React Native project.
Hi @cipolleschi FYI I've updated this to address all your comments
@gabrieldonadel thank you so much! The code looks 😚 👌 Could you rebase so that I can import and (try to) land it?
@gabrieldonadel thank you so much! The code looks 😚 👌 Could you rebase so that I can import and (try to) land it?
Thanks! I've just rebased it
@cipolleschi has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.
PR build artifact for d99269cca97e465bace813cc0ce45325174a5941 is ready.
To use, download tarball from "Artifacts" tab in this CircleCI job then run yarn add <path to tarball> in your React Native project.
PR build artifact for 207daa042982a06301753f14214902dd764b2204 is ready.
To use, download tarball from "Artifacts" tab in this CircleCI job then run yarn add <path to tarball> in your React Native project.
PR build artifact for c7851a697eeba2bc41258f1bb41ee6eb514c109f is ready.
To use, download tarball from "Artifacts" tab in this CircleCI job then run yarn add <path to tarball> in your React Native project.
@cipolleschi has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.
This pull request was successfully merged by @gabrieldonadel in ea55e3bf8d6c419023baf63a6b4feb117ae5c24a.
When will my fix make it into a release? | Upcoming Releases