Skip to content

Commit

Permalink
Fix picocolors bugs
Browse files Browse the repository at this point in the history
  • Loading branch information
alcuadrado committed Oct 26, 2024
1 parent 34d037b commit a0a9d3d
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 11 deletions.
2 changes: 1 addition & 1 deletion packages/hardhat-core/src/internal/cli/bootstrap.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { isNodeVersionToWarnOn } from "./is-node-version-to-warn-on";

if (isNodeVersionToWarnOn(process.version)) {
console.warn(
chalk.yellow.bold(`WARNING:`),
chalk.yellow(chalk.bold(`WARNING:`)),
`You are currently using Node.js ${process.version}, which is not supported by Hardhat. This can lead to unexpected behavior. See https://hardhat.org/nodejs-versions`
);
console.log();
Expand Down
16 changes: 9 additions & 7 deletions packages/hardhat-core/src/internal/cli/cli.ts
Original file line number Diff line number Diff line change
Expand Up @@ -170,14 +170,16 @@ async function main() {

// Warning for Hardhat V3 deprecation
console.warn(
chalk.yellow.bold("\n\nDEPRECATION WARNING\n\n"),
chalk.yellow(chalk.bold("\n\nDEPRECATION WARNING\n\n")),
chalk.yellow(
`Initializing a project with ${chalk.white.italic(
"npx hardhat"
`Initializing a project with ${chalk.white(
chalk.italic("npx hardhat")
)} is deprecated and will be removed in the future.\n`
),
chalk.yellow(
`Please use ${chalk.white.italic("npx hardhat init")} instead.\n\n`
`Please use ${chalk.white(
chalk.italic("npx hardhat init")
)} instead.\n\n`
)
);

Expand Down Expand Up @@ -387,13 +389,13 @@ async function main() {
if (HardhatError.isHardhatError(error)) {
isHardhatError = true;
console.error(
chalk.red.bold("Error"),
error.message.replace(/^\w+:/, (t) => chalk.red.bold(t))
chalk.red(chalk.bold("Error")),
error.message.replace(/^\w+:/, (t) => chalk.red(chalk.bold(t)))
);
} else if (HardhatPluginError.isHardhatPluginError(error)) {
isHardhatError = true;
console.error(
chalk.red.bold(`Error in plugin ${error.pluginName}:`),
chalk.red(chalk.bold(`Error in plugin ${error.pluginName}:`)),
error.message
);
} else if (error instanceof Error) {
Expand Down
15 changes: 12 additions & 3 deletions packages/hardhat-ethers/test/environment.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,10 @@ export function useEnvironment(

afterEach(function () {
if (this.currentTest?.state === "failed") {
console.log(chalk.red("Failed in fixture project", fixtureProjectPath));
console.log(
chalk.red("Failed in fixture project"),
chalk.red(fixtureProjectPath)
);
}
});
}
Expand Down Expand Up @@ -70,7 +73,10 @@ export function usePersistentEnvironment(

afterEach(function () {
if (this.currentTest?.state === "failed") {
console.log(chalk.red("Failed in fixture project", fixtureProjectPath));
console.log(
chalk.red("Failed in fixture project"),
chalk.red(fixtureProjectPath)
);
}
});
}
Expand Down Expand Up @@ -159,7 +165,10 @@ contract Example {

afterEach(function () {
if (this.currentTest?.state === "failed") {
console.log(chalk.red("Failed in fixture project", fixtureProjectPath));
console.log(
chalk.red("Failed in fixture project"),
chalk.red(fixtureProjectPath)
);
}
});
}

0 comments on commit a0a9d3d

Please sign in to comment.