Skip to content

Commit c7262c5

Browse files
committed
Rename chalk to picocolors
1 parent 90bcfda commit c7262c5

File tree

5 files changed

+13
-13
lines changed

5 files changed

+13
-13
lines changed

packages/hardhat-verify/src/index.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import type {
55
} from "./internal/solc/artifacts";
66
import type { Bytecode } from "./internal/solc/bytecode";
77

8-
import chalk from "picocolors";
8+
import picocolors from "picocolors";
99
import { extendConfig, subtask, task, types } from "hardhat/config";
1010

1111
import {
@@ -197,7 +197,7 @@ subtask(
197197
!config.blockscout.enabled
198198
) {
199199
console.warn(
200-
chalk.yellow(
200+
picocolors.yellow(
201201
`[WARNING] No verification services are enabled. Please enable at least one verification service in your configuration.`
202202
)
203203
);

packages/hardhat-verify/src/internal/config.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import type {
66
BlockscoutConfig,
77
} from "../types";
88

9-
import chalk from "picocolors";
9+
import picocolors from "picocolors";
1010

1111
export function etherscanConfigExtender(
1212
config: HardhatConfig,
@@ -28,7 +28,7 @@ export function etherscanConfigExtender(
2828
config.networks?.etherscan !== undefined
2929
) {
3030
console.warn(
31-
chalk.yellow(
31+
picocolors.yellow(
3232
"WARNING: you have an 'etherscan' entry in your networks configuration. This is likely a mistake. The etherscan configuration should be at the root of the configuration, not within the networks object."
3333
)
3434
);

packages/hardhat-verify/src/internal/tasks/sourcify.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import type {
44
LibraryToAddress,
55
} from "../solc/artifacts";
66

7-
import chalk from "picocolors";
7+
import picocolors from "picocolors";
88
import { subtask, types } from "hardhat/config";
99
import { isFullyQualifiedName } from "hardhat/utils/contract-names";
1010
import { HARDHAT_NETWORK_NAME } from "hardhat/plugins";
@@ -224,7 +224,7 @@ ${contractURL}
224224

225225
subtask(TASK_VERIFY_SOURCIFY_DISABLED_WARNING, async () => {
226226
console.info(
227-
chalk.cyan(
227+
picocolors.cyan(
228228
`[INFO] Sourcify Verification Skipped: Sourcify verification is currently disabled. To enable it, add the following entry to your Hardhat configuration:
229229
230230
sourcify: {

packages/hardhat-verify/src/internal/utilities.ts

+5-5
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import type { JsonFragment } from "@ethersproject/abi";
22
import type { SolidityConfig } from "hardhat/types";
33
import type { ChainConfig } from "../types";
44

5-
import chalk from "picocolors";
5+
import picocolors from "picocolors";
66
import path from "path";
77
import { builtinChains } from "./chain-config";
88
import {
@@ -45,7 +45,7 @@ export async function printSupportedNetworks(
4545
]);
4646

4747
const supportedNetworksTable = table([
48-
[chalk.bold("network"), chalk.bold("chain id")],
48+
[picocolors.bold("network"), picocolors.bold("chain id")],
4949
...supportedNetworks,
5050
]);
5151

@@ -58,7 +58,7 @@ export async function printSupportedNetworks(
5858
const customNetworksTable =
5959
customNetworks.length > 0
6060
? table([
61-
[chalk.bold("network"), chalk.bold("chain id")],
61+
[picocolors.bold("network"), picocolors.bold("chain id")],
6262
...customNetworks,
6363
])
6464
: table([["No custom networks were added"]]);
@@ -85,7 +85,7 @@ To learn how to add custom networks, follow these instructions: https://hardhat.
8585
* are the names of verification subtasks and the values are HardhatVerifyError
8686
* objects describing the specific errors.
8787
* @remarks This function formats and logs the verification errors to the
88-
* console with a red color using chalk. Each error is displayed along with the
88+
* console with a red color using picocolors. Each error is displayed along with the
8989
* name of the verification provider it belongs to.
9090
* @example
9191
* const errors: Record<string, HardhatVerifyError> = {
@@ -119,7 +119,7 @@ export function printVerificationErrors(
119119
errorMessage += `${subtaskLabel}:\n${error.message}\n\n`;
120120
}
121121

122-
console.error(chalk.red(errorMessage));
122+
console.error(picocolors.red(errorMessage));
123123
}
124124

125125
/**

packages/hardhat-verify/test/unit/utilities.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import type { ChainConfig } from "../../src/types";
55
import path from "path";
66
import { assert, expect } from "chai";
77
import sinon from "sinon";
8-
import chalk from "picocolors";
8+
import picocolors from "picocolors";
99

1010
import {
1111
encodeArguments,
@@ -65,7 +65,7 @@ describe("Utilities", () => {
6565
const errorMessage = errorStub.getCall(0).args[0];
6666
assert.equal(
6767
errorMessage,
68-
chalk.red(
68+
picocolors.red(
6969
`hardhat-verify found one or more errors during the verification process:
7070
7171
Etherscan:

0 commit comments

Comments
 (0)