From c7ec501a8306ea850f326a8dd79edf2106a63a15 Mon Sep 17 00:00:00 2001 From: Alan Agius Date: Mon, 10 Jan 2022 16:30:07 +0100 Subject: [PATCH] fix: replace `colors` with `ansi-colors` The author of the colors package purpose broke this package. See: https://www.bleepingcomputer.com/news/security/dev-corrupts-npm-libs-colors-and-faker-breaking-thousands-of-apps/ and https://github.com/Marak/colors.js/issues/285 Closes #3738 --- lib/reporters/base_color.js | 2 +- package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/reporters/base_color.js b/lib/reporters/base_color.js index f45c04110..4025984e8 100644 --- a/lib/reporters/base_color.js +++ b/lib/reporters/base_color.js @@ -1,4 +1,4 @@ -const { red, yellow, green, cyan } = require('colors/safe') +const { red, yellow, green, cyan } = require('ansi-colors') function BaseColorReporter () { this.USE_COLORS = true diff --git a/package.json b/package.json index a6a67fe29..ea8388eed 100644 --- a/package.json +++ b/package.json @@ -421,10 +421,10 @@ "weiran.zsd@outlook.com>" ], "dependencies": { + "ansi-colors": "^4.1.1", "body-parser": "^1.19.0", "braces": "^3.0.2", "chokidar": "^3.5.1", - "colors": "^1.4.0", "connect": "^3.7.0", "di": "^0.0.1", "dom-serialize": "^2.2.1",