Summary:
**Summary**
With RN 0.52, when there was a redbox due to a syntax error in a source file (with regular, non-delta bundler), the redbox would say just "No message provided". The JSON that Metro sent to RN did not include a "message" field because `JSON.stringify(error)` does not include `message`.
**Test Plan**
Add a syntax error to one of the files in RNTester's JS and load the RNTester app (from RN master). See that the redbox now says there was a transform error with the syntax error's location.
Also tested adding a syntax error with HMR enabled and saw that the error `message` field was set in the payload as expected.
Also added a Jest test to Server-test.js.
Closes https://github.com/facebook/metro/pull/124
Differential Revision: D6728310
Pulled By: rafeca
fbshipit-source-id: 9ee3c113767d8c2849bcaac0cb8a9cfa8f2760a6
Summary: I'm working on getting CI to pass. As a first step, I'll upgrade the lerna setup to use Yarn's workspaces (when yarn is run from the Metro root) as well as upgrading Flow to the same version we use in xplat. I also copied over the Jest type definitions. This should fix all type errors for a start.
Reviewed By: davidaurelio
Differential Revision: D6361276
fbshipit-source-id: 4e8661b7d5fe4e3f6dd1e6923891bd2d23c9b4db
Summary: This put it on par with the version we use on other projects. This new version breaks assumptions about the way Promise/ticks/timers use to work, and I was not able to make it work properly synchronously. Since it's fragile anyway (because rely on Promise and feature internals), I propose the switch to async as done in this changeset. If `res.end` is not called, tests will just timeout instead.
Reviewed By: cpojer
Differential Revision: D5423823
fbshipit-source-id: 015e808a2cf2b8297a36b16feeb811a6e745a835
Summary:
It appears this is not needed to build or anything, only for metro-bundler itself.
Closes https://github.com/facebook/metro-bundler/issues/20.
Reviewed By: cpojer
Differential Revision: D5370513
fbshipit-source-id: 563b5716ca9ab1b58fc7ae1f757efc61cf946168
Summary:
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 to `foo.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.
Closes https://github.com/facebook/metro-bundler/pull/16
Differential Revision: D5319746
Pulled By: davidaurelio
fbshipit-source-id: 6c001b562b43da0625d1ac15d018117524970431