@@ -7,7 +7,7 @@ import { spawn, SpawnFailure } from "bufout";
7
7
import { oraPromise } from "ora" ;
8
8
import { packageDirectorySync } from "pkg-dir" ;
9
9
10
- import { getLatestMtime , prettyPath } from "../path-utils" ;
10
+ import { prettyPath } from "../path-utils" ;
11
11
12
12
const HOST_PACKAGE_ROOT = path . resolve ( __dirname , "../../.." ) ;
13
13
// FIXME: make this configurable with reasonable fallback before public release
@@ -77,24 +77,23 @@ export const command = new Command("vendor-hermes")
77
77
"ReactCommon/jsi/jsi/"
78
78
) ;
79
79
80
- if (
81
- fs . existsSync ( reactNativeJsiPath ) &&
82
- ( force ||
83
- getLatestMtime ( hermesJsiPath ) > getLatestMtime ( reactNativeJsiPath ) )
84
- ) {
85
- await oraPromise (
86
- fs . promises . cp ( hermesJsiPath , reactNativeJsiPath , {
87
- recursive : true ,
88
- } ) ,
89
- {
90
- text : `Copying JSI from Hermes to React Native` ,
91
- successText : "Copied JSI from Hermes to React Native" ,
92
- failText : ( err ) =>
93
- `Failed to copy JSI from Hermes to React Native: ${ err . message } ` ,
94
- isEnabled : ! silent ,
95
- }
96
- ) ;
97
- }
80
+ assert (
81
+ fs . existsSync ( hermesJsiPath ) ,
82
+ `Hermes JSI path does not exist: ${ hermesJsiPath } `
83
+ ) ;
84
+
85
+ await oraPromise (
86
+ fs . promises . cp ( hermesJsiPath , reactNativeJsiPath , {
87
+ recursive : true ,
88
+ } ) ,
89
+ {
90
+ text : `Copying JSI from patched Hermes to React Native` ,
91
+ successText : "Copied JSI from patched Hermes to React Native" ,
92
+ failText : ( err ) =>
93
+ `Failed to copy JSI from Hermes to React Native: ${ err . message } ` ,
94
+ isEnabled : ! silent ,
95
+ }
96
+ ) ;
98
97
console . log ( hermesPath ) ;
99
98
} catch ( error ) {
100
99
if ( error instanceof SpawnFailure ) {
0 commit comments