From 53c1ef8de12e50a83c410b37246547e51bbd18a0 Mon Sep 17 00:00:00 2001 From: Patricio Palladino Date: Sat, 26 Oct 2024 23:01:41 +0000 Subject: [PATCH] Rename chalk to picocolors --- packages/hardhat-foundry/src/foundry.ts | 4 ++-- packages/hardhat-foundry/src/index.ts | 8 +++++--- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/packages/hardhat-foundry/src/foundry.ts b/packages/hardhat-foundry/src/foundry.ts index 47d57ce7b8..77de6c275a 100644 --- a/packages/hardhat-foundry/src/foundry.ts +++ b/packages/hardhat-foundry/src/foundry.ts @@ -1,4 +1,4 @@ -import chalk from "picocolors"; +import picocolors from "picocolors"; import { exec as execCallback, execSync } from "child_process"; import { NomicLabsHardhatPluginError } from "hardhat/internal/core/errors"; import { promisify } from "util"; @@ -75,7 +75,7 @@ export async function getRemappings() { export async function installDependency(dependency: string) { const cmd = `forge install --no-commit ${dependency}`; - console.log(`Running '${chalk.blue(cmd)}'`); + console.log(`Running '${picocolors.blue(cmd)}'`); try { await exec(cmd); diff --git a/packages/hardhat-foundry/src/index.ts b/packages/hardhat-foundry/src/index.ts index b9a856fa18..68d1b061ae 100644 --- a/packages/hardhat-foundry/src/index.ts +++ b/packages/hardhat-foundry/src/index.ts @@ -7,7 +7,7 @@ import { import { HardhatRuntimeEnvironment } from "hardhat/types"; import { existsSync, writeFileSync } from "fs"; import path from "path"; -import chalk from "picocolors"; +import picocolors from "picocolors"; import { getForgeConfig, getRemappings, @@ -24,7 +24,7 @@ extendConfig((config, userConfig) => { if (!existsSync(path.join(config.paths.root, "foundry.toml"))) { if (!process.argv.includes(TASK_INIT_FOUNDRY)) { console.log( - chalk.yellow( + picocolors.yellow( `Warning: You are using the hardhat-foundry plugin but there isn't a foundry.toml file in your project. Run 'npx hardhat ${TASK_INIT_FOUNDRY}' to create one.` ) ); @@ -112,7 +112,9 @@ task( ); if (existsSync(foundryConfigPath)) { - console.warn(chalk.yellow(`File foundry.toml already exists. Aborting.`)); + console.warn( + picocolors.yellow(`File foundry.toml already exists. Aborting.`) + ); process.exit(1); }