react-native/local-cli
Héctor Ramos f4d627c8fa Fix failure due to missing Metro flow types
Summary:
Fixes the Flow failure due to an undefined Ast type.

Before:

```
 $ npm run flow -- check

> react-native@1000.0.0 flow /Users/hramos/git/react-native
> flow "check"

Error: local-cli/__tests__/fs-mock-test.js:27
 27:   beforeEach(() => {
       ^^^^^^^^^^ beforeEach. Could not resolve name

Error: local-cli/__tests__/fs-mock-test.js:53
 53:       expect(content).toEqual('beep');
           ^^^^^^ expect. Could not resolve name

Error: local-cli/__tests__/fs-mock-test.js:88
 88:         expect(content).toEqual('hello, world!');
             ^^^^^^ expect. Could not resolve name

Error: local-cli/__tests__/fs-mock-test.js:100
100:       expect(content).toEqual('hello, world!');
           ^^^^^^ expect. Could not resolve name

Error: node_modules/metro/src/Bundler/util.js.flow:46
 46: ): Ast {
        ^^^ Ast. Could not resolve name

Error: node_modules/metro/src/ModuleGraph/worker/collect-dependencies.js.flow:283
283: const xp = (module.exports = (ast: Ast) =>
                                        ^^^ Ast. Could not resolve name

Error: node_modules/metro/src/assetTransformer.js.flow:29
 29: ): Promise<{ast: Ast}> {
                      ^^^ Ast. Could not resolve name
```

After

```
$ npm run flow -- check

> react-native@1000.0.0 flow /Users/hramos/git/react-native
> flow "check"

Error: local-cli/__tests__/fs-mock-test.js:27
 27:   beforeEach(() => {
       ^^^^^^^^^^ beforeEach. Could not resolve name

Error: local-cli/__tests__/fs-mock-test.js:53
 53:       expect(content).toEqual('beep');
           ^^^^^^ expect. Could not resolve name

Error: local-cli/__tests__/fs-mock-test.js:88
 88:         expect(content).toEqual('hello, world!');
             ^^^^^^ expect. Could not resolve name

Error: local-cli/__tests__/fs-mock-test.js:100
100:       expect(content).toEqual('hello, world!');
           ^^^^^^ expect. Could not resolve name
```

[ GENERAL ] [ BUGFIX] [ .flowconfig ] - Have Flow ignore Metro node_nodules
Closes https://github.com/facebook/react-native/pull/17187

Differential Revision: D6572303

Pulled By: hramos

fbshipit-source-id: aa256b9725970fcc2a6da6578c83e7c0875e3cfd
2017-12-14 15:19:08 -08:00
..
__mocks__ metro-buck: add e2e testing of command 2017-12-11 11:18:52 -08:00
__tests__ metro-buck: add e2e testing of command 2017-12-11 11:18:52 -08:00
bundle Export Config/defaults on Metro's main module 2017-11-29 04:45:47 -08:00
core Rename metro-bundler to metro 2017-11-29 03:35:29 -08:00
dependencies Rename ReactPackager -> Metro 2017-11-29 07:00:52 -08:00
eject Run eslint --fix 2017-10-09 17:46:44 -07:00
generator Run eslint --fix 2017-10-09 17:46:44 -07:00
info added info CLI command 2017-07-18 11:45:47 -07:00
init Change indentation of package.json including Jest to 2 spaces 2017-10-15 10:50:20 -07:00
install Use Yarn for Install/Uninstall CLI if available 2017-02-02 05:13:33 -08:00
library Reject local-cli promises with Error objects 2017-08-08 09:38:21 -07:00
link Adding @email tags to most of the tests 2017-11-02 06:25:03 -07:00
logAndroid Use native Promise in local-cli 2016-11-21 10:28:34 -08:00
logIOS Use native Promise in local-cli 2016-11-21 10:28:34 -08:00
runAndroid Run eslint --fix 2017-10-09 17:46:44 -07:00
runIOS Adding @email tags to most of the tests 2017-11-02 06:25:03 -07:00
server Upgrade to 1.9.1 2017-12-06 17:34:26 -08:00
templates Fix failure due to missing Metro flow types 2017-12-14 15:19:08 -08:00
upgrade New upgrading process, relying on Git 2016-11-28 08:28:35 -08:00
util Rename metro-bundler to metro 2017-11-29 03:35:29 -08:00
.eslintrc Disallow trailing commas in react-native-github 2017-08-17 16:20:04 -07:00
cli.js packager: centralize babelRegisterOnly callsites 2017-01-06 06:13:54 -08:00
cliEntry.js @allow-large-files Flow v0.54.0 2017-09-06 03:33:43 -07:00
commands.js added info CLI command 2017-07-18 11:45:47 -07:00
setup_env.bat Fix comments on .bat file 2015-10-28 21:36:07 -04:00
setup_env.sh CLI: Adding shebang to setup_env.sh script 2017-05-31 02:46:23 -07:00
wrong-react-native.js Fix local-cli's installedGlobally check to work on Windows platforms 2017-12-04 11:17:10 -08:00