Skip to content

v4.5.0

Latest

Choose a tag to compare

@webdiscus webdiscus released this 01 Nov 21:47
86cef44

Bug Fixes

  • color-support: prevent colors in piped or redirected output when COLORTERM is set, #54
  • color-support: detect the color level for FORCE_COLOR=true and --color in non-TTY output

Behavior

Colors are enabled only for a TTY, CI, and the PM2 and Next.js runtimes. Output to a pipe or a file has no colors, even when COLORTERM is set. COLORTERM sets only the color level.

FORCE_COLOR=true, FORCE_COLOR= and --color in non-TTY output now detect the level from the environment (COLORTERM, TERM, Windows) instead of always using 16 colors.

Upgrade note

If your tests relied on COLORTERM to get colors, set FORCE_COLOR instead, for example FORCE_COLOR=3 npm test. See Testing.

Full Changelog: v4.4.0...v4.5.0