66// It matters since we need read .sourcedirs(location)
77// and its content are file/directories with regard to project root
88
9- import * as tty from "node:tty" ;
109import * as fs from "node:fs" ;
10+ import * as tty from "node:tty" ;
1111
12- import { bsc_exe , rescript_exe } from "./common/bins.js" ;
12+ import { bsc_exe , rescript_legacy_exe } from "./common/bins.js" ;
1313import * as bsb from "./common/bsb.js" ;
1414
1515const cwd = process . cwd ( ) ;
9494 console . log ( helpMessage ) ;
9595} else if ( argPatterns . version . includes ( args [ 0 ] ) ) {
9696 const packageSpec = JSON . parse (
97- fs . readFileSync ( new URL ( "../package.json" , import . meta. url ) , "utf-8" )
97+ fs . readFileSync ( new URL ( "../package.json" , import . meta. url ) , "utf-8" ) ,
9898 ) ;
9999
100100 console . log ( packageSpec . version ) ;
@@ -116,13 +116,13 @@ if (
116116 break ;
117117 }
118118 case "format" : {
119- const mod = await import ( "./rescript/format.js" ) ;
120- await mod . main ( subcmdArgs , rescript_exe , bsc_exe ) ;
119+ const mod = await import ( "./rescript-legacy /format.js" ) ;
120+ await mod . main ( subcmdArgs , rescript_legacy_exe , bsc_exe ) ;
121121 break ;
122122 }
123123 case "dump" : {
124- const mod = await import ( "./rescript/dump.js" ) ;
125- mod . main ( subcmdArgs , rescript_exe , bsc_exe ) ;
124+ const mod = await import ( "./rescript-legacy /dump.js" ) ;
125+ mod . main ( subcmdArgs , rescript_legacy_exe , bsc_exe ) ;
126126 break ;
127127 }
128128 default : {
0 commit comments