@@ -22,7 +22,6 @@ import { printErrorHelp, printNextSteps, printUsedRNVersion } from './inform';
22
22
23
23
const FALLBACK_BOB_VERSION = '0.32.0' ;
24
24
const FALLBACK_NITRO_MODULES_VERSION = '0.18.0' ;
25
- const FALLBACK_NITRO_CODEGEN_VERSION = '0.18.0' ;
26
25
27
26
yargs
28
27
. command (
@@ -54,10 +53,6 @@ async function create(_argv: yargs.Arguments<Args>) {
54
53
'react-native-nitro-modules' ,
55
54
FALLBACK_NITRO_MODULES_VERSION
56
55
) ;
57
- const nitroCodegenVersionPromise = resolveNpmPackageVersion (
58
- 'nitro-codegen' ,
59
- FALLBACK_NITRO_CODEGEN_VERSION
60
- ) ;
61
56
62
57
const local = await promptLocalLibrary ( argv ) ;
63
58
const folder = await promptPath ( argv , local ) ;
@@ -79,14 +74,18 @@ async function create(_argv: yargs.Arguments<Args>) {
79
74
assertUserInput ( questions , answers ) ;
80
75
81
76
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 ;
84
82
85
83
const config = generateTemplateConfiguration ( {
86
84
versions : {
87
85
bob : bobVersion ,
88
86
nitroModules : nitroModulesVersion ,
89
- nitroCodegen : nitroCodegenVersion ,
87
+ // Nitro codegen's version is always the same as nitro modules version.
88
+ nitroCodegen : nitroModulesVersion ,
90
89
} ,
91
90
basename,
92
91
answers,
0 commit comments