File tree 2 files changed +12
-1
lines changed
2 files changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -312,12 +312,20 @@ Options:
312
312
stdinStuff ?. repl . setService ( service ) ;
313
313
314
314
// Output project information.
315
- if ( version > = 2 ) {
315
+ if ( version == = 2 ) {
316
316
console . log ( `ts-node v${ VERSION } ` ) ;
317
317
console . log ( `node ${ process . version } ` ) ;
318
318
console . log ( `compiler v${ service . ts . version } ` ) ;
319
319
process . exit ( 0 ) ;
320
320
}
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
+ }
321
329
322
330
if ( showConfig ) {
323
331
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 {
477
477
/** @internal */
478
478
[ TS_NODE_SERVICE_BRAND ] : true ;
479
479
ts : TSCommon ;
480
+ /** @internal */
481
+ compilerPath : string ;
480
482
config : _ts . ParsedCommandLine ;
481
483
options : RegisterOptions ;
482
484
enabled ( enabled ?: boolean ) : boolean ;
@@ -1340,6 +1342,7 @@ export function create(rawOptions: CreateOptions = {}): Service {
1340
1342
return {
1341
1343
[ TS_NODE_SERVICE_BRAND ] : true ,
1342
1344
ts,
1345
+ compilerPath : compiler ,
1343
1346
config,
1344
1347
compile,
1345
1348
getTypeInfo,
You can’t perform that action at this time.
0 commit comments