Changelog
Upcoming BREAKING CHANGES in v4.0.0
[!NOTE] Next Ansis v4 is focused on a clean, minimal API by intentionally avoiding redundant aliases.
The following DEPRECATED rarely used duplicate aliases and unused redundant types will be removed in the next major release (v4.0.0):
strike
→ use strikethrough
grey
, blackBright
→ use gray
bgGrey
, bgBlackBright
→ use bgGray
ansi256()
→ use fg()
bgAnsi256()
→ use bg()
AnsiColorsExtend
type → define it manually if neededIf you're using v3.x
, we recommend upgrading to the latest stable release (v3.17.0
)
and updating your code now to ensure a smooth migrating to v4
.
strike
with strikethrough
- ansis.strike('text')
+ ansis.strikethrough('text')
grey
and blackBright
with gray
- ansis.grey('text')
- ansis.blackBright('text')
+ ansis.gray('text')
bgGrey
and bgBlackBright
with bgGray
- ansis.bgGrey('text')
- ansis.bgBlackBright('text')
+ ansis.bgGray('text')
ansi256()
with fg()
- ansis.ansi256(196)('Error')
+ ansis.fg(196)('Error')
bgAnsi256()
with bg()
- ansis.bgAnsi256(21)('Info')
+ ansis.bg(21)('Info')
AnsiColorsExtend
type manually- import ansis, { AnsiColorsExtend } from 'ansis';
+ import ansis, { AnsiColors } from 'ansis';
+ type AnsiColorsExtend<T extends string> = AnsiColors | (T & Record<never, never>);