Releases: chalk/chalk
v4.0.0
v3.0.0
This release has been in development for more than a year and massively improves performance and the time it takes to import Chalk.
Thanks to @stroncium for his hard work on this. π
Breaking
- Require Node.js 8 3ef170b
- Remove the
.enabled
property in favor of.level
(#356) 1f77953- Why: It was confusing to users to have two properties for detecting color support.
- Migrate:
-if (chalk.enabled) {}
+if (chalk.level > 0) {}
-new chalk.constructor({level: 1});
+new chalk.Instance({level: 1})
Minor breaking
- Use CommonJS-compatible export in TypeScript definition (#344) 98628d9
- Why: Faking default export for TypeScript broke IntelliSense for JavaScript.
- Migrate:
-import chalk from 'chalk';
+import chalk = require('chalk');
- Drop built-in Flow type definition d3be9c6
- Why: None of us use Flow and we were not good at maintaining the type definition. You can get the types at flow-typed (needs to be updated to Chalk v3, open an issue on
flow-typed
).
- Why: None of us use Flow and we were not good at maintaining the type definition. You can get the types at flow-typed (needs to be updated to Chalk v3, open an issue on
- Rename the
ChalkOptions
TypeScript type toOptions
cf66156 - Remove
dim
style workaround for Windows (#331) cd5de7a- Why: The issue was fixed in newer Windows 10 builds.
- Remove the
blue
color workaround for Windows (#330) 2ca015c- Why: The issue was fixed in newer Windows 10 builds.
Enhancements
- Massively improve performance! (#337) c08417e
- Improve require speed (#358) 61aca7c
- Add
chalk.stderr
for printing to stderr (#359) 2a53389 - Add
blackBright
color. It's the same as thegray
color, but added for consistency. c25c32a - Fix support for bracketed Unicode escapes in template literals (#350) 9830948
- Export TypeScript types for colors and modifiers (#357) 6b4d206
- Add
ansi256
andbgAnsi256
to TypeScript declaration (#368) fb8e85a - Add
ansi
andbgAnsi
to TypeScript declaration (#369) 18c280d
Color detection
- The
FORCE_COLOR
environment variable can now be used to force a certain color level (#315) af4a078 - Add support for GitHub Actions in the color detection chalk/supports-color@79d1303
- Give
TERM=dumb
higher priority in the color detection chalk/supports-color@8d6a7b5 - Add support for VT220 in the color detection chalk/supports-color@ed0fe39
Fixes
- Fix support for nested styles (#335) 87156ce
- Fix const enum for TypeScript (#364) 4e65299
- Fix TypeScript type for
supportsColor
which isΒ topβlevel only (#342) b3e9b91 - Fix TypeScript type for
chalk.supportsColor
(#347) d82b2a6 - Fix TypeScript type for tagged template literal argument to accept
unknown
instead of juststring
(#316) 7f6e563
v3.0.0-beta.2
While this is a beta release, the code is well-tested and fairly stable.
We encourage you to test it out and report any issues.
$ npm install chalk@3.0.0-beta.2
See the beta 1 release notes for more.
v3.0.0-beta.1
This release has been in development for more than a year and massively improves performance and the time it takes to import Chalk. Thanks to @stroncium for his hard work on this.
While this is a beta release, the code is well-tested and fairly stable.
We encourage you to test it out and report any issues.
$ npm install chalk@3.0.0-beta.1
Breaking
- Require Node.js 8 3ef170b
- Remove the
.enabled
property in favor of.level
(#356) 1f77953- Why: It was confusing to users to have two properties for this.
- Migrate:
-if (chalk.enabled) {}
+if (chalk.level > 0) {}
-new chalk.constructor({level: 1});
+new chalk.Instance({level: 1})
Minor breaking
- Use CommonJS-compatible export in TypeScript definition (#344) 98628d9
- Why: Faking default export for TypeScript broke IntelliSense for JavaScript.
- Migrate:
-import chalk from 'chalk';
+import chalk = require('chalk');
- Drop built-in Flow type definition d3be9c6
- Why: None of us use Flow and we were not good at maintaining the type definition. You can get the types at flow-typed (needs to be updated to Chalk v3).
- Rename the
ChalkOptions
TypeScript type toOptions
cf66156 - Remove
dim
style workaround for Windows (#331) cd5de7a- Why: The issue was fixed in newer Windows 10 builds.
- Remove the
blue
color workaround for Windows (#330) 2ca015c- Why: The issue was fixed in newer Windows 10 builds.
Enhancements
- Massively improve performance (#337) c08417e
- Improve require speed (#358) 61aca7c
- Add
chalk.stderr
for printing to stderr (#359) 2a53389 - Add
blackBright
color. It's the same as thegray
color, but added for consistency. c25c32a - Fix support for bracketed Unicode escapes in template literals (#350) 9830948
- Export TypeScript types for colors and modifiers (#357) 6b4d206
Color detection
- The
FORCE_COLOR
environment variable can now be used to force a certain color level (#315) af4a078 - Add support for GitHub Actions in the color detection chalk/supports-color@79d1303
- Give
TERM=dumb
higher priority in the color detection chalk/supports-color@8d6a7b5 - Add support for VT220 in the color detection chalk/supports-color@ed0fe39
Fixes
- Fix support for nested styles (#335) 87156ce
- Fix const enum for TypeScript (#364) 4e65299
- Fix TypeScript type for
supportsColor
which isΒ topβlevel only (#342) b3e9b91 - Fix TypeScript type for
chalk.supportsColor
(#347) d82b2a6 - Fix TypeScript type for tagged template literal argument to accept
unknown
instead of juststring
(#316) 7f6e563
v2.4.2
This release is done from the v2-release
branch, as master
branch targets the work-in-progress v3 release.
v2.4.1
- Improved Flow type definition for CommonJS interop.
v2.4.0
- Added Flow type definitions. 7c6f83f
v2.3.2
- Fixed detection of color support for VSCode debug console. chalk/supports-color@b764af9
- Fixed detection of 24M colors in Konsole. chalk/supports-color@d6e08c8
- Fixed using
chalk.ansi256
when in a terminal with 256-color level support. chalk/ansi-styles@1ac7472
v2.3.1
- Calculate proper
level
when forcing color. chalk/supports-color@b16e9a4 - Detect 16m color support on Windows >=10.0.14931. chalk/supports-color@cf7bd05