Skip to content
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

RN preset: support async iterators, for await of #747

Conversation

newyankeecodeshop
Copy link
Contributor

@newyankeecodeshop newyankeecodeshop commented Dec 4, 2021

Summary

Async Generators and for await are part of ES2018. This PR adds plugin-proposal-async-generator-functions to the react native preset.
See https://babeljs.io/docs/en/babel-plugin-proposal-async-generator-functions

Fixes #551

Test plan

I added a test transforms async generators to index-test.js.

@facebook-github-bot facebook-github-bot added CLA Signed Shared with React Native Team labels Dec 4, 2021
@newyankeecodeshop
Copy link
Contributor Author

newyankeecodeshop commented Jan 3, 2022

Happy New Year @motiz88 are you able to review this?

@newyankeecodeshop
Copy link
Contributor Author

newyankeecodeshop commented Jan 17, 2022

Hi @rh389 , can you or someone at Meta give this a look please? I'm happy to make changes or close it if you're not interested in metro including support for async iterators.

@robhogan
Copy link
Contributor

robhogan commented Jan 17, 2022

Pulling this in for a closer look - thanks!

@facebook-github-bot
Copy link
Contributor

facebook-github-bot commented Jan 17, 2022

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

{
dev: true,
type: 'module',
unstable_transformProfile: 'hermes-stable',
Copy link
Contributor

@motiz88 motiz88 Jan 17, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we remove this line and test the default transform profile instead? Alternatively we can have a separate test for hermes-stable, but the main test should exercise the default profile.

Copy link
Contributor Author

@newyankeecodeshop newyankeecodeshop Jan 17, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure, will do

@facebook-github-bot
Copy link
Contributor

facebook-github-bot commented Jan 18, 2022

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

ericanderson added a commit to ericanderson/metro that referenced this issue Feb 9, 2022
* upstream/main:
  Use node devtools url (facebook#761)
  Publish 0.68.0
  fix(website): add Algolia search API key (facebook#726)
  Change github actions trigger to use `main` branch (facebook#769)
  RN preset: support async iterators, for await of (facebook#747)
  Deploy 0.171.0 to xplat
nevilm-lt pushed a commit to nevilm-lt/metro that referenced this issue Mar 14, 2022
Summary:
**Summary**

Async Generators and `for await` are part of ES2018. This PR adds `plugin-proposal-async-generator-functions` to the react native preset.
See https://babeljs.io/docs/en/babel-plugin-proposal-async-generator-functions

Fixes facebook#551

**Test plan**

I added a test `transforms async generators` to `index-test.js`.

Pull Request resolved: facebook#747

Reviewed By: motiz88

Differential Revision: D33621536

Pulled By: rh389

fbshipit-source-id: 0e07e6132e894fb5ad455627c2a33674f904a2fc
nevilm-lt pushed a commit to nevilm-lt/metro that referenced this issue Apr 21, 2022
Summary:
**Summary**

Async Generators and `for await` are part of ES2018. This PR adds `plugin-proposal-async-generator-functions` to the react native preset.
See https://babeljs.io/docs/en/babel-plugin-proposal-async-generator-functions

Fixes facebook#551

**Test plan**

I added a test `transforms async generators` to `index-test.js`.

Pull Request resolved: facebook#747

Reviewed By: motiz88

Differential Revision: D33621536

Pulled By: rh389

fbshipit-source-id: 0e07e6132e894fb5ad455627c2a33674f904a2fc
nevilm-lt pushed a commit to nevilm-lt/metro that referenced this issue Apr 22, 2022
Summary:
**Summary**

Async Generators and `for await` are part of ES2018. This PR adds `plugin-proposal-async-generator-functions` to the react native preset.
See https://babeljs.io/docs/en/babel-plugin-proposal-async-generator-functions

Fixes facebook#551

**Test plan**

I added a test `transforms async generators` to `index-test.js`.

Pull Request resolved: facebook#747

Reviewed By: motiz88

Differential Revision: D33621536

Pulled By: rh389

fbshipit-source-id: 0e07e6132e894fb5ad455627c2a33674f904a2fc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed Shared with React Native Team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants