-
Notifications
You must be signed in to change notification settings - Fork 642
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
Remove @babel/plugin-transform-regenerator
#789
Conversation
Hermes added support for generators in 0.2.0, and JSC is ES6 feature complete since r202125.
@motiz88: It'd be great if you could make sure this doesn't break Meta internally. |
Awesome - can you please run Prettier, remove |
@motiz88 has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator. |
Looking good so far - I'm fixing up some minor Meta-internal things and planning to land this on Monday. Thanks for this, @tido64! |
This is great. I believe you can also remove |
|
@motiz88: Something's failing internally. Is it because of this change?
That's a great idea, but I think it should be a separate PR.
How do I turn this on in tests? I tried pasting some of the snapshots in Terser's REPL and Uglify's demo. Terser is fine with the generator function, but UglifyJS doesn't support it. I know uglify-es is supposed to support ES6, but it's deprecated and I see that people are trying to migrate to the former: #661 Is this going to be a problem? |
There's a bit of history here - ➜ echo "function* myGenerator(myVar) { yield myVar + 1; }" | npx uglify-js -m
function*myGenerator(e){yield e+1}
➜ echo "function* myGenerator(myVar) { yield myVar + 1; }" | npx terser -m
function*myGenerator(e){yield e+1}
➜ echo "function* myGenerator(myVar) { yield myVar + 1; }" | npx uglify-es -m
function*myGenerator(e){yield e+1} Terser was originally a fork of TL;DR: Nothing minifier-related to worry about for this PR. |
Unrelated - React Native iOS tests are broken at the moment. |
Summary: ## Summary Hermes added support for generators in 0.2.0, and JSC is ES6 feature complete since r202125. NOTE: This is a combined Metro + React Native commit. For React Native, the only change here is adding `babel/plugin-transform-regenerator` to `repo-config` ( = `devDependencies`), so the tests no longer implicitly consume it via Metro. Changelog: [Internal] X-link: facebook/metro#789 Reviewed By: rh389 Differential Revision: D34819044 Pulled By: motiz88 fbshipit-source-id: fe27b2c2af0281d5309d4c16f95762d4d4935eba
Summary: ## Summary As a follow-up to #789 , this PR removes `babel/plugin-transform-for-of` from the preset for JavaScriptCore users. Pull Request resolved: #792 Test Plan: All unit tests pass Reviewed By: motiz88 Differential Revision: D34927434 Pulled By: rh389 fbshipit-source-id: d38cd529c371ca0e13071f26c00d3a322ff5fab6
…crosoft#789) Summary: ## Summary Hermes added support for generators in 0.2.0, and JSC is ES6 feature complete since r202125. NOTE: This is a combined Metro + React Native commit. For React Native, the only change here is adding `babel/plugin-transform-regenerator` to `repo-config` ( = `devDependencies`), so the tests no longer implicitly consume it via Metro. Changelog: [Internal] X-link: facebook/metro#789 Reviewed By: rh389 Differential Revision: D34819044 Pulled By: motiz88 fbshipit-source-id: fe27b2c2af0281d5309d4c16f95762d4d4935eba
## Summary
Hermes added support for generators in 0.2.0, and JSC is ES6 feature complete since r202125.
Test plan
n/a