File tree 3 files changed +4
-27
lines changed
3 files changed +4
-27
lines changed Original file line number Diff line number Diff line change @@ -247,7 +247,7 @@ export class Consola {
247
247
248
248
_logFn ( defaults : ConsolaLogObject , args : any [ ] , isRaw ?: boolean ) {
249
249
if ( ( ( defaults . level as number ) || 0 ) > this . level ) {
250
- return this . options . async ? Promise . resolve ( false ) : false ;
250
+ return false ;
251
251
}
252
252
253
253
// Construct a new log object
@@ -304,11 +304,7 @@ export class Consola {
304
304
// Log
305
305
if ( newLog ) {
306
306
this . _lastLog . object = logObj as ConsolaReporterLogObject ;
307
- if ( this . options . async ) {
308
- return this . _logAsync ( logObj as ConsolaReporterLogObject ) ;
309
- } else {
310
- this . _log ( logObj as ConsolaReporterLogObject ) ;
311
- }
307
+ this . _log ( logObj as ConsolaReporterLogObject ) ;
312
308
}
313
309
} ;
314
310
@@ -350,24 +346,11 @@ export class Consola {
350
346
_log ( logObj : ConsolaReporterLogObject ) {
351
347
for ( const reporter of this . options . reporters ) {
352
348
reporter . log ( logObj , {
353
- async : false ,
354
349
stdout : this . stdout ,
355
350
stderr : this . stderr ,
356
351
} ) ;
357
352
}
358
353
}
359
-
360
- _logAsync ( logObj : ConsolaReporterLogObject ) {
361
- return Promise . all (
362
- this . options . reporters . map ( ( reporter ) =>
363
- reporter . log ( logObj , {
364
- async : true ,
365
- stdout : this . stdout ,
366
- stderr : this . stderr ,
367
- } )
368
- )
369
- ) ;
370
- }
371
354
}
372
355
373
356
export interface ConsolaInstance extends Consola {
Original file line number Diff line number Diff line change @@ -57,15 +57,11 @@ export default class BasicReporter {
57
57
] ) ;
58
58
}
59
59
60
- log ( logObj : ConsolaReporterLogObject , { async , stdout, stderr } : any = { } ) {
60
+ log ( logObj : ConsolaReporterLogObject , { stdout, stderr } : any = { } ) {
61
61
const line = this . formatLogObj ( logObj , {
62
62
width : stdout . columns || 0 ,
63
63
} ) ;
64
64
65
- return writeStream (
66
- line + "\n" ,
67
- logObj . level < 2 ? stderr : stdout ,
68
- async ? "async" : "default"
69
- ) ;
65
+ return writeStream ( line + "\n" , logObj . level < 2 ? stderr : stdout ) ;
70
66
}
71
67
}
Original file line number Diff line number Diff line change @@ -54,7 +54,6 @@ export type ConsolaMockFn = (
54
54
) => ConsolaMock ;
55
55
56
56
export interface ConsolaReporterArgs {
57
- async : boolean ;
58
57
stdout : NodeJS . WritableStream ;
59
58
stderr : NodeJS . WritableStream ;
60
59
}
@@ -70,7 +69,6 @@ export interface ConsolaOptions {
70
69
defaults : ConsolaLogObject ;
71
70
throttle : number ;
72
71
throttleMin : number ;
73
- async ?: boolean ;
74
72
stdout ?: NodeJS . WritableStream ;
75
73
stderr ?: NodeJS . WritableStream ;
76
74
mockFn ?: ConsolaMockFn ;
You can’t perform that action at this time.
0 commit comments