Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update chalk 2.4.2 → 5.3.0 (major) #6386

Merged
merged 1 commit into from
Jan 25, 2024
Merged

Conversation

depfu[bot]
Copy link
Contributor

@depfu depfu bot commented Jan 15, 2024

Here is everything you need to know about this upgrade. Please take a good look at what changed and the test results before merging this pull request.

What changed?

✳️ chalk (2.4.2 → 5.3.0) · Repo

Release Notes

5.3.0

  • Add sideEffects field to package.json 5aafc0a
  • Add support for Gitea Actions (#603) 29b8569

v5.2.0...v5.3.0

5.2.0

v5.1.2...v5.2.0

5.1.2

v5.1.1...v5.1.2

5.1.1

  • Improved the names of exports introduced in 5.1.0 (#567) 6e0df05
    • We of course preserved the old names.

v5.1.0...v5.1.1

5.1.0

v5.0.1...v5.1.0

5.0.1

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

v5.0.0...v5.0.1

5.0.0

Breaking

  • This package is now pure ESM. Please read this.
    • If you use TypeScript, you will want to stay on Chalk 4 until TypeScript 4.6 is out. 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.
  • 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';

-chalk2 + 3 = {bold ${2 + 3}};
+chalkTemplate2 + 3 = {bold ${2 + 3}};

Improvements

v4.1.0...v5.0.0

4.1.2

  • Readme updates

4.1.1

4.1.0

  • Support template literals for nested calls (#392) 09ddbad

v4.0.0...v4.1.0

4.0.0

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...v4.0.0

3.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) {}
  • 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

  • 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 the gray 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 and bgAnsi256 to TypeScript declaration (#368) fb8e85a
  • Add ansi and bgAnsi to TypeScript declaration (#369) 18c280d

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.1...v3.0.0

Does any of this look wrong? Please let us know.

Commits

See the full diff on Github. The new version differs by more commits than we can show here.


Depfu Status

Depfu will automatically keep this PR conflict-free, as long as you don't add any commits to this branch yourself. You can also trigger a rebase manually by commenting with @depfu rebase.

All Depfu comment commands
@​depfu rebase
Rebases against your default branch and redoes this update
@​depfu recreate
Recreates this PR, overwriting any edits that you've made to it
@​depfu merge
Merges this PR once your tests are passing and conflicts are resolved
@​depfu cancel merge
Cancels automatic merging of this PR
@​depfu close
Closes this PR and deletes the branch
@​depfu reopen
Restores the branch and reopens this PR (if it's closed)
@​depfu pause
Ignores all future updates for this dependency and closes this PR
@​depfu pause [minor|major]
Ignores all future minor/major updates for this dependency and closes this PR
@​depfu resume
Future versions of this dependency will create PRs again (leaves this PR as is)

@depfu depfu bot added the depfu label Jan 15, 2024
@depfu depfu bot requested a review from a team January 15, 2024 20:37
Copy link

coveralls-official bot commented Jan 15, 2024

Coverage Status

Changes unknown
when pulling 5050e89 on depfu/update/npm/chalk-5.3.0
into ** on main**.

@kraenhansen kraenhansen self-assigned this Jan 15, 2024
@depfu depfu bot force-pushed the depfu/update/npm/chalk-5.3.0 branch from 2defe1b to ff4269e Compare January 18, 2024 06:30
@kraenhansen
Copy link
Member

@​depfu rebase

@depfu depfu bot force-pushed the depfu/update/npm/chalk-5.3.0 branch from ff4269e to 5050e89 Compare January 25, 2024 08:53
@cla-bot cla-bot bot added the cla: yes label Jan 25, 2024
@kraenhansen
Copy link
Member

@​depfu merge

@depfu depfu bot merged commit 3fcac90 into main Jan 25, 2024
34 checks passed
@depfu depfu bot deleted the depfu/update/npm/chalk-5.3.0 branch January 25, 2024 11:50
bimusiek pushed a commit to bimusiek/realm-js that referenced this pull request Mar 14, 2024
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 14, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant