Skip to content

Commit 79acd9b

Browse files
talentlessguyalcuadrado
authored andcommitted
replace chalk with picocolors
1 parent d3219cf commit 79acd9b

File tree

31 files changed

+53
-53
lines changed

31 files changed

+53
-53
lines changed

packages/hardhat-core/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,6 @@
113113
"aggregate-error": "^3.0.0",
114114
"ansi-escapes": "^4.3.0",
115115
"boxen": "^5.1.2",
116-
"chalk": "^2.4.2",
117116
"chokidar": "^4.0.0",
118117
"ci-info": "^2.0.0",
119118
"debug": "^4.1.1",
@@ -132,6 +131,7 @@
132131
"mnemonist": "^0.38.0",
133132
"mocha": "^10.0.0",
134133
"p-map": "^4.0.0",
134+
"picocolors": "^1.1.0",
135135
"raw-body": "^2.4.1",
136136
"resolve": "1.17.0",
137137
"semver": "^6.3.0",

packages/hardhat-core/src/builtin-tasks/compile.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import os from "os";
2-
import chalk from "chalk";
2+
import chalk from "picocolors";
33
import debug from "debug";
44
import fsExtra from "fs-extra";
55
import semver from "semver";
@@ -800,11 +800,11 @@ subtask(TASK_COMPILE_SOLIDITY_LOG_COMPILATION_ERRORS)
800800
getFormattedInternalCompilerErrorMessage(error) ??
801801
error.formattedMessage;
802802

803-
console.error(errorMessage.replace(/^\w+:/, (t) => chalk.red.bold(t)));
803+
console.error(errorMessage.replace(/^\w+:/, (t) => chalk.bold(chalk.red(t))));
804804
} else {
805805
console.warn(
806806
(error.formattedMessage as string).replace(/^\w+:/, (t) =>
807-
chalk.yellow.bold(t)
807+
chalk.bold(chalk.yellow(t))
808808
)
809809
);
810810
}

packages/hardhat-core/src/builtin-tasks/flatten.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import chalk from "chalk";
1+
import chalk from "picocolors";
22
import { subtask, task, types } from "../internal/core/config/config-env";
33
import { HardhatError } from "../internal/core/errors";
44
import { ERRORS } from "../internal/core/errors-list";

packages/hardhat-core/src/builtin-tasks/node.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import type EthereumjsUtilT from "@nomicfoundation/ethereumjs-util";
22

3-
import chalk from "chalk";
3+
import chalk from "picocolors";
44
import debug from "debug";
55
import fsExtra from "fs-extra";
66

packages/hardhat-core/src/builtin-tasks/test.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import type { MochaOptions } from "mocha";
22

3-
import chalk from "chalk";
3+
import chalk from "picocolors";
44
import path from "path";
55

66
import { HARDHAT_NETWORK_NAME } from "../internal/constants";

packages/hardhat-core/src/builtin-tasks/utils/watch.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import chalk from "chalk";
1+
import chalk from "picocolors";
22
import { FSWatcher } from "chokidar";
33
import debug from "debug";
44
import fsExtra from "fs-extra";

packages/hardhat-core/src/internal/cli/bootstrap.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/usr/bin/env node
22

3-
import chalk from "chalk";
3+
import chalk from "picocolors";
44

55
import { isNodeVersionToWarnOn } from "./is-node-version-to-warn-on";
66

packages/hardhat-core/src/internal/cli/cli.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import chalk from "chalk";
1+
import chalk from "picocolors";
22
import debug from "debug";
33
import "source-map-support/register";
44

packages/hardhat-core/src/internal/cli/project-creation.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import chalk from "chalk";
1+
import chalk from "picocolors";
22
import fsExtra from "fs-extra";
33
import path from "path";
44

packages/hardhat-core/src/internal/cli/vars.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import chalk from "chalk";
1+
import chalk from "picocolors";
22
import debug from "debug";
33
import { HardhatError, assertHardhatInvariant } from "../core/errors";
44
import { ERRORS } from "../core/errors-list";

packages/hardhat-core/src/internal/cli/version-notifier.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import boxen from "boxen";
2-
import chalk from "chalk";
2+
import chalk from "picocolors";
33
import fsExtra from "fs-extra";
44
import { join } from "node:path";
55
import { mkdir, readFile, writeFile } from "node:fs/promises";

packages/hardhat-core/src/internal/core/config/config-loading.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import type StackTraceParserT from "stacktrace-parser";
22

3-
import chalk from "chalk";
3+
import chalk from "picocolors";
44
import debug from "debug";
55
import fsExtra from "fs-extra";
66
import path from "path";

packages/hardhat-core/src/internal/hardhat-network/provider/provider.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ import type {
1818
SubscriptionEvent,
1919
} from "@nomicfoundation/edr";
2020
import { Common } from "@nomicfoundation/ethereumjs-common";
21-
import chalk from "chalk";
21+
import chalk from "picocolors";
2222
import debug from "debug";
2323
import { EventEmitter } from "events";
2424
import fsExtra from "fs-extra";

packages/hardhat-core/src/internal/hardhat-network/provider/utils/fork-recomendations-banner.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import chalk from "chalk";
1+
import chalk from "picocolors";
22
import fsExtra from "fs-extra";
33
import path from "path";
44

packages/hardhat-core/src/internal/hardhat-network/provider/utils/makeForkClient.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import chalk from "chalk";
1+
import chalk from "picocolors";
22

33
import { HARDHAT_NETWORK_NAME } from "../../../constants";
44
import { assertHardhatInvariant } from "../../../core/errors";

packages/hardhat-core/src/internal/hardhat-network/stack-traces/vm-trace-decoder.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import type { VmTraceDecoder as VmTraceDecoderT } from "@nomicfoundation/edr";
2-
import chalk from "chalk";
2+
import chalk from "picocolors";
33
import debug from "debug";
44
import { Reporter } from "../../sentry/reporter";
55
import { TracingConfig } from "../provider/node-types";

packages/hardhat-core/test/builtin-tasks/flatten.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { assert } from "chai";
22
import fs from "fs";
33

44
import sinon, { SinonSpy } from "sinon";
5-
import chalk from "chalk";
5+
import chalk from "picocolors";
66
import {
77
TASK_FLATTEN,
88
TASK_FLATTEN_GET_FLATTENED_SOURCE,

packages/hardhat-core/test/internal/cli/vars/vars.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import fs from "fs-extra";
55
import * as os from "os";
66
import sinon, { SinonSandbox } from "sinon";
77
import { assert, expect } from "chai";
8-
import chalk from "chalk";
8+
import chalk from "picocolors";
99
import enquirer from "enquirer";
1010
import { HardhatContext } from "../../../../src/internal/context";
1111
import { handleVars } from "../../../../src/internal/cli/vars";

packages/hardhat-core/test/setup.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import chai from "chai";
22
import chaiAsPromised from "chai-as-promised";
3-
import chalk from "chalk";
3+
import chalk from "picocolors";
44

55
chai.use(chaiAsPromised);
66

packages/hardhat-ethers/package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,8 @@
4040
],
4141
"dependencies": {
4242
"debug": "^4.1.1",
43-
"lodash.isequal": "^4.5.0"
43+
"lodash.isequal": "^4.5.0",
44+
"picocolors": "^1.1.0"
4445
},
4546
"devDependencies": {
4647
"@nomicfoundation/eslint-plugin-hardhat-internal-rules": "workspace:^",
@@ -56,7 +57,6 @@
5657
"@typescript-eslint/parser": "5.61.0",
5758
"chai": "^4.2.0",
5859
"chai-as-promised": "^7.1.1",
59-
"chalk": "^2.4.2",
6060
"eslint": "^8.44.0",
6161
"eslint-config-prettier": "8.3.0",
6262
"eslint-plugin-import": "2.27.5",

packages/hardhat-ethers/test/environment.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import chalk from "chalk";
1+
import chalk from "picocolors";
22
import fs from "fs";
33
import { HardhatRuntimeEnvironment, HardhatUserConfig } from "hardhat/types";
44
import { resetHardhatContext } from "hardhat/plugins-testing";

packages/hardhat-foundry/package.json

+3-3
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,6 @@
3232
"LICENSE",
3333
"README.md"
3434
],
35-
"dependencies": {
36-
"chalk": "^2.4.2"
37-
},
3835
"devDependencies": {
3936
"@nomicfoundation/eslint-plugin-hardhat-internal-rules": "workspace:^",
4037
"@nomicfoundation/eslint-plugin-slow-imports": "workspace:^",
@@ -58,5 +55,8 @@
5855
},
5956
"peerDependencies": {
6057
"hardhat": "workspace:^2.17.2"
58+
},
59+
"dependencies": {
60+
"picocolors": "^1.1.0"
6161
}
6262
}

packages/hardhat-foundry/src/foundry.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import chalk from "chalk";
1+
import chalk from "picocolors";
22
import { exec as execCallback, execSync } from "child_process";
33
import { NomicLabsHardhatPluginError } from "hardhat/internal/core/errors";
44
import { promisify } from "util";

packages/hardhat-foundry/src/index.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import {
77
import { HardhatRuntimeEnvironment } from "hardhat/types";
88
import { existsSync, writeFileSync } from "fs";
99
import path from "path";
10-
import chalk from "chalk";
10+
import chalk from "picocolors";
1111
import {
1212
getForgeConfig,
1313
getRemappings,

packages/hardhat-verify/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,9 @@
4242
"@ethersproject/abi": "^5.1.2",
4343
"@ethersproject/address": "^5.0.2",
4444
"cbor": "^8.1.0",
45-
"chalk": "^2.4.2",
4645
"debug": "^4.1.1",
4746
"lodash.clonedeep": "^4.5.0",
47+
"picocolors": "^1.1.0",
4848
"semver": "^6.3.0",
4949
"table": "^6.8.0",
5050
"undici": "^5.14.0"

packages/hardhat-verify/src/index.ts

+1-1
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 "chalk";
8+
import chalk from "picocolors";
99
import { extendConfig, subtask, task, types } from "hardhat/config";
1010

1111
import {

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

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

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

1111
export function etherscanConfigExtender(
1212
config: HardhatConfig,

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

+1-1
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 "chalk";
7+
import chalk 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";

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

+1-1
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 "chalk";
5+
import chalk from "picocolors";
66
import path from "path";
77
import { builtinChains } from "./chain-config";
88
import {

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

+1-1
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 "chalk";
8+
import chalk from "picocolors";
99

1010
import {
1111
encodeArguments,

pnpm-lock.yaml

+18-18
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)