From 07fa1e47bbf10daa6e07dba0ede8ac87211a3dbc Mon Sep 17 00:00:00 2001 From: Nitin Kumar Date: Fri, 24 Sep 2021 15:14:24 +0530 Subject: [PATCH] chore: migrate to `nanocolors` --- lib/Server.js | 8 ++++---- package-lock.json | 22 +++++++++++----------- package.json | 2 +- 3 files changed, 16 insertions(+), 16 deletions(-) diff --git a/lib/Server.js b/lib/Server.js index 30304804a5..16d1c428af 100644 --- a/lib/Server.js +++ b/lib/Server.js @@ -1672,7 +1672,7 @@ class Server { } logStatus() { - const colorette = require("colorette"); + const nanocolors = require("nanocolors"); const getColorsOption = (compilerOptions) => { let colorsEnabled; @@ -1683,7 +1683,7 @@ class Server { ) { colorsEnabled = compilerOptions.stats; } else { - colorsEnabled = colorette.isColorSupported; + colorsEnabled = nanocolors.isColorSupported; } return colorsEnabled; @@ -1692,14 +1692,14 @@ class Server { const colors = { info(useColor, msg) { if (useColor) { - return colorette.cyan(msg); + return nanocolors.cyan(msg); } return msg; }, error(useColor, msg) { if (useColor) { - return colorette.red(msg); + return nanocolors.red(msg); } return msg; diff --git a/package-lock.json b/package-lock.json index 9e5be8e8cc..87934a9116 100644 --- a/package-lock.json +++ b/package-lock.json @@ -12,7 +12,6 @@ "ansi-html-community": "^0.0.8", "bonjour": "^3.5.0", "chokidar": "^3.5.1", - "colorette": "^2.0.5", "compression": "^1.7.4", "connect-history-api-fallback": "^1.6.0", "del": "^6.0.0", @@ -22,6 +21,7 @@ "http-proxy-middleware": "^2.0.0", "internal-ip": "^6.2.0", "ipaddr.js": "^2.0.1", + "nanocolors": "^0.1.12", "open": "^8.0.9", "p-retry": "^4.5.0", "portfinder": "^1.0.28", @@ -4619,11 +4619,6 @@ "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=", "dev": true }, - "node_modules/colorette": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/colorette/-/colorette-2.0.5.tgz", - "integrity": "sha512-rPmg56Y2iDrBBoQN9A8TwkXpIKtk0dWo2PZvIK1AcY6SLdIbgg0mtLm+o0MQFHZhiMQ6cVgL+wkTEO9XPPM4Wg==" - }, "node_modules/combined-stream": { "version": "1.0.8", "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", @@ -11566,6 +11561,11 @@ "resolved": "https://registry.npmjs.org/multicast-dns-service-types/-/multicast-dns-service-types-1.1.0.tgz", "integrity": "sha1-iZ8R2WhuXgXLkbNdXw5jt3PPyQE=" }, + "node_modules/nanocolors": { + "version": "0.1.12", + "resolved": "https://registry.npmjs.org/nanocolors/-/nanocolors-0.1.12.tgz", + "integrity": "sha512-2nMHqg1x5PU+unxX7PGY7AuYxl2qDx7PSrTRjizr8sxdd3l/3hBuWWaki62qmtYm2U5i4Z5E7GbjlyDFhs9/EQ==" + }, "node_modules/nanoid": { "version": "3.1.25", "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.1.25.tgz", @@ -19171,11 +19171,6 @@ "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=", "dev": true }, - "colorette": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/colorette/-/colorette-2.0.5.tgz", - "integrity": "sha512-rPmg56Y2iDrBBoQN9A8TwkXpIKtk0dWo2PZvIK1AcY6SLdIbgg0mtLm+o0MQFHZhiMQ6cVgL+wkTEO9XPPM4Wg==" - }, "combined-stream": { "version": "1.0.8", "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", @@ -24366,6 +24361,11 @@ "resolved": "https://registry.npmjs.org/multicast-dns-service-types/-/multicast-dns-service-types-1.1.0.tgz", "integrity": "sha1-iZ8R2WhuXgXLkbNdXw5jt3PPyQE=" }, + "nanocolors": { + "version": "0.1.12", + "resolved": "https://registry.npmjs.org/nanocolors/-/nanocolors-0.1.12.tgz", + "integrity": "sha512-2nMHqg1x5PU+unxX7PGY7AuYxl2qDx7PSrTRjizr8sxdd3l/3hBuWWaki62qmtYm2U5i4Z5E7GbjlyDFhs9/EQ==" + }, "nanoid": { "version": "3.1.25", "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.1.25.tgz", diff --git a/package.json b/package.json index 43c5e2c99e..73cda092ab 100644 --- a/package.json +++ b/package.json @@ -35,7 +35,6 @@ "ansi-html-community": "^0.0.8", "bonjour": "^3.5.0", "chokidar": "^3.5.1", - "colorette": "^2.0.5", "compression": "^1.7.4", "connect-history-api-fallback": "^1.6.0", "del": "^6.0.0", @@ -45,6 +44,7 @@ "http-proxy-middleware": "^2.0.0", "internal-ip": "^6.2.0", "ipaddr.js": "^2.0.1", + "nanocolors": "^0.1.12", "open": "^8.0.9", "p-retry": "^4.5.0", "portfinder": "^1.0.28",