File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed
packages/create-react-native-library/src Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -21,6 +21,8 @@ const NATIVE_COMMON_FILES = path.resolve(
21
21
'../templates/native-common'
22
22
) ;
23
23
24
+ const FALLBACK_BOB_VERSION = '0.18.0' ;
25
+
24
26
// Java
25
27
const JAVA_FILES = ( moduleType : ModuleType ) => {
26
28
switch ( moduleType ) {
@@ -324,7 +326,7 @@ async function create(argv: yargs.Arguments<any>) {
324
326
try {
325
327
version = await Promise . race ( [
326
328
new Promise < string > ( ( resolve ) =>
327
- setTimeout ( ( ) => resolve ( version ) , 1000 )
329
+ setTimeout ( ( ) => resolve ( FALLBACK_BOB_VERSION ) , 1000 )
328
330
) ,
329
331
new Promise < string > ( ( resolve , reject ) => {
330
332
const npm = spawn ( 'npm' , [
@@ -341,12 +343,12 @@ async function create(argv: yargs.Arguments<any>) {
341
343
] ) ;
342
344
} catch ( e ) {
343
345
// Fallback to a known version if we couldn't fetch
344
- version = '0.18.0' ;
346
+ version = FALLBACK_BOB_VERSION ;
345
347
}
346
348
347
349
const options = {
348
350
bob : {
349
- version,
351
+ version : version || FALLBACK_BOB_VERSION ,
350
352
} ,
351
353
project : {
352
354
slug,
You can’t perform that action at this time.
0 commit comments