Skip to content

Commit 4ff67de

Browse files
authored
Merge pull request #1864 from sveltejs/fix-chalk
Trim Duplicate Dependency
2 parents f35edaf + 862d52c commit 4ff67de

File tree

3 files changed

+7
-8
lines changed

3 files changed

+7
-8
lines changed

package-lock.json

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,6 @@
5353
"acorn": "^5.4.1",
5454
"acorn-dynamic-import": "^3.0.0",
5555
"agadoo": "^1.0.1",
56-
"chalk": "^2.4.0",
5756
"codecov": "^3.0.0",
5857
"css-tree": "1.0.0-alpha22",
5958
"eslint": "^5.3.0",
@@ -62,7 +61,7 @@
6261
"estree-walker": "^0.6.0",
6362
"is-reference": "^1.1.0",
6463
"jsdom": "^11.8.0",
65-
"kleur": "^2.0.1",
64+
"kleur": "^3.0.0",
6665
"locate-character": "^2.0.5",
6766
"magic-string": "^0.25.0",
6867
"mocha": "^5.2.0",

test/helpers.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import * as assert from 'assert';
33
import * as glob from 'tiny-glob/sync.js';
44
import * as fs from 'fs';
55
import * as path from 'path';
6-
import * as chalk from 'chalk';
6+
import * as colors from 'kleur';
77

88
// for coverage purposes, we need to test source files,
99
// but for sanity purposes, we need to test dist files
@@ -162,7 +162,7 @@ export function addLineNumbers(code) {
162162
while (i.length < 3) i = ` ${i}`;
163163

164164
return (
165-
chalk.grey(` ${i}: `) +
165+
colors.gray(` ${i}: `) +
166166
line.replace(/^\t+/, match => match.split('\t').join(' '))
167167
);
168168
})
@@ -191,7 +191,7 @@ export function showOutput(cwd, options = {}, compile = svelte.compile) {
191191
);
192192

193193
console.log( // eslint-disable-line no-console
194-
`\n>> ${chalk.cyan.bold(file)}\n${addLineNumbers(js.code)}\n<< ${chalk.cyan.bold(file)}`
194+
`\n>> ${colors.cyan().bold(file)}\n${addLineNumbers(js.code)}\n<< ${colors.cyan().bold(file)}`
195195
);
196196
});
197197
}

0 commit comments

Comments
 (0)