From 75f3fc142b97f8b2a925ce718fb6cd83679c755e Mon Sep 17 00:00:00 2001 From: Mark Lee Date: Sat, 8 Jan 2022 21:21:31 -0800 Subject: [PATCH] fix: replace colors with chalk --- package.json | 2 +- src/cli.ts | 6 +++--- yarn.lock | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index 29707c92..41ced17f 100644 --- a/package.json +++ b/package.json @@ -39,7 +39,7 @@ }, "dependencies": { "@malept/cross-spawn-promise": "^2.0.0", - "colors": "^1.3.3", + "chalk": "^4.0.0", "debug": "^4.1.1", "detect-libc": "^1.0.3", "fs-extra": "^10.0.0", diff --git a/src/cli.ts b/src/cli.ts index 473ae612..358a10ff 100644 --- a/src/cli.ts +++ b/src/cli.ts @@ -1,6 +1,6 @@ #!/usr/bin/env node -import 'colors'; +import chalk from 'chalk'; import * as fs from 'fs-extra'; import * as path from 'path'; import ora = require('ora'); @@ -49,8 +49,8 @@ if (process.argv.length === 3 && process.argv[2] === '--version') { } const handler = (err: Error): void => { - console.error('\nAn unhandled error occurred inside electron-rebuild'.red); - console.error(`${err.message}\n\n${err.stack}`.red); + console.error(chalk.red('\nAn unhandled error occurred inside electron-rebuild')); + console.error(chalk.red(`${err.message}\n\n${err.stack}`)); process.exit(-1); }; diff --git a/yarn.lock b/yarn.lock index 471ca88e..14875fab 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1815,7 +1815,7 @@ colors@1.0.3: resolved "https://registry.yarnpkg.com/colors/-/colors-1.0.3.tgz#0433f44d809680fdeb60ed260f1b0c262e82a40b" integrity sha1-BDP0TYCWgP3rYO0mDxsMJi6CpAs= -colors@^1.1.2, colors@^1.3.3: +colors@^1.1.2: version "1.4.0" resolved "https://registry.yarnpkg.com/colors/-/colors-1.4.0.tgz#c50491479d4c1bdaed2c9ced32cf7c7dc2360f78" integrity sha512-a+UqTh4kgZg/SlGvfbzDHpgRu7AAQOmmqRHJnxhRZICKFUT91brVhNNt58CMWU9PsBbv3PDCZUHbVxuDiH2mtA==