@@ -43,16 +43,18 @@ export default class DefaultReporter extends BaseReporter {
4343 this . _err = process . stderr . write . bind ( process . stderr ) ;
4444 this . _status = new Status ( ) ;
4545 this . _bufferedOutput = new Set ( ) ;
46- this . _wrapStdio ( process . stdout ) ;
47- this . _wrapStdio ( process . stderr ) ;
46+ this . __wrapStdio ( process . stdout ) ;
47+ this . __wrapStdio ( process . stderr ) ;
4848 this . _status . onChange ( ( ) => {
49- this . _clearStatus ( ) ;
50- this . _printStatus ( ) ;
49+ this . __clearStatus ( ) ;
50+ this . __printStatus ( ) ;
5151 } ) ;
5252 }
5353
54- private _wrapStdio ( stream : NodeJS . WritableStream | NodeJS . WriteStream ) {
55- const originalWrite = stream . write ;
54+ protected __wrapStdio (
55+ stream : NodeJS . WritableStream | NodeJS . WriteStream ,
56+ ) : void {
57+ const write = stream . write . bind ( stream ) ;
5658
5759 let buffer : Array < string > = [ ] ;
5860 let timeout : NodeJS . Timeout | null = null ;
@@ -62,11 +64,11 @@ export default class DefaultReporter extends BaseReporter {
6264 buffer = [ ] ;
6365
6466 // This is to avoid conflicts between random output and status text
65- this . _clearStatus ( ) ;
67+ this . __clearStatus ( ) ;
6668 if ( string ) {
67- originalWrite . call ( stream , string ) ;
69+ write ( string ) ;
6870 }
69- this . _printStatus ( ) ;
71+ this . __printStatus ( ) ;
7072
7173 this . _bufferedOutput . delete ( flushBufferedOutput ) ;
7274 } ;
@@ -103,7 +105,7 @@ export default class DefaultReporter extends BaseReporter {
103105 }
104106 }
105107
106- private _clearStatus ( ) {
108+ protected __clearStatus ( ) {
107109 if ( isInteractive ) {
108110 if ( this . _globalConfig . useStderr ) {
109111 this . _err ( this . _clear ) ;
@@ -113,7 +115,7 @@ export default class DefaultReporter extends BaseReporter {
113115 }
114116 }
115117
116- private _printStatus ( ) {
118+ protected __printStatus ( ) {
117119 const { content, clear} = this . _status . get ( ) ;
118120 this . _clear = clear ;
119121 if ( isInteractive ) {
0 commit comments