@@ -22,7 +22,6 @@ import { printErrorHelp, printNextSteps, printUsedRNVersion } from './inform';
2222
2323const FALLBACK_BOB_VERSION = '0.32.0' ;
2424const FALLBACK_NITRO_MODULES_VERSION = '0.18.0' ;
25- const FALLBACK_NITRO_CODEGEN_VERSION = '0.18.0' ;
2625
2726yargs
2827 . command (
@@ -54,10 +53,6 @@ async function create(_argv: yargs.Arguments<Args>) {
5453 'react-native-nitro-modules' ,
5554 FALLBACK_NITRO_MODULES_VERSION
5655 ) ;
57- const nitroCodegenVersionPromise = resolveNpmPackageVersion (
58- 'nitro-codegen' ,
59- FALLBACK_NITRO_CODEGEN_VERSION
60- ) ;
6156
6257 const local = await promptLocalLibrary ( argv ) ;
6358 const folder = await promptPath ( argv , local ) ;
@@ -79,14 +74,18 @@ async function create(_argv: yargs.Arguments<Args>) {
7974 assertUserInput ( questions , answers ) ;
8075
8176 const bobVersion = await bobVersionPromise ;
82- const nitroModulesVersion = await nitroModulesVersionPromise ;
83- const nitroCodegenVersion = await nitroCodegenVersionPromise ;
77+
78+ const nitroModulesVersion =
79+ answers . type === 'nitro-module'
80+ ? await nitroModulesVersionPromise
81+ : undefined ;
8482
8583 const config = generateTemplateConfiguration ( {
8684 versions : {
8785 bob : bobVersion ,
8886 nitroModules : nitroModulesVersion ,
89- nitroCodegen : nitroCodegenVersion ,
87+ // Nitro codegen's version is always the same as nitro modules version.
88+ nitroCodegen : nitroModulesVersion ,
9089 } ,
9190 basename,
9291 answers,
0 commit comments