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:
parent
5491c3f942
commit
5d55f0368e
|
@ -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'});
|
||||
|
|
Loading…
Reference in New Issue