Packages

ansis

4.5.0 · 1 Nov 2026ISC56.7M / weekRepositoryHomepagenpmAtom feed

Your version

4.5.0

latest1 Nov 2026Where it was published

In short

2 fixed

Release note

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.