Skip to content

Update dependency chalk to v5

renovate-bot requested to merge renovate/chalk-5.x into develop

This MR contains the following updates:

Package Type Update Change
chalk devDependencies major 1.1.3 -> 5.0.1

Release Notes

chalk/chalk

v5.0.1

Compare Source

  • Add main field to package.json for backwards compatibility with some developer tools 85f7e96

v5.0.0

Compare Source

Breaking
  • This package is now pure ESM. Please read this.
    • If you use TypeScript, you need to use TypeScript 4.7 or later. Why.
    • If you use a bundler, make sure it supports ESM and that you have correctly configured it for ESM.
    • The Chalk issue tracker is not a support channel for your favorite build/bundler tool.
    • It's totally fine to stay on Chalk v4. It's been stable for years.
  • Require Node.js 12.20 fa16f4e
  • Move some properties off the default export to individual named exports:
    • chalk.InstanceChalk
    • chalk.supportsColorsupportsColor
    • chalk.stderrchalkStderr
    • chalk.stderr.supportsColorsupportsColorStderr
  • Remove .keyword(), .hsl(), .hsv(), .hwb(), and .ansi() coloring methods (#​433) 4cf2e40
    • These were not commonly used and added a lot of bloat to Chalk. You can achieve the same by using the color-convert package.
  • The tagged template literal support moved into a separate package: chalk-template (#​524) c987c61
-import chalk from 'chalk';
+import chalkTemplate from 'chalk-template';

-chalk`2 + 3 = {bold ${2 + 3}}`;
+chalkTemplate`2 + 3 = {bold ${2 + 3}}`;
Improvements

v4.1.2

Compare Source

  • Readme updates

v4.1.1

Compare Source

v4.1.0

Compare Source

v4.0.0

Compare Source

Breaking
  • Require Node.js 10 61999a4
  • Change the Level TypeScript type to be a union instead of enum f0f4638
-if (chalk.level > Level.None) {}
+if (chalk.level > 0) {}
Improvements
  • Use Object.setPrototypeOf as __proto__ could potentially be disabled (#​387) 63469d3

v3.0.0

Compare Source

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) {}
  • Remove chalk.constructor() in favor of chalk.Instance() (#​322) de2f4cd
    • Migrate:
-new chalk.constructor({level: 1});
+new chalk.Instance({level: 1})
Minor breaking
-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).
  • Rename the ChalkOptions TypeScript type to Options 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
Color detection
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 just string (#​316) 7f6e563

v2.4.2

Compare Source


This release is done from the v2-release branch, as master branch targets the work-in-progress v3 release.

v2.4.1

Compare Source

  • Improved Flow type definition for CommonJS interop.

v2.4.0

Compare Source

v2.3.2

Compare Source

v2.3.1

Compare Source

v2.3.0

Compare Source

v2.2.2

Compare Source

v2.2.0

Compare Source

Chalk now comes with TypeScript type definitions built-in. https://github.com/chalk/chalk/commit/f653b061d6fbdb1c7224f7d80476391202c47877 Note: It's incompatible with @types/chalk if you're currently using that: https://github.com/chalk/chalk/issues/215

v2.1.0

Compare Source

v2.0.1

Compare Source

v2.0.0

Compare Source

version 2

Chalk is a Node.js module for styling and colorizing terminal output.

Two years ago, @​qix- asked me about adding 256/Truecolor support to Chalk. He soon after joined the Chalk team. And now we’re finally able to ship Truecolor support in Chalk!

Chalk has had an immense growth since the 1.0.0 release in 2015. It's now trusted by more than 17.000 packages, up from 3000, and it's the 5th most depended upon package on npm.

Highlights

Breaking changes
256/Truecolor support

chalk rainbow

Chalk now supports 256 colors and Truecolor (16 million colors). Terminal apps like Hyper and iTerm supports Truecolor, enabling you to create really immersive CLI experiences. Chalk is smart enough to downsample the colors to whatever the terminal supports, so you can use any colors without having to think whether it's supported or not.

Read more in the docs.

https://github.com/chalk/chalk/commit/cb3f2308e17cd2878d2722db7762bdc725e9ff48

Tagged template literal

Chalk now ships with a tagged template literal that makes it much nicer to create long strings with lots of different styling.

const name = 'Sindre';
console.log(chalk`{bold Hello ${name}}`);

Read more in the docs.

https://github.com/chalk/chalk/commit/f66271e01a901470a3d5afcb3feae552848ccf0c

Other

All changes


Made with by Josh, Sindre, and all our wonderful contributors.


Configuration

📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Whenever MR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this MR and you won't be reminded about this update again.


  • If you want to rebase/retry this MR, click this checkbox.

This MR has been generated by Renovate Bot.

Edited by renovate-bot

Merge request reports

Loading