mirror of
https://github.com/status-im/react-native.git
synced 2025-01-10 01:25:39 +00:00
f847fbe021
Summary: In <= 0.44, the default implementation of getProjectRoots() came from `local-cli/core/default.config.js`. With changes happening in the CLI and the packager over the course of the last two months, various pieces of this logic (specifically `local-cli/utils/Config.js`) were rewritten, and though default.config.js was still being imported and used in `local-cli/core/index.js`, the default `getProjectRoots()` was being overriden by the defaults specified in `local-cli/utils/Config.js`. This PR moves the logic from default.config.js into Config.js and index.js, as appropriate. Specifically: - The `getProjectCommands()`, `getProjectConfig()`, and `getDependencyConfig()` methods, which have traditionally not been part of the rn-cli.config.js spec, are now defined in `local-cli/core/index.js`. - The `getProjectRoots()` method, which contained logic for properly resolving the _actual_ project root as well as resolving symlinks within that root, has been moved to `local-cli/utils/Config.js`, to match the fact that other default rn-cli.config.js definitions live there. Closes https://github.com/facebook/react-native/pull/14412 Differential Revision: D5216887 Pulled By: hramos fbshipit-source-id: 7a3840ecf0ad8ea3f6d7bbd3d54e4f02950c6a32