From e94641221634f9d5de09cbf57f8bb3d750a0dd74 Mon Sep 17 00:00:00 2001 From: Ihor Machuzhak Date: Sun, 12 Mar 2023 22:25:30 +0200 Subject: [PATCH] Update to Chalk 5 --- index.js | 5 +++-- package.json | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/index.js b/index.js index 6b8af76..1a484a6 100644 --- a/index.js +++ b/index.js @@ -1,4 +1,5 @@ -import chalk from 'chalk'; +// eslint-disable-next-line unicorn/import-style +import chalk, {chalkStderr} from 'chalk'; // eslint-disable-next-line unicorn/better-regex const TEMPLATE_REGEX = /(?:\\(u(?:[a-f\d]{4}|{[a-f\d]{1,6}})|x[a-f\d]{2}|.))|(?:{(~)?(#?[\w:]+(?:\([^)]*\))?(?:\.#?[\w:]+(?:\([^)]*\))?)*)(?:[ \t]|(?=\r?\n)))|(})|((?:.|[\r\n\f])+?)/gi; @@ -182,5 +183,5 @@ function makeChalkTemplate(template) { export const template = makeTemplate(chalk); export default makeChalkTemplate(template); -export const templateStderr = makeTemplate(chalk.stderr); +export const templateStderr = makeTemplate(chalkStderr); export const chalkTemplateStderr = makeChalkTemplate(templateStderr); diff --git a/package.json b/package.json index 74f4823..8436ec0 100644 --- a/package.json +++ b/package.json @@ -46,7 +46,7 @@ "text" ], "dependencies": { - "chalk": "^4.1.2" + "chalk": "^5.2.0" }, "devDependencies": { "ava": "^5.1.0",