Skip to content

Commit 1329844

Browse files
BridgeARaddaleax
authored andcommitted
Revert "util: use blue on non-windows systems for number/bigint"
This reverts commit 1708af3. Numbers are much more difficult to read in blue and it would be good to have a consistent output throughout all OS. PR-URL: #19256 Refs: #18925 Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Сковорода Никита Андреевич <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Michaël Zasso <[email protected]> Reviewed-By: Gibson Fahnestock <[email protected]>
1 parent 2e37618 commit 1329844

File tree

2 files changed

+3
-5
lines changed

2 files changed

+3
-5
lines changed

lib/util.js

+2-3
Original file line numberDiff line numberDiff line change
@@ -347,11 +347,10 @@ inspect.colors = Object.assign(Object.create(null), {
347347
});
348348

349349
// Don't use 'blue' not visible on cmd.exe
350-
const windows = process.platform === 'win32';
351350
inspect.styles = Object.assign(Object.create(null), {
352351
'special': 'cyan',
353-
'number': windows ? 'yellow' : 'blue',
354-
'bigint': windows ? 'yellow' : 'blue',
352+
'number': 'yellow',
353+
'bigint': 'yellow',
355354
'boolean': 'yellow',
356355
'undefined': 'grey',
357356
'null': 'bold',

test/parallel/test-stream-buffer-list.js

+1-2
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,7 @@ assert.deepStrictEqual(list, new BufferList());
3434

3535
const tmp = util.inspect.defaultOptions.colors;
3636
util.inspect.defaultOptions = { colors: true };
37-
const color = util.inspect.colors[util.inspect.styles.number];
3837
assert.strictEqual(
3938
util.inspect(list),
40-
`BufferList { length: \u001b[${color[0]}m0\u001b[${color[1]}m }`);
39+
'BufferList { length: \u001b[33m0\u001b[39m }');
4140
util.inspect.defaultOptions = { colors: tmp };

0 commit comments

Comments
 (0)