Skip to content

[Codegen] Extract the function createParserErrorCapturer into a single function in the parsers/utils.js file#34934

Closed
MaeIg wants to merge 4 commits into
facebook:mainfrom
MaeIg:refactor/extract-createParserErrorCapturer-function
Closed

[Codegen] Extract the function createParserErrorCapturer into a single function in the parsers/utils.js file#34934
MaeIg wants to merge 4 commits into
facebook:mainfrom
MaeIg:refactor/extract-createParserErrorCapturer-function

Conversation

@MaeIg
Copy link
Copy Markdown
Contributor

@MaeIg MaeIg commented Oct 10, 2022

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:

Extract the function createParserErrorCapturer (Flow TypeScript) into a single function in the parsers/utils.js file and replace its invocation with this new function.

Changelog

[Internal] [Changed] - Extract the function createParserErrorCapturer into a single function in the parsers/utils.js file

Test Plan

yarn flow:
image

yarn lint:
image

yarn jest react-native-codegen:
image

@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Oct 10, 2022
@analysis-bot
Copy link
Copy Markdown

Platform Engine Arch Size (bytes) Diff
android hermes arm64-v8a 7,768,182 -312
android hermes armeabi-v7a 7,169,296 -152
android hermes x86 8,081,411 -228
android hermes x86_64 8,053,024 -107
android jsc arm64-v8a 9,629,382 +0
android jsc armeabi-v7a 8,393,808 +0
android jsc x86 9,578,801 +0
android jsc x86_64 10,171,894 +0

Base commit: 1fc27c4
Branch: main

@analysis-bot
Copy link
Copy Markdown

Platform Engine Arch Size (bytes) Diff
ios - universal n/a --

Base commit: 1fc27c4
Branch: main

@facebook-github-bot
Copy link
Copy Markdown
Contributor

@rshest has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

Copy link
Copy Markdown
Contributor

@cipolleschi cipolleschi left a 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! 👏 👏 👏

@react-native-bot
Copy link
Copy Markdown
Collaborator

This pull request was successfully merged by @MaeIg in 38fcafe.

When will my fix make it into a release? | Upcoming Releases

@react-native-bot react-native-bot added the Merged This PR has been merged. label Oct 11, 2022
@MaeIg MaeIg deleted the refactor/extract-createParserErrorCapturer-function branch October 11, 2022 15:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. hacktoberfest-accepted Merged This PR has been merged.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants