-
Notifications
You must be signed in to change notification settings - Fork 24.3k
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
[Codegen] Extract the function createParserErrorCapturer into a single function in the parsers/utils.js file #34934
Conversation
…turer in a shared file
This one is a bit crazy :D
Base commit: 1fc27c4 |
Base commit: 1fc27c4 |
@rshest has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator. |
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.
Amazing jobs, especially with the unit tests! 👏 👏 👏
This pull request was successfully merged by @MaeIg in 38fcafe. When will my fix make it into a release? | Upcoming Releases |
… in the parsers/utils.js file (facebook#34934) Summary: This PR aims to reduce code duplication by extracting `createParserErrorCapturer` function from the flow and typescript folders into a shared parsers/utils.js file. It is a task of facebook#34872: > Extract the function createParserErrorCapturer ([Flow](https://github.com/facebook/react-native/blob/main/packages/react-native-codegen/src/parsers/flow/utils.js#L122-L143) [TypeScript](https://github.com/facebook/react-native/blob/main/packages/react-native-codegen/src/parsers/typescript/utils.js#L114-L135)) into a single function in the parsers/utils.js file and replace its invocation with this new function. ## Changelog <!-- Help reviewers and the release process by writing your own changelog entry. For an example, see: https://reactnative.dev/contributing/changelogs-in-pull-requests --> [Internal] [Changed] - Extract the function createParserErrorCapturer into a single function in the parsers/utils.js file Pull Request resolved: facebook#34934 Test Plan: yarn flow: <img width="628" alt="image" src="https://user-images.githubusercontent.com/40902940/194948886-d6763e39-ea07-4004-86cc-5287c4783012.png"> yarn lint: <img width="509" alt="image" src="https://user-images.githubusercontent.com/40902940/194948916-3e54afa5-7e0b-4a61-ac18-8ec306d8c6d4.png"> yarn jest react-native-codegen: <img width="386" alt="image" src="https://user-images.githubusercontent.com/40902940/194948966-d1e5b12e-02ab-4d53-a4bf-6abaf4d70fbe.png"> Reviewed By: cipolleschi Differential Revision: D40256048 Pulled By: cipolleschi fbshipit-source-id: 098519a17d6e3128d236c639b246a706f9dbf66d
Summary
This PR aims to reduce code duplication by extracting
createParserErrorCapturer
function from the flow and typescript folders into a shared parsers/utils.js file. It is a task of #34872:Changelog
[Internal] [Changed] - Extract the function createParserErrorCapturer into a single function in the parsers/utils.js file
Test Plan
yarn flow:
yarn lint:
yarn jest react-native-codegen: