Sourced from ansis's\r\nreleases.
\r\n\r\n\r\nv3.0.0
\r\nFeatures
\r\n\r\n
\r\n- Added detection of color spaces support: TrueColor, 256 colors, 16\r\ncolors, no color (black & white).
\r\n- Added fallback for supported color space: truecolor —> 256 colors\r\n—> 16 colors —> no colors.
\r\n- Improved performance for the
\r\nhex()
function.BREAKING CHANGE
\r\nIn the new major version
\r\n3.x
are removed unused styles\r\nand methods.\r\n\r\n⚠️ Warning
\r\nBefore update, please check your code whether is used deleted styles\r\nand methods.
\r\nSupport Node.js
\r\nDrop supports for Node <=
\r\n14
. Minimal supported\r\nversion is15.0.0
(Released 2020-10-20).\r\nIn the theory thev3
can works with Node12
,\r\nbut we can't test it.Deleted styles
\r\nThe
\r\nnot widely supported
styles are deleted:\r\n
\r\n- \r\n
faint
(alias for dim), replace in your code with\r\ndim
- \r\n
doubleUnderline
, replace in your code with\r\nunderline
- \r\n
frame
, replace in your code with\r\nunderline
- \r\n
encircle
, replace in your code with\r\nunderline
- \r\n
overline
, replace in your code with\r\nunderline
Deleted methods
\r\nThe methods are deleted:
\r\n\r\n
\r\n- \r\n
ansi
, replace in your code withansi256
or\r\nfg
- \r\n
bgAnsi
, replace in your code with\r\nbgAnsi256
orbg
Deleted clamp in functions
\r\nThe clamp (0, 255) for the ANSI 256 codes and RGB values is removed,\r\nbecause is unused.\r\nYou should self check the function arguments.
\r\nThe affected functions:
\r\n\r\n
\r\n- \r\n
ansi256
andfg
(alias to ansi256) -\r\nexpected a code in the range0 - 255
- \r\n
bgAnsi256
andbg
(alias to bgAnsi256) -\r\nexpected a code in the range0 - 255
- \r\n
rgb
- expected r, g, b values in the range0 -\r\n255
- \r\n
bgRgb
- expected r, g, b values in the range0 -\r\n255
Sourced from ansis's\r\nchangelog.
\r\n\r\n\r\n3.0.1 (2024-04-01)
\r\n\r\n
\r\n- refactor: improve code
\r\n- chore: reduce code bundle size from 3.8 KB to 3.4 KB
\r\n- chore: update benchmark
\r\n- chore: update compare tests
\r\n- test: add more tests
\r\n- docs: improve readme
\r\n3.0.0 (2024-03-29)
\r\n\r\n
\r\n- feat: add detection of color spaces support: TrueColor, 256 colors,\r\n16 colors, no color
\r\n- feat: add fallback for supported color space: truecolor —> 256\r\ncolors —> 16 colors —> no colors
\r\n- perform: improve performance for
\r\nhex()
function- chore: size increased from 3.2 KB to 3.8 KB as new features were\r\nadded
\r\n- test: switch from jest to vitest
\r\n- test: add tests for new features
\r\n- docs: update readme for color spaces support
\r\nBREAKING CHANGE
\r\nIn the new major version
\r\n3.x
are removed unused styles\r\nand methods.\r\n\r\n⚠️ Warning
\r\nBefore update, please check your code whether is used deleted styles\r\nand methods.
\r\nSupport Node.js
\r\nDrop supports for Node <=
\r\n14
. Minimal supported\r\nversion is15.0.0
(Released 2020-10-20).\r\nIn the theory thev3
can works with Node12
,\r\nbut we can't test it.Deleted styles
\r\nThe
\r\nnot widely supported
styles are deleted:\r\n
\r\n- \r\n
faint
(alias for dim), replace in your code with\r\ndim
- \r\n
doubleUnderline
, replace in your code with\r\nunderline
- \r\n
frame
, replace in your code with\r\nunderline
- \r\n
encircle
, replace in your code with\r\nunderline
- \r\n
overline
, replace in your code with\r\nunderline
Deleted methods
\r\nThe methods are deleted:
\r\n\r\n
\r\n- \r\n
ansi
, replace in your code withansi256
or\r\nfg
- \r\n
bgAnsi
, replace in your code with\r\nbgAnsi256
orbg
Deleted clamp in functions
\r\n\r\n
... (truncated)
\r\n