@@ -1868,12 +1868,21 @@ export var releaseReact = (
1868
1868
: getReactNativeProjectAppVersion ( command , projectName ) ;
1869
1869
1870
1870
if ( command . sourcemapOutputDir && command . sourcemapOutput ) {
1871
- log ( '\n"sourcemap-output-dir" argument will be ignored as "sourcemap-output" argument is provided.\n' ) ;
1871
+ log (
1872
+ '\n"sourcemap-output-dir" argument will be ignored as "sourcemap-output" argument is provided.\n'
1873
+ ) ;
1872
1874
}
1873
1875
1874
- if ( ( command . outputDir || command . sourcemapOutputDir ) && ! command . sourcemapOutput ) {
1875
- const sourcemapDir = command . sourcemapOutputDir || releaseCommand . package ;
1876
- command . sourcemapOutput = path . join ( sourcemapDir , bundleName + ".map" ) ;
1876
+ if (
1877
+ ( command . outputDir || command . sourcemapOutputDir ) &&
1878
+ ! command . sourcemapOutput
1879
+ ) {
1880
+ const sourcemapDir =
1881
+ command . sourcemapOutputDir || releaseCommand . package ;
1882
+ command . sourcemapOutput = path . join (
1883
+ sourcemapDir ,
1884
+ bundleName + ".map"
1885
+ ) ;
1877
1886
}
1878
1887
1879
1888
return appVersionPromise ;
@@ -2198,6 +2207,15 @@ function getHermesOSExe(): string {
2198
2207
}
2199
2208
}
2200
2209
2210
+ function getHermescOSExe ( ) : string {
2211
+ switch ( process . platform ) {
2212
+ case "win32" :
2213
+ return "hermesc.exe" ;
2214
+ default :
2215
+ return "hermesc" ;
2216
+ }
2217
+ }
2218
+
2201
2219
function getHermesCommand ( ) : string {
2202
2220
const fileExists = ( file : string ) : boolean => {
2203
2221
try {
@@ -2207,15 +2225,28 @@ function getHermesCommand(): string {
2207
2225
}
2208
2226
} ;
2209
2227
// assume if hermes-engine exists it should be used instead of hermesvm
2210
- const hermesEngine = path . join (
2228
+ // check hermes-engine/hermesc [email protected] +
2229
+ const hermesEngineHermesc = path . join (
2230
+ "node_modules" ,
2231
+ "hermes-engine" ,
2232
+ getHermesOSBin ( ) ,
2233
+ getHermescOSExe ( )
2234
+ ) ;
2235
+ if ( fileExists ( hermesEngineHermesc ) ) {
2236
+ return hermesEngineHermesc ;
2237
+ }
2238
+ // checke hermes-engine/hermes
2239
+ const hermesEngineHermes = path . join (
2211
2240
"node_modules" ,
2212
2241
"hermes-engine" ,
2213
2242
getHermesOSBin ( ) ,
2214
2243
getHermesOSExe ( )
2215
2244
) ;
2216
- if ( fileExists ( hermesEngine ) ) {
2217
- return hermesEngine ;
2245
+ if ( fileExists ( hermesEngineHermes ) ) {
2246
+ return hermesEngineHermes ;
2218
2247
}
2248
+
2249
+ // fallback to hermesvm
2219
2250
return path . join ( "node_modules" , "hermesvm" , getHermesOSBin ( ) , "hermes" ) ;
2220
2251
}
2221
2252
0 commit comments