Skip to content

Extract the content of the case 'StringTypeAnnotation' into a single …#34981

Closed
ken0nek wants to merge 1 commit into
facebook:mainfrom
ken0nek:work/emitString
Closed

Extract the content of the case 'StringTypeAnnotation' into a single …#34981
ken0nek wants to merge 1 commit into
facebook:mainfrom
ken0nek:work/emitString

Conversation

@ken0nek
Copy link
Copy Markdown
Contributor

@ken0nek ken0nek commented Oct 14, 2022

Summary

This PR extracts the content of the codegen case 'String' into a single emitString function inside the parsers-primitives.js file and uses it in both Flow and TypeScript parsers as requested on #34872. This also adds unit tests to the new emitString function.

ref: #34936

Changelog

[Internal] [Changed] - Extract the content of the case 'StringTypeAnnotation' into a single emitString function

Test Plan

Run yarn jest react-native-codegen and ensure CI is green

…emitString function in the parsers-primitives.js file.
@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 14, 2022
@analysis-bot
Copy link
Copy Markdown

Platform Engine Arch Size (bytes) Diff
android hermes arm64-v8a 7,777,431 +0
android hermes armeabi-v7a 7,178,422 +0
android hermes x86 8,090,425 +0
android hermes x86_64 8,062,120 +0
android jsc arm64-v8a 9,636,881 +0
android jsc armeabi-v7a 8,401,168 +0
android jsc x86 9,586,058 +0
android jsc x86_64 10,179,226 +0

Base commit: a575472
Branch: main

@analysis-bot
Copy link
Copy Markdown

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

Base commit: 8422557
Branch: main

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, thank you so much for doing this! 👏

@facebook-github-bot
Copy link
Copy Markdown
Contributor

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

@react-native-bot
Copy link
Copy Markdown
Collaborator

This pull request was successfully merged by @ken0nek in eda90e5.

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 19, 2022
@ken0nek ken0nek deleted the work/emitString branch October 25, 2022 23:58
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