|
1 |
| -import chalk from "chalk"; |
| 1 | +import picocolors from "picocolors"; |
2 | 2 | import debug from "debug";
|
3 | 3 | import "source-map-support/register";
|
4 | 4 |
|
@@ -102,7 +102,7 @@ function showViaIRWarning(resolvedConfig: HardhatConfig) {
|
102 | 102 | if (viaIREnabled) {
|
103 | 103 | console.warn();
|
104 | 104 | console.warn(
|
105 |
| - chalk.yellow( |
| 105 | + picocolors.yellow( |
106 | 106 | `Your solidity settings have viaIR enabled, which is not fully supported yet. You can still use Hardhat, but some features, like stack traces, might not work correctly.
|
107 | 107 |
|
108 | 108 | Learn more at https://hardhat.org/solc-viair`
|
@@ -170,14 +170,16 @@ async function main() {
|
170 | 170 |
|
171 | 171 | // Warning for Hardhat V3 deprecation
|
172 | 172 | console.warn(
|
173 |
| - chalk.yellow.bold("\n\nDEPRECATION WARNING\n\n"), |
174 |
| - chalk.yellow( |
175 |
| - `Initializing a project with ${chalk.white.italic( |
176 |
| - "npx hardhat" |
| 173 | + picocolors.yellow(picocolors.bold("\n\nDEPRECATION WARNING\n\n")), |
| 174 | + picocolors.yellow( |
| 175 | + `Initializing a project with ${picocolors.white( |
| 176 | + picocolors.italic("npx hardhat") |
177 | 177 | )} is deprecated and will be removed in the future.\n`
|
178 | 178 | ),
|
179 |
| - chalk.yellow( |
180 |
| - `Please use ${chalk.white.italic("npx hardhat init")} instead.\n\n` |
| 179 | + picocolors.yellow( |
| 180 | + `Please use ${picocolors.white( |
| 181 | + picocolors.italic("npx hardhat init") |
| 182 | + )} instead.\n\n` |
181 | 183 | )
|
182 | 184 | );
|
183 | 185 |
|
@@ -387,20 +389,22 @@ async function main() {
|
387 | 389 | if (HardhatError.isHardhatError(error)) {
|
388 | 390 | isHardhatError = true;
|
389 | 391 | console.error(
|
390 |
| - chalk.red.bold("Error"), |
391 |
| - error.message.replace(/^\w+:/, (t) => chalk.red.bold(t)) |
| 392 | + picocolors.red(picocolors.bold("Error")), |
| 393 | + error.message.replace(/^\w+:/, (t) => |
| 394 | + picocolors.red(picocolors.bold(t)) |
| 395 | + ) |
392 | 396 | );
|
393 | 397 | } else if (HardhatPluginError.isHardhatPluginError(error)) {
|
394 | 398 | isHardhatError = true;
|
395 | 399 | console.error(
|
396 |
| - chalk.red.bold(`Error in plugin ${error.pluginName}:`), |
| 400 | + picocolors.red(picocolors.bold(`Error in plugin ${error.pluginName}:`)), |
397 | 401 | error.message
|
398 | 402 | );
|
399 | 403 | } else if (error instanceof Error) {
|
400 |
| - console.error(chalk.red("An unexpected error occurred:")); |
| 404 | + console.error(picocolors.red("An unexpected error occurred:")); |
401 | 405 | showStackTraces = true;
|
402 | 406 | } else {
|
403 |
| - console.error(chalk.red("An unexpected error occurred.")); |
| 407 | + console.error(picocolors.red("An unexpected error occurred.")); |
404 | 408 | showStackTraces = true;
|
405 | 409 | }
|
406 | 410 |
|
|
0 commit comments