Update chalk to 2.x (#6003)
This commit is contained in:
parent
9b04cbbc4f
commit
677160385c
@ -22,7 +22,7 @@
|
||||
"browserify": "^13.1.1",
|
||||
"bundle-collapser": "^1.2.1",
|
||||
"chai": "^3.5.0",
|
||||
"chalk": "^1.1.1",
|
||||
"chalk": "^2.0.0",
|
||||
"derequire": "^2.0.2",
|
||||
"eslint": "^3.14.1",
|
||||
"eslint-config-babel": "^7.0.1",
|
||||
|
||||
@ -8,8 +8,11 @@
|
||||
"repository": "https://github.com/babel/babel/tree/master/packages/babel-code-frame",
|
||||
"main": "lib/index.js",
|
||||
"dependencies": {
|
||||
"chalk": "^1.1.0",
|
||||
"chalk": "^2.0.0",
|
||||
"esutils": "^2.0.2",
|
||||
"js-tokens": "^3.0.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"strip-ansi": "^4.0.0"
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,5 +1,6 @@
|
||||
import assert from "assert";
|
||||
import chalk from "chalk";
|
||||
import stripAnsi from "strip-ansi";
|
||||
import codeFrame, { codeFrameColumns } from "..";
|
||||
|
||||
describe("babel-code-frame", function() {
|
||||
@ -100,7 +101,7 @@ describe("babel-code-frame", function() {
|
||||
it("opts.highlightCode", function() {
|
||||
const rawLines = "console.log('babel')";
|
||||
const result = codeFrame(rawLines, 1, 9, { highlightCode: true });
|
||||
const stripped = chalk.stripColor(result);
|
||||
const stripped = stripAnsi(result);
|
||||
assert.ok(result.length > stripped.length);
|
||||
assert.equal(
|
||||
stripped,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user