Skip to content
Snippets Groups Projects

Update dependency chalk to v3

Created by: renovate[bot]

This PR contains the following updates:

Package Type Update New value References Sourcegraph
chalk devDependencies major ^3.0.0 source code search for "chalk"

Release Notes

chalk/chalk

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. :raised_hands:

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');

Or if you have esModuleInterop enabled:

-import chalk from 'chalk';
+import * as chalk from '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

Renovate configuration

:date: Schedule: "on the 1st through 7th day of the month" in timezone America/Los_Angeles.

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

:recycle: Rebasing: Whenever PR becomes conflicted, or if you modify the PR title to begin with "rebase!".

:no_bell: Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

Newsflash: Renovate has joined WhiteSource, and is now free for all use. Learn more or view updated terms and privacy policies.

Merge request reports

Approval is optional

Closed by avatar (Sep 22, 2025 8:53pm UTC)

Merge details

  • The changes were not merged into master.

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • Created by: eseliger

    @sourcegraph/web I don't find any references in the codebase of us using chalk directly, anyone knows if we can remove it safely? :thinking:

  • Created by: felixfbecker

    If the badge shows 0 matches, feel free to go ahead and remove it :)

  • Created by: renovate[bot]

    PR has been edited

    :construction_worker: This PR has received other commits, so Renovate will stop updating it to avoid conflicts or other problems. If you wish to abandon your changes and have Renovate start over you may click the "rebase" checkbox in the PR body/description.

  • Created by: renovate[bot]

    Autoclosing Skipped

    This PR has been flagged for autoclosing, however it is being skipped due to the branch being already modified. Please close/delete it manually or report a bug if you think this is in error.

Please register or sign in to reply
Loading