Skip to content

Commit

Permalink
refactor: replace colorette with picocolors
Browse files Browse the repository at this point in the history
  • Loading branch information
sxzz committed Jul 19, 2024
1 parent 0303783 commit aeda546
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 12 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@
"execa": "^5.1.1",
"globby": "^11.1.0",
"joycon": "^3.1.1",
"picocolors": "^1.0.1",
"postcss-load-config": "^6.0.1",
"resolve-from": "^5.0.0",
"rollup": "^4.18.1",
Expand All @@ -74,7 +75,6 @@
"@types/fs-extra": "11.0.4",
"@types/node": "20.14.11",
"@types/resolve": "1.20.6",
"colorette": "2.0.20",
"flat": "6.0.1",
"fs-extra": "11.2.0",
"postcss": "8.4.39",
Expand Down
11 changes: 3 additions & 8 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/errors.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { isMainThread, parentPort } from 'node:worker_threads'
import * as colors from 'colorette'
import * as colors from 'picocolors'

export class PrettyError extends Error {
constructor(message: string) {
Expand Down
2 changes: 1 addition & 1 deletion src/lib/report-size.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import * as colors from 'colorette'
import * as colors from 'picocolors'
import type { Logger } from '../log'

const prettyBytes = (bytes: number) => {
Expand Down
2 changes: 1 addition & 1 deletion src/log.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import util from 'node:util'
import { isMainThread, parentPort } from 'node:worker_threads'
import * as colors from 'colorette'
import * as colors from 'picocolors'

type LOG_TYPE = 'info' | 'success' | 'error' | 'warn'

Expand Down

0 comments on commit aeda546

Please sign in to comment.