@@ -82,16 +82,17 @@ const FALLBACK_SYMBOLS: Record<LogType, string> = {
8282
8383const PROGRESS_BAR_WIDTH = 16 ;
8484
85+ // singleton instance within the same process
86+ // TODO clean this up in 6.0
87+ const terminal = new MultiPlatformTerminal ( process . stdout ) ;
88+
8589class InteractiveConsoleReporter implements Reporter {
8690 private requestBuffer : Record < string , Object > = { } ;
87- private terminal : MultiPlatformTerminal ;
8891 private startTimeByPlatform : Record < string , number > = { } ;
8992 private spinner : Spinner = new Spinner ( ) ;
9093 private maxPlatformNameWidth = 0 ;
9194
92- constructor ( private config : ConsoleReporterConfig ) {
93- this . terminal = new MultiPlatformTerminal ( process . stdout ) ;
94- }
95+ constructor ( private config : ConsoleReporterConfig ) { }
9596
9697 process ( log : LogEntry ) {
9798 // Do not log debug messages in non-verbose mode
@@ -106,7 +107,7 @@ class InteractiveConsoleReporter implements Reporter {
106107
107108 const normalizedLog = this . normalizeLog ( log ) ;
108109 if ( normalizedLog ) {
109- this . terminal . log (
110+ terminal . log (
110111 `${
111112 IS_SYMBOL_SUPPORTED ? SYMBOLS [ log . type ] : FALLBACK_SYMBOLS [ log . type ]
112113 } ${ this . prettifyLog ( normalizedLog ) } `
@@ -208,14 +209,14 @@ class InteractiveConsoleReporter implements Reporter {
208209 }
209210
210211 if ( typeof time === 'number' ) {
211- this . terminal . status (
212+ terminal . status (
212213 platform ,
213214 this . buildDoneLine ( platform , time , log . timestamp , log . issuer )
214215 ) ;
215216 return ;
216217 }
217218
218- this . terminal . status (
219+ terminal . status (
219220 platform ,
220221 this . buildInProgressLine ( platform , percentage , log . timestamp , log . issuer )
221222 ) ;
0 commit comments