From 5944a01549dd94871edc6f97ac59be143f75bc0a Mon Sep 17 00:00:00 2001 From: Kiril Vatev Date: Sun, 12 Jan 2020 13:31:12 -0500 Subject: [PATCH] updating to the latest chalk --- package.json | 2 +- src/log.js | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index f931c39..c94f454 100644 --- a/package.json +++ b/package.json @@ -38,7 +38,7 @@ "xvfb-maybe": "^0.2.1" }, "dependencies": { - "chalk": "^2.4.2", + "chalk": "^3.0.0", "import-from": "^3.0.0", "runtime-required": "^1.0.2", "watchboy": "^0.4.0" diff --git a/src/log.js b/src/log.js index ea61846..fab886f 100644 --- a/src/log.js +++ b/src/log.js @@ -9,8 +9,8 @@ const levels = { }; const logger = (level, maxLevel, stream) => { - const isTTY = stream.isTTY || Number(process.env.FORCE_COLOR) === 1; - const color = new chalk.constructor({ level: isTTY ? 1 : 0 }); + const isTTY = stream.isTTY || Number(process.env.FORCE_COLOR) > 1; + const color = new chalk.Instance({ level: isTTY ? 1 : 0 }); const thisLevel = levels[level];