Fix Metro preset version (#21034)

Summary: This pull request removes the hard-coded version of the `metro-react-native-babel-preset` as defined in the `init` command. That way, the version always matches React Native version specified in its `package.json`, making it match Metro version.

Differential Revision: D9759540

Pulled By: hramos

fbshipit-source-id: 90835442e2db1900851cbfb8c3c625229184d851
This commit is contained in:
Mike Grabowski 2018-09-10 16:10:25 -07:00 committed by Facebook Github Bot
parent 5491c3f942
commit 5d55f0368e
1 changed files with 1 additions and 1 deletions

View File

@ -99,7 +99,7 @@ function generateProject(destinationRoot, newProjectName, options) {
});
}
if (!options['skip-jest']) {
const jestDeps = `jest babel-jest metro-react-native-babel-preset@^0.43.5 react-test-renderer@${reactVersion}`;
const jestDeps = `jest babel-jest metro-react-native-babel-preset react-test-renderer@${reactVersion}`;
if (yarnVersion) {
console.log('Adding Jest...');
execSync(`yarn add ${jestDeps} --dev --exact`, {stdio: 'inherit'});