Skip to documentation

reference

Migration — @stackline/ansicolors

Project migration notes for @stackline/ansicolors 1.0.6. Review behavior, requirements and limitations.

Versioned project notes for @stackline/ansicolors 1.0.6. Original attribution is retained in the linked repository.

Migration

Lowest-Change Migration

Keep the dependency key and all source imports unchanged:

npm install ansicolors@npm:@stackline/ansicolors@^1.0.2
const colors = require('ansicolors')
console.log(colors.green('ready'))

Direct Scoped Install

npm install @stackline/ansicolors
const colors = require('@stackline/ansicolors')

ESM

import colors, { bgBlue, brightWhite } from '@stackline/ansicolors'

TypeScript Note

First-party declarations replace the separate @types/ansicolors package. The open and close entries are correctly typed as strings, and color methods are correctly typed as functions. Code that called nested properties such as colors.red.blue() was accepted by old declarations but never worked at runtime.

Package reference