# What changed in ansis

> 9 changes in ansis 4 from its official release notes, upgrade guides and advisories: 6 breaking, 2 new APIs and options. Each one cited. Sources checked 2026-10-20. HTML: https://unstale.sh/npm/ansis/

To see which of these apply to a repository, run `npx @unstale/cli init` in it.

## ansis 4

### Breaking changes

- During automatic color detection, TERM=dumb now disables colors before COLORTERM, CI, PM2, Next.js runtime, and platform-specific checks; FORCE_COLOR can still explicitly enable colors. (4.4.0) — [release notes](https://github.com/webdiscus/ansis/releases/tag/v4.4.0)
- Instances no longer share styles across different color levels, so each instance renders at its own level. (4.3.1) — [release notes](https://github.com/webdiscus/ansis/releases/tag/v4.3.1)
- Calling .extend() now changes styles only on the instance on which it is called. (4.3.1) — [release notes](https://github.com/webdiscus/ansis/releases/tag/v4.3.1)
- reset prepends the reset code and no longer appends a closing reset; add one explicitly if needed. (4.3.1) — [release notes](https://github.com/webdiscus/ansis/releases/tag/v4.3.1)
- strip() now removes OSC 8 hyperlink sequences and returns plain text. (4.3.1) — [release notes](https://github.com/webdiscus/ansis/releases/tag/v4.3.1)
- Color detection now gives FORCE_COLOR priority over NO_COLOR, CLI color flags priority over NO_COLOR, FORCE_COLOR priority over --no-color, and lets the last CLI color flag win. (4.3.0) — [release notes](https://github.com/webdiscus/ansis/releases/tag/v4.3.0)

### New APIs and options

- Added a constructor overload that accepts a mock globalThis object for controlled color auto-detection. (4.3.0) — [release notes](https://github.com/webdiscus/ansis/releases/tag/v4.3.0)
- Added link(url, text?) for OSC 8 hyperlinks supported by many terminal emulators. (4.3.0) — [release notes](https://github.com/webdiscus/ansis/releases/tag/v4.3.0)

### Fixes and other changes

- When no colors are detected, the fallback is 16 colors instead of truecolor. (4.3.0) — [release notes](https://github.com/webdiscus/ansis/releases/tag/v4.3.0)
