ansi-styles breaking changes
ansi-styles 7.0.0 (July 26, 2026) is its newest release with breaking changes, 3 of them. The first: ansi-styles 7.0.0 requires Node.js 22 or later. Every breaking API change we have recorded in ansi-styles on npm: 20 breaking changes in 6 versions. Below, its 6 versions with breaking changes, newest first, removals and renames first, each with its source.
Updated December 4, 2026
On this page
Latest version 7.0.0, released July 26, 2026. Source repository
Its 7.0.0 release requires Node.js 22 or later. Node.js end of life dates.
- From 6.2.3 to 7.0.0: 3 breaking changes in 1 version.
- From 4.0.0 to 7.0.0: 19 breaking changes in 5 versions.
ansi-styles 7.0.0 breaking changes
- Configuration changed
The package now requires Node.js 22. Users on older Node.js versions must upgrade Node.js before upgrading this package. github.com - Signature changed
default
Was const ansiStyles: {readonly modifier: Modifier; readonly color: ColorBase & ForegroundColor; readonly bgColor: ColorBase & BackgroundColor; readonly codes: ReadonlyMap<number, number>;} & ForegroundColor & BackgroundColor & Modifier &... npmjs.com - Signature changed
Modifier
Was type Modifier = {readonly reset: CSPair; readonly bold: CSPair; readonly dim: CSPair; readonly italic: CSPair; readonly underline: CSPair; readonly overline: CSPair; readonly inverse: CSPair; readonly hidden: CSPair; readonly... npmjs.com
ansi-styles 6.2.3 breaking changes
- Signature changed
BackgroundColor
Was interface BackgroundColor; now type BackgroundColor = {readonly bgBlack: CSPair; readonly bgRed: CSPair; readonly bgGreen: CSPair; readonly bgYellow: CSPair; readonly bgBlue: CSPair; readonly bgCyan: CSPair; readonly bgMagenta: CSPair... npmjs.com - Signature changed
ColorBase
Was interface ColorBase; now type ColorBase = {readonly close: string; ansi(code: number): string; ansi256(code: number): string; ansi16m(red: number, green: number, blue: number): string;}. npmjs.com - Signature changed
ConvertColor
Was interface ConvertColor; now type ConvertColor = {rgbToAnsi256(red: number, green: number, blue: number): number; hexToRgb(hex: string): [red: number, green: number, blue: number]; hexToAnsi256(hex: string): number; ansi256ToAnsi(code... npmjs.com - Signature changed
CSPair
Was interface CSPair; now type CSPair = {readonly open: string; readonly close: string;}. npmjs.com - Signature changed
ForegroundColor
Was interface ForegroundColor; now type ForegroundColor = {readonly black: CSPair; readonly red: CSPair; readonly green: CSPair; readonly yellow: CSPair; readonly blue: CSPair; readonly cyan: CSPair; readonly magenta: CSPair; readonly... npmjs.com - Signature changed
Modifier
Was interface Modifier; now type Modifier = {readonly reset: CSPair; readonly bold: CSPair; readonly dim: CSPair; readonly italic: CSPair; readonly underline: CSPair; readonly overline: CSPair; readonly inverse: CSPair; readonly hidden... npmjs.com
ansi-styles 6.0.0 breaking changes
- Removed
The release requires Node.js 12 or later, so older Node.js versions are no longer supported. Upgrade Node.js before using this version. github.com - Behavior changed
The package is now pure ES modules and can no longer be loaded with CommonJS require(). Switch to import, or follow the linked guide for migrating. github.com - Signature changed
default
Was const ansiStyles: {readonly modifier: ansiStyles.Modifier; readonly color: ansiStyles.ForegroundColor & ansiStyles.ColorBase; readonly bgColor: ansiStyles.BackgroundColor & ansiStyles.ColorBase; readonly codes: ReadonlyMap<number... npmjs.com
ansi-styles 5.2.0 breaking changes
- Behavior changed
The color conversion functions are no longer enumerable properties of the package exports. Code that enumerates or spreads these properties may see different results. github.com
ansi-styles 5.0.0 breaking changes
- Removed
The hsv, hwb, ansi and CSS keyword color types are no longer supported. If you need them, use color-convert instead. github.com - Removed
ColorBase.ansi
ColorBase.ansi was removed in ansi-styles 5.0.0 npmjs.com - Removed
ColorConvert
ColorConvert was removed in ansi-styles 5.0.0 npmjs.com - Signature changed
ColorBase.ansi16m
Was readonly ansi16m: ColorConvert; now ansi16m(red: number, green: number, blue: number): string. npmjs.com - Signature changed
ColorBase.ansi256
Was readonly ansi256: ColorConvert; now ansi256(code: number): string. npmjs.com - Signature changed
default
Was const ansiStyles: {readonly modifier: ansiStyles.Modifier; readonly color: ansiStyles.ForegroundColor & ansiStyles.ColorBase; readonly bgColor: ansiStyles.BackgroundColor & ansiStyles.ColorBase; readonly codes: ReadonlyMap<number... npmjs.com
ansi-styles 4.0.0 breaking changes
- Removed
The release now requires Node.js 8, so older Node.js versions are no longer supported and users must run Node.js 8 or newer. github.com
Related packages
Check your code
These are the changes. To see which of them reach your code, scan a public repository, or have your coding agent call check_code with your manifest or lockfile over MCP. The API reads every change in every version. A fix pull request opens for the changes that reach a connected repository. Nothing merges or deploys.

Put your code on continuous maintenance.
Scan a public repository now, or give your agent one line.
See how out of date your code is.
Tell your agent what changed since it was trained.
claude mcp add --transport http since https://api.since.dev/mcpCodex, Cursor and any MCP client use https://api.since.dev/mcp.