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
Summary:
<!-- Thanks for submitting a pull request! Please provide enough information so that others can review your pull request. The two fields below are mandatory. -->
**Summary**
Jest Worker accepts parameter `numWorkers`, not `maxWorkers`, see:
https://github.com/facebook/jest/tree/master/packages/jest-worker#numworkers-number-optional
<!-- Explain the **motivation** for making this change. What existing problem does the pull request solve? -->
**Test plan**
<!-- Demonstrate the code is solid. Example: The exact commands you ran and their output, screenshots / videos if the pull request changes UI. -->
Closes https://github.com/facebook/metro/pull/136
Reviewed By: mjesun
Differential Revision: D7036411
Pulled By: rafeca
fbshipit-source-id: 5528ca4a9abe5a8e3668e83b214e10d97ba7a827
Summary: This diff allows Metro to throw an error when a configuration file cannot be found, by using a new strict: true option.
Reviewed By: rafeca
Differential Revision: D6998613
fbshipit-source-id: b704633be18d5c007f1a022fa811d0a74c636fc9
Summary: This diff makes the Metro CLI commands injectable into any Yargs object, so that we can override various aspects of it, add extra commands, etc.
Reviewed By: davidaurelio
Differential Revision: D6988250
fbshipit-source-id: 217c661e4c1b05282b6cdbf4d745d1b29f5cbbe0
Summary:
This exposes the `minifierPath` externally and allows it to be adjusted through the `--minifier-path` argument.
This works for both the server (when starting the server) and running a single build through the CLI.
In server mode, this can not be used per file request yet, though that should also be doable if need be.
Reviewed By: rafeca
Differential Revision: D6998562
fbshipit-source-id: 669b876c24fe117ec88b2200d48aa82658f568b4
Summary:
Includes React Native and its dependencies Fresco, Metro, and Yoga. Excludes samples/examples/docs.
find: ^(?:( *)|( *(?:[\*~#]|::))( )? *)?Copyright (?:\(c\) )?(\d{4})\b.+Facebook[\s\S]+?BSD[\s\S]+?(?:this source tree|the same directory)\.$
replace: $1$2$3Copyright (c) $4-present, Facebook, Inc.\n$2\n$1$2$3This source code is licensed under the MIT license found in the\n$1$2$3LICENSE file in the root directory of this source tree.
Reviewed By: TheSavior, yungsters
Differential Revision: D7007050
fbshipit-source-id: 37dd6bf0ffec0923bfc99c260bb330683f35553e