mirror of
https://github.com/status-im/metro.git
synced 2025-02-28 10:40:32 +00:00
Summary: This diff cleans up some cruft and adds some features: * It removes the usage of an env variable to control workers. * It removes the lazy and handwavy calculation on how many workers to use for jest-haste-map. Jest itself uses the maximum amount of workers available and it has never been reported as an issue – especially since it is a one-time startup cost of about 3 seconds on a cold cache only. * It adds a `--max-workers` flag to replace the env variable. This one is able to control both the number of workers for `jest-haste-map` as well as the transformers. * It makes the transformers run in the parent process if 1 or fewer workers are are specified. This should help with debugging. Once you approve this diff, I will publish a new version of metro to npm and update the version used in RN and remove the use of the env variable altogether: https://our.intern.facebook.com/intern/biggrep/?corpus=xplat&filename=&case=false&view=default&extre=&s=REACT_NATIVE_MAX_WORKERS&engine=apr_strmatch&context=false&filter[uninteresting]=false&filter[intern]=false&filter[test]=false&grep_regex= Note: the process of adding a CLI option is really broken. Commander also has a weird API. We should consider building a better public API for Metro and then consider how to build a new CLI on top of it and simplify our internal integration. I really don't like how Metro is integrated across pieces of the RN cli in ways that is hard to manage. But that is a larger task for another time :) Reviewed By: jeanlauliac Differential Revision: D5217726 fbshipit-source-id: 74efddbb87755a9e744c816fbc62efa21f6a79bf
47 lines
1.2 KiB
JSON
47 lines
1.2 KiB
JSON
{
|
|
"version": "0.8.1",
|
|
"name": "metro-bundler",
|
|
"description": "🚇 The JavaScript bundler for React Native.",
|
|
"main": "build/index.js",
|
|
"repository": {
|
|
"type": "git",
|
|
"url": "git@github.com:facebook/metro-bundler.git"
|
|
},
|
|
"dependencies": {
|
|
"absolute-path": "^0.0.0",
|
|
"async": "^2.4.0",
|
|
"babel-core": "^6.24.1",
|
|
"babel-generator": "^6.24.1",
|
|
"babel-plugin-external-helpers": "^6.18.0",
|
|
"babel-preset-es2015-node": "^6.1.1",
|
|
"babel-preset-fbjs": "^2.1.0",
|
|
"babel-preset-react-native": "^1.9.1",
|
|
"babel-register": "^6.24.1",
|
|
"babylon": "^6.17.0",
|
|
"chalk": "^1.1.1",
|
|
"concat-stream": "^1.6.0",
|
|
"core-js": "^2.2.2",
|
|
"debug": "^2.2.0",
|
|
"denodeify": "^1.2.1",
|
|
"fbjs": "0.8.12",
|
|
"graceful-fs": "^4.1.3",
|
|
"image-size": "^0.3.5",
|
|
"jest-haste-map": "^20.0.4",
|
|
"json-stable-stringify": "^1.0.1",
|
|
"json5": "^0.4.0",
|
|
"left-pad": "^1.1.3",
|
|
"lodash": "^4.16.6",
|
|
"merge-stream": "^1.0.1",
|
|
"mime-types": "2.1.11",
|
|
"mkdirp": "^0.5.1",
|
|
"request": "^2.79.0",
|
|
"rimraf": "^2.5.4",
|
|
"source-map": "^0.5.6",
|
|
"temp": "0.8.3",
|
|
"throat": "^3.0.0",
|
|
"uglify-es": "^3.0.15",
|
|
"write-file-atomic": "^1.2.0",
|
|
"xpipe": "^1.0.5"
|
|
}
|
|
}
|