Skip to content

[Codegen] extract emitPromise from parsers modules to shared parsers-primitives#34935

Closed
AntoineDoubovetzky wants to merge 4 commits into
facebook:mainfrom
AntoineDoubovetzky:refactor/extract-emitPromise-function
Closed

[Codegen] extract emitPromise from parsers modules to shared parsers-primitives#34935
AntoineDoubovetzky wants to merge 4 commits into
facebook:mainfrom
AntoineDoubovetzky:refactor/extract-emitPromise-function

Conversation

@AntoineDoubovetzky
Copy link
Copy Markdown

Summary

This PR is a task from #34872:

Extract the content of the case 'Promise' (Flow, TypeScript) into a single emitPromise function in the parsers-primitives.js file. Use the new function in the parsers.

Note that this PR should be merged after #34933

Changelog

[Internal] [Changed] - Extract contents of the case 'Promise' into a single emitPromise function inside parsers-primitives

Test Plan

I tested using jest and flow commands.

@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

analysis-bot commented Oct 10, 2022

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

Base commit: f8996f1
Branch: main

@analysis-bot
Copy link
Copy Markdown

analysis-bot commented Oct 10, 2022

Platform Engine Arch Size (bytes) Diff
android hermes arm64-v8a 7,768,182 -30
android hermes armeabi-v7a 7,169,296 -39
android hermes x86 8,081,411 -42
android hermes x86_64 8,053,024 -35
android jsc arm64-v8a 9,629,382 -26
android jsc armeabi-v7a 8,393,808 -24
android jsc x86 9,578,801 -13
android jsc x86_64 10,171,894 -20

Base commit: 2f58e52
Branch: main

@rshest
Copy link
Copy Markdown
Contributor

rshest commented Oct 11, 2022

This PR is a bit confusing, tbh... the title says one thing, but the code does at least two other things?.. :)

@AntoineDoubovetzky
Copy link
Copy Markdown
Author

AntoineDoubovetzky commented Oct 11, 2022

@rshest This PR depends on #34933 that extracts assertGenericTypeAnnotationHasExactlyOneTypeParameter and that's why #34933 should be merged first and then we should rebase this PR.
About the title there was indeed a copy/paste error, I corrected.

@AntoineDoubovetzky AntoineDoubovetzky changed the title [Codegen] extract emitDouble from parsers modules to shared parsers-primitives [Codegen] extract emitPromise from parsers modules to shared parsers-primitives Oct 11, 2022
@AntoineDoubovetzky AntoineDoubovetzky force-pushed the refactor/extract-emitPromise-function branch from 6e2869c to 0ead64d Compare October 11, 2022 07:40
@rshest
Copy link
Copy Markdown
Contributor

rshest commented Oct 11, 2022

@AntoineDoubovetzky Ah, this makes sense, thanks for correcting the title!

@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.

@AntoineDoubovetzky AntoineDoubovetzky force-pushed the refactor/extract-emitPromise-function branch from 0ead64d to 1ce4c90 Compare October 11, 2022 10:40
@AntoineDoubovetzky
Copy link
Copy Markdown
Author

I rebased after adding a commit to #34933

@react-native-bot
Copy link
Copy Markdown
Collaborator

This pull request was successfully merged by @AntoineDoubovetzky in 966f3cd.

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
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