File tree Expand file tree Collapse file tree 2 files changed +12
-1
lines changed Expand file tree Collapse file tree 2 files changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -312,12 +312,20 @@ Options:
312312 stdinStuff ?. repl . setService ( service ) ;
313313
314314 // Output project information.
315- if ( version > = 2 ) {
315+ if ( version == = 2 ) {
316316 console . log ( `ts-node v${ VERSION } ` ) ;
317317 console . log ( `node ${ process . version } ` ) ;
318318 console . log ( `compiler v${ service . ts . version } ` ) ;
319319 process . exit ( 0 ) ;
320320 }
321+ if ( version >= 3 ) {
322+ console . log ( `ts-node v${ VERSION } ${ dirname ( __dirname ) } ` ) ;
323+ console . log ( `node ${ process . version } ` ) ;
324+ console . log (
325+ `compiler v${ service . ts . version } ${ service . compilerPath ?? '' } `
326+ ) ;
327+ process . exit ( 0 ) ;
328+ }
321329
322330 if ( showConfig ) {
323331 const ts = service . ts as any as TSInternal ;
Original file line number Diff line number Diff line change @@ -477,6 +477,8 @@ export interface Service {
477477 /** @internal */
478478 [ TS_NODE_SERVICE_BRAND ] : true ;
479479 ts : TSCommon ;
480+ /** @internal */
481+ compilerPath : string ;
480482 config : _ts . ParsedCommandLine ;
481483 options : RegisterOptions ;
482484 enabled ( enabled ?: boolean ) : boolean ;
@@ -1340,6 +1342,7 @@ export function create(rawOptions: CreateOptions = {}): Service {
13401342 return {
13411343 [ TS_NODE_SERVICE_BRAND ] : true ,
13421344 ts,
1345+ compilerPath : compiler ,
13431346 config,
13441347 compile,
13451348 getTypeInfo,
You can’t perform that action at this time.
0 commit comments