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 +7
-5
lines changed
Expand file tree Collapse file tree 4 files changed +7
-5
lines changed Original file line number Diff line number Diff line change 4444 "dependencies" : {
4545 "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' , ( ) => {
Original file line number Diff line number Diff line change @@ -3656,7 +3656,7 @@ stringstream@~0.0.4:
36563656 resolved "https://registry.yarnpkg.com/stringstream/-/stringstream-0.0.5.tgz#4e484cd4de5a0bbbee18e46307710a8a81621878"
36573657 integrity sha1-TkhM1N5aC7vuGORjB3EKioFiGHg=
36583658
3659- strip-ansi@^3.0.0, strip-ansi@^3.0.1 :
3659+ strip-ansi@^3, strip-ansi@^3 .0.0, strip-ansi@^3.0.1 :
36603660 version "3.0.1"
36613661 resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-3.0.1.tgz#6a385fb8853d952d5ff05d0e8aaf94278dc63dcf"
36623662 integrity sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=
You can’t perform that action at this time.
0 commit comments