v2.0.0
Features
- Added support for Deno.
- Added support for Next.js
edge
runtime. - Added NEW named import for
ansis
:For example:import { red } from 'ansis';
NEWv2.x.x
OLDimport ansis, { red } from 'ansis'; // default and named import ansis.red`error`; red`error`;
v1.5.x
import ansis from 'ansis'; // default import import { red } from 'ansis/colors'; // named import ansis.red`error`; red`error`;
- Optimised named export into one file to avoid separate wraps files for CJS and ESM.
- Reduced the size of
dist/
directory by 50%.
BREAKING CHANGE (TypeScript only)
The deprecated OLD named import from 'ansis/colors'
still works, but using TypeScript can be occurred the error:
TS2307: Cannot find module ansis/colors ...
Solution: update your code, e.g.: import { red } from 'ansis/colors'
--> import { red } from 'ansis'
DEPRECATIONS
- OLD named import
import { red } from 'ansis/colors'
is deprecated, use the NEW named import. - The barely used
ansi()
function name is deprecated, useansi256()
or aliasfg()
instead. - The barely used
bgAnsi()
function name is deprecated, usebgAnsi256()
or aliasbg()
instead.