Repository navigation
Bug fixes
1. TERM=dumb now disables colors during auto-detection
Ansis now treats TERM=dumb as no color before applying COLORTERM, CI detection, PM2, Next.js runtime detection, and platform-specific defaults, #49.
Before, COLORTERM=truecolor or other later auto-detection checks could still enable colors even when the environment reported TERM=dumb. This could produce visible ANSI escape codes in environments such as Emacs M-x compile.
COLORTERM remains a color capability hint. FORCE_COLOR keeps the highest priority and can still explicitly enable colors.
| Use case | v4.3.1 | v4.4.0 | Notes |
|---|---|---|---|
TERM=dumb |
✅ may allow colors * | ❌ no color | TERM=dumb now has higher priority in autoDetectLevel. |
TERM=dumb + COLORTERM=truecolor |
✅ allow colors | ❌ no color | COLORTERM no longer overrides TERM=dumb. |
TERM=dumb + CI |
✅ allow colors | ❌ no color | CI detection runs after TERM=dumb. |
TERM=dumb + PM2 |
✅ may allow colors * | ❌ no color | PM2 detection runs after TERM=dumb. |
TERM=dumb + Next.js runtime |
✅ may allow colors * | ❌ no color | Next.js detection runs after TERM=dumb. |
COLORTERM without TERM=dumb |
✅ allow colors | ✅ allow colors | Unchanged. |
CI without TERM=dumb |
✅ allow colors | ✅ allow colors | Unchanged. |
PM2 without TERM=dumb |
✅ allow colors | ✅ allow colors | Unchanged. |
Next.js without TERM=dumb |
✅ allow colors | ✅ allow colors | Unchanged. |
* - Depends on additional conditions.
Tests and CI
- Added regression coverage for
TERM=dumbwith inheritedCOLORTERM=truecolor. - Added coverage for PM2 and Next.js runtime behavior where
stdout.isTTYis not exposed. - Added a manual color checker. Run
npm run color-checkerto print the environment values used by color detection and visually inspect ANSI 16, ANSI 256, and Truecolor rendering. - Updated Deno CI to test Deno 2.3+ and the current LTS. Runtime compatibility with Deno 2.0-2.2 remains supported.