Summary:
This adds the babel register package for babel 7 to Metro
All changes are caused by yarn
Reviewed By: davidaurelio
Differential Revision: D7102279
fbshipit-source-id: a8a6db5600207b868bb10217884eb659de9778f4
Summary: Turns out we need an updated version of the babel 7 stack because the runtime depends on something in the newest version. This commit bumps various main package versions to beta.40
Reviewed By: davidaurelio
Differential Revision: D7104132
fbshipit-source-id: ff7db16f6ad82ea2a728ead63fe19b1c9dbd708c
Summary: More cleanup of `DeltaBundler` in order to move from `Bundler` to `ModuleGraph`. I am trying to remove all unrelated functionality to make the transition easier.
Reviewed By: rafeca
Differential Revision: D7100153
fbshipit-source-id: 2e0c2d4957dece27bd28d3cf7e4ff2e178c60fb2
Summary: Removes an unused type from `Bundler`
Reviewed By: jeanlauliac
Differential Revision: D7084608
fbshipit-source-id: 213a49466c9745c4bb85b8b16a8b2e4309b5a524
Summary: now that RAM bundle info building is an implementation detail, we make it part of the test rather than mocking it out.
Reviewed By: rafeca
Differential Revision: D7084580
fbshipit-source-id: edbb7b3d1aaca5513ea81d8d2c62b4b5c8e97756
Summary: Removes `getRamOptions` from `DeltaTransformer` and `Bundler` for better separation of concerns, and ultimately, porting delta functionality to `ModuleGraph`
Reviewed By: rafeca
Differential Revision: D7084487
fbshipit-source-id: e8a7ea4addbad9057e7d55627f77ebd01e64786b
Summary: This makes the plugin use the passed on babel api rather than hardcoded pulling in babel 6 or 7. This is important since they are different packages now and we need to work with them side-by-side.
Reviewed By: mjesun
Differential Revision: D7083873
fbshipit-source-id: 2ce89e0627005bb29ff8d3e0e1ac51fe8ee4eabd
Summary: Enable the flow directive for the inline tests. Changes are related to getting Flow to green.
Reviewed By: jeanlauliac
Differential Revision: D7083814
fbshipit-source-id: f5efa35181663b30d9da437ffa727b3fa8f99b5a
Summary:
Before the inline plugin was explicitly requiring babel itself. With the babel upgrade path that's a problem since it will try to pull in babel 6 even when we want babel 7 (because it's a different package name). To remedy this the plugin is now a function which will use the `types` api from the given context rather than the required global.
I also moved out the `inline` function that only seems to be used in tests. They're now just living in the tests.
Had to add some flow annotations to generic objects since Flow was complaining about missing types and that would require adding the full babel api which is outside of the scope of this task.
Reviewed By: jeanlauliac
Differential Revision: D7083815
fbshipit-source-id: 59b8365d8c3c3dc00b23a3735037dcc9483c0b2c
Summary:
**Summary**
This should fix install of the metro with npm (issue #142).
We can't have both babylon@6 and babylon@7 as deps for metro package, so as jeanlauliac suggested in https://github.com/facebook/metro/issues/142#issuecomment-368217279 lets create wrapper-package `metro-babylon7` and reexport babylon@7 from it.
**Test plan**
I do manually `yarn && yarn test` - all checks passed.
Closes https://github.com/facebook/metro/pull/143
Differential Revision: D7079144
Pulled By: rafeca
fbshipit-source-id: eeb4f6a01ad92d84dc14702dee07975e253bcf88