Skip to content

Commit 1b49eb6

Browse files
committed
Replace chalk with picocolors
1 parent 045f7d7 commit 1b49eb6

File tree

6 files changed

+19
-10
lines changed

6 files changed

+19
-10
lines changed

Diff for: .changeset/rare-moles-kiss.md

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@manypkg/cli": minor
3+
---
4+
5+
Replace chalk with picocolors

Diff for: package.json

+1
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@
4040
"prettier-plugin-packagejson": "^2.3.0",
4141
"typescript": "^5.3.2"
4242
},
43+
"packageManager": "[email protected]+sha512.a6b2f7906b721bba3d67d4aff083df04dad64c399707841b7acf00f6b133b7ac24255f2652fa22ae3534329dc6180534e98d17432037ff6fd140556e2bb3137e",
4344
"engines": {
4445
"node": ">=14.18.0"
4546
},

Diff for: packages/cli/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,14 @@
1414
},
1515
"dependencies": {
1616
"@manypkg/get-packages": "^2.2.1",
17-
"chalk": "^2.4.2",
1817
"detect-indent": "^6.0.0",
1918
"find-up": "^4.1.0",
2019
"fs-extra": "^8.1.0",
2120
"normalize-path": "^3.0.0",
2221
"p-limit": "^2.2.1",
2322
"package-json": "^8.1.0",
2423
"parse-github-url": "^1.0.2",
24+
"picocolors": "^1.1.0",
2525
"sembear": "^0.5.0",
2626
"semver": "^6.3.0",
2727
"spawndamnit": "^2.0.0",

Diff for: packages/cli/src/checks/ROOT_HAS_DEV_DEPENDENCIES.ts

+3-5
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { makeCheck, sortObject } from "./utils";
2-
import chalk from "chalk";
2+
import pc from "picocolors";
33
import { Package } from "@manypkg/get-packages";
44

55
type ErrorType = {
@@ -24,11 +24,9 @@ export default makeCheck<ErrorType>({
2424
delete error.workspace.packageJson.devDependencies;
2525
},
2626
print: () => {
27-
return `the root package.json contains ${chalk.yellow(
27+
return `the root package.json contains ${pc.yellow(
2828
"devDependencies"
29-
)}, this is disallowed as ${chalk.yellow(
30-
"devDependencies"
31-
)} vs ${chalk.green(
29+
)}, this is disallowed as ${pc.yellow("devDependencies")} vs ${pc.green(
3230
"dependencies"
3331
)} in a private package does not affect anything and creates confusion.`;
3432
},

Diff for: packages/cli/src/logger.ts

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

44
export function format(
@@ -7,9 +7,9 @@ export function format(
77
scope?: string
88
) {
99
let prefix = {
10-
error: chalk.red("error"),
11-
success: chalk.green("success"),
12-
info: chalk.cyan("info"),
10+
error: pc.red("error"),
11+
success: pc.green("success"),
12+
info: pc.cyan("info"),
1313
}[messageType];
1414
let fullPrefix = "☔️ " + prefix + (scope === undefined ? "" : " " + scope);
1515
return (

Diff for: yarn.lock

+5
Original file line numberDiff line numberDiff line change
@@ -11335,6 +11335,11 @@ picocolors@^1.0.0:
1133511335
resolved "https://registry.yarnpkg.com/picocolors/-/picocolors-1.0.0.tgz#cb5bdc74ff3f51892236eaf79d68bc44564ab81c"
1133611336
integrity sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==
1133711337

11338+
picocolors@^1.1.0:
11339+
version "1.1.0"
11340+
resolved "https://registry.yarnpkg.com/picocolors/-/picocolors-1.1.0.tgz#5358b76a78cde483ba5cef6a9dc9671440b27d59"
11341+
integrity sha512-TQ92mBOW0l3LeMeyLV6mzy/kWr8lkd/hp3mTg7wYK7zJhuBStmGMBG0BdeDZS/dZx1IukaX6Bk11zcln25o1Aw==
11342+
1133811343
picomatch@^2.0.4, picomatch@^2.0.5:
1133911344
version "2.0.7"
1134011345
resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-2.0.7.tgz#514169d8c7cd0bdbeecc8a2609e34a7163de69f6"

0 commit comments

Comments
 (0)