-
Notifications
You must be signed in to change notification settings - Fork 606
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
fix support for node v4 #16
Conversation
@@ -17,6 +17,8 @@ | |||
* node ./scripts/build.js /user/c/metro-bundler/packages/metro-abc/src/abc.js | |||
*/ | |||
|
|||
'use strict'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Needed to use let
and const
on Node v4.
Codecov Report
@@ Coverage Diff @@
## master #16 +/- ##
=======================================
Coverage 85.24% 85.24%
=======================================
Files 79 79
Lines 3232 3232
Branches 469 469
=======================================
Hits 2755 2755
Misses 427 427
Partials 50 50 Continue to review full report at Codecov.
|
lgtm, thank you for the fix! |
@davidaurelio has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
such code!
Node v4 support has been broken for some time, with CircleCI failing tests. That's because it needs an additional transform for the spread operator in call position. Ex
foo(...smth)
expanding tofoo.apply(null, smth)
. Also, the build script was using syntax not supported by Node v4.This changeset fixes the build script, and adds the missing transform. This will be used both for jest test and for the produced production output. This is needed for prod output since we want it to be able to be ran on Node v4 out-of-the-box.
CircleCI will confirm these changes work properly on all supported versions of Node.