Skip to content
This repository was archived by the owner on Jul 27, 2021. It is now read-only.

Commit d0393ed

Browse files
Merge pull request #86 from pieh/bump-chalk
deps: bump chalk version
2 parents f39834d + 4c5bf97 commit d0393ed

File tree

4 files changed

+672
-60
lines changed

4 files changed

+672
-60
lines changed

package.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,9 @@
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
}

src/output.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ const colors = require('./utils/colors');
44
const chalk = require('chalk');
55
const stringWidth = require('string-width');
66
const readline = require('readline');
7+
const stripAnsi = require('strip-ansi');
78

89
class 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
}

test/unit/formatters/defaultError.spec.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
const defaultError = require('../../../src/formatters/defaultError');
22
const 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);
66
const error = { message: 'Error message', file: './src/index.js' };
77

88
it('Formats errors with no type', () => {

0 commit comments

Comments
 (0)