File tree Expand file tree Collapse file tree 2 files changed +14
-20
lines changed
Expand file tree Collapse file tree 2 files changed +14
-20
lines changed Original file line number Diff line number Diff line change 11{
22 "name" : " react-native-update-cli" ,
3- "version" : " 1.34.2 " ,
3+ "version" : " 1.35.0 " ,
44 "description" : " Command tools for javaScript updater with `pushy` service for react native apps." ,
55 "main" : " index.js" ,
66 "bin" : {
Original file line number Diff line number Diff line change @@ -53,31 +53,25 @@ async function runReactNativeBundleCommand(
5353
5454 let cliPath ;
5555
56- try {
57- // rn >= 0.75
58- cliPath = require . resolve ( '@react-native-community/cli/build/bin.js' , {
59- paths : [ process . cwd ( ) ] ,
60- } ) ;
61- } catch ( e ) {
62- // rn < 0.75
63- cliPath = require . resolve ( 'react-native/local-cli/cli.js' , {
64- paths : [ process . cwd ( ) ] ,
65- } ) ;
66- }
67-
6856 let usingExpo = false ;
6957 try {
70- require . resolve ( 'expo-router' , {
71- paths : [ process . cwd ( ) ] ,
72- } ) ;
73-
74- console . log ( `expo-router detected, will use @expo/cli to bundle.\n` ) ;
75- // if using expo-router, use expo-cli
7658 cliPath = require . resolve ( '@expo/cli' , {
7759 paths : [ process . cwd ( ) ] ,
7860 } ) ;
7961 usingExpo = true ;
80- } catch ( e ) { }
62+ } catch ( e ) {
63+ try {
64+ // rn >= 0.75
65+ cliPath = require . resolve ( '@react-native-community/cli/build/bin.js' , {
66+ paths : [ process . cwd ( ) ] ,
67+ } ) ;
68+ } catch ( e ) {
69+ // rn < 0.75
70+ cliPath = require . resolve ( 'react-native/local-cli/cli.js' , {
71+ paths : [ process . cwd ( ) ] ,
72+ } ) ;
73+ }
74+ }
8175 const bundleCommand = usingExpo ? 'export:embed' : 'bundle' ;
8276
8377 Array . prototype . push . apply ( reactNativeBundleArgs , [
You can’t perform that action at this time.
0 commit comments