🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Sign inDemoInstall
Socket

ansis

Package Overview
Dependencies
Maintainers
1
Versions
110
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ansis - npm Package Versions

2345
11

4.0.0-node10

Diff
webdiscus
published 4.0.0-node10 •
webdiscus
published 4.0.0 •

Changelog

Source

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 needed

If 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.

1) Replace strike with strikethrough

- ansis.strike('text')
+ ansis.strikethrough('text')

2) Replace grey and blackBright with gray

- ansis.grey('text')
- ansis.blackBright('text')
+ ansis.gray('text')

3) Replace bgGrey and bgBlackBright with bgGray

- ansis.bgGrey('text')
- ansis.bgBlackBright('text')
+ ansis.bgGray('text')

4) Replace ansi256() with fg()

- ansis.ansi256(196)('Error')
+ ansis.fg(196)('Error')

5) Replace bgAnsi256() with bg()

- ansis.bgAnsi256(21)('Info')
+ ansis.bg(21)('Info')

6) Define AnsiColorsExtend type manually

- import ansis, { AnsiColorsExtend } from 'ansis';
+ import ansis, { AnsiColors } from 'ansis';

+ type AnsiColorsExtend<T extends string> = AnsiColors | (T & Record<never, never>);
webdiscus
published 4.0.0-rc.8 •
webdiscus
published 4.0.0-rc.7 •
webdiscus
published 4.0.0-rc.6 •
webdiscus
published 4.0.0-rc.5 •
webdiscus
published 4.0.0-rc.4 •
webdiscus
published 4.0.0-rc.3 •
webdiscus
published 4.0.0-rc.2 •
webdiscus
published 4.0.0-rc.1 •
2345
11