Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove the blue color workaround for Windows #330

Merged
merged 2 commits into from Mar 12, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
5 changes: 0 additions & 5 deletions index.js
Expand Up @@ -58,11 +58,6 @@ function Chalk(options) {
return chalkFactory(options);
}

// Use bright blue on Windows as the normal blue color is illegible
if (isSimpleWindowsTerm) {
ansiStyles.blue.open = '\u001B[94m';
}

for (const [styleName, style] of Object.entries(ansiStyles)) {
style.closeRe = new RegExp(escapeStringRegexp(style.close), 'g');

Expand Down
14 changes: 1 addition & 13 deletions test/windows.js
Expand Up @@ -29,18 +29,6 @@ test.beforeEach(() => {
test('detect a simple term if TERM isn\'t set', t => {
delete process.env.TERM;
const chalk = importFresh('..');
t.is(chalk.blue('foo'), '\u001B[94mfoo\u001B[39m');
});

test('replace blue foreground color in cmd.exe', t => {
process.env.TERM = 'dumb';
const chalk = importFresh('..');
t.is(chalk.blue('foo'), '\u001B[94mfoo\u001B[39m');
});

test('don\'t replace blue foreground color in xterm based terminals', t => {
process.env.TERM = 'xterm-256color';
const chalk = importFresh('..');
t.is(chalk.blue('foo'), '\u001B[34mfoo\u001B[39m');
});

Expand All @@ -59,5 +47,5 @@ test('apply dimmed styling on xterm compatible terminals', t => {
test('apply dimmed styling on strings of other colors', t => {
process.env.TERM = 'dumb';
const chalk = importFresh('..');
t.is(chalk.blue.dim('foo'), '\u001B[94m\u001B[2mfoo\u001B[22m\u001B[39m');
t.is(chalk.blue.dim('foo'), '\u001B[34m\u001B[2mfoo\u001B[22m\u001B[39m');
});