From 5d55f0368ee696fcd6c1b0d03e3948297215cc8b Mon Sep 17 00:00:00 2001 From: Mike Grabowski Date: Mon, 10 Sep 2018 16:10:25 -0700 Subject: [PATCH] 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 --- local-cli/init/init.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/local-cli/init/init.js b/local-cli/init/init.js index 54324c152..24446fcee 100644 --- a/local-cli/init/init.js +++ b/local-cli/init/init.js @@ -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'});