Upgrading chalk 3 to 4
Breaking3.0.0 → 4.1.2Breaking1Platform1New1Fixed1Other2
BreakingUpgrade verdict
1 breaking change and a platform requirement change.
In plain terms
- TypeScript users who compared against `Level.None` must compare against the number 0 instead.
- This version needs a newer version of Node.js (10 or newer) to run.
Must act 2 items need code or config changes
Node.js requirement changed in 4.0.0: >=8 → >=10.
What you must change
Breaking1
Changes the
Level TypeScript type from an enum to a union type.LevelLevel.NonePlatform1
Requires Node.js 10 or later.
API changes
Generated by DepDelta from published .d.ts files. Not mixed with prose notes.
- removed:
interface chalk.Instance - removed:
new chalk.Instance(options?: Options): Chalk - changed:
const chalk: chalk.Chalk & chalk.ChalkFunction & { supportsColor: chalk.ColorSupport | false; Level: typeof LevelEnum; Color: Color; ForegroundColor: ForegroundColor; Backg… → const chalk: chalk.Chalk & chalk.ChalkFunction & { supportsColor: chalk.ColorSupport | false; Level: chalk.Level; Color: Color; ForegroundColor: ForegroundColor; Background… - changed:
type chalk.Level = LevelEnum → type chalk.Level = 0 | 1 | 2 | 3 - added:
type chalk.Instance = new (options?: Options) => Chalk