Skip to content
This repository has been archived by the owner on Mar 29, 2020. It is now read-only.

Update chalk to the latest version #686

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Leko
Copy link
Owner

@Leko Leko commented Feb 11, 2020

Version 3.0.0 of chalk was just published.

The version(3.0.0) is not covered by your current version range(^2.4.1).

Release Notes

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

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

  • 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

chalk/chalk@v2.4.1...v3.0.0


Powered by hothouse 🐝

repo:

hothouse:
- chalk: 2.4.1 -> 3.0.0

client-npm:

client-yarn:

monorepo-lerna:

monorepo-yarn-workspaces:

types:
@codecov-io
Copy link

codecov-io commented Feb 11, 2020

Codecov Report

Merging #686 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #686   +/-   ##
=======================================
  Coverage   45.57%   45.57%           
=======================================
  Files          23       23           
  Lines         509      509           
  Branches       59       59           
=======================================
  Hits          232      232           
  Misses        252      252           
  Partials       25       25

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 86c5c39...a7a04de. Read the comment docs.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants