This repository was archived by the owner on Jul 27, 2021. It is now read-only.
File tree Expand file tree Collapse file tree 4 files changed +672
-60
lines changed
Expand file tree Collapse file tree 4 files changed +672
-60
lines changed Original file line number Diff line number Diff line change 4242 "webpack" : " ^2.2.1"
4343 },
4444 "dependencies" : {
45- "chalk" : " ^1.1.3 " ,
45+ "chalk" : " ^2.4.2 " ,
4646 "error-stack-parser" : " ^2.0.0" ,
47- "string-width" : " ^2.0.0"
47+ "string-width" : " ^2.0.0" ,
48+ "strip-ansi" : " ^3"
4849 }
4950}
Original file line number Diff line number Diff line change @@ -4,6 +4,7 @@ const colors = require('./utils/colors');
44const chalk = require ( 'chalk' ) ;
55const stringWidth = require ( 'string-width' ) ;
66const readline = require ( 'readline' ) ;
7+ const stripAnsi = require ( 'strip-ansi' ) ;
78
89class Debugger {
910
@@ -98,7 +99,7 @@ class Debugger {
9899
99100 captureConsole ( args , method ) {
100101 if ( this . capturing ) {
101- this . capturedMessages . push ( chalk . stripColor ( args . join ( ' ' ) ) . trim ( ) ) ;
102+ this . capturedMessages . push ( stripAnsi ( args . join ( ' ' ) ) . trim ( ) ) ;
102103 } else {
103104 method . apply ( console , args ) ;
104105 }
Original file line number Diff line number Diff line change 11const defaultError = require ( '../../../src/formatters/defaultError' ) ;
22const expect = require ( 'expect' ) ;
3- const chalk = require ( 'chalk ' ) ;
3+ const stripAnsi = require ( 'strip-ansi ' ) ;
44
5- const noColor = ( arr ) => arr . map ( chalk . stripColor ) ;
5+ const noColor = ( arr ) => arr . map ( stripAnsi ) ;
66const error = { message : 'Error message' , file : './src/index.js' } ;
77
88it ( 'Formats errors with no type' , ( ) => {
You can’t perform that action at this time.
0 commit comments