Skip to content

Commit

Permalink
Chalk to picocolors migration (#582)
Browse files Browse the repository at this point in the history
Co-authored-by: yifancong <[email protected]>
  • Loading branch information
nhducit and easy1090 authored Nov 6, 2024
1 parent c3a64ca commit b3bfa6b
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 15 deletions.
2 changes: 1 addition & 1 deletion packages/cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@
"@rsdoctor/types": "workspace:*",
"@rsdoctor/utils": "workspace:*",
"axios": "^1.7.7",
"chalk": "^4.1.2",
"ora": "^5.4.1",
"picocolors": "^1.1.1",
"tslib": "2.7.0",
"yargs": "17.7.2"
},
Expand Down
2 changes: 1 addition & 1 deletion packages/cli/src/commands/analyze.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { Manifest } from '@rsdoctor/utils/common';
import { Constants, Manifest as ManifestType, SDK } from '@rsdoctor/types';
import { RsdoctorWebpackSDK } from '@rsdoctor/sdk';
import ora from 'ora';
import { cyan, red } from 'chalk';
import { cyan, red } from 'picocolors';
import { Command } from '../types';
import {
enhanceCommand,
Expand Down
2 changes: 1 addition & 1 deletion packages/cli/src/commands/bundle-diff.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import ora from 'ora';
import { cyan, red } from 'chalk';
import { cyan, red } from 'picocolors';
import { Command } from '../types';
import {
enhanceCommand,
Expand Down
4 changes: 2 additions & 2 deletions packages/cli/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import yargs from 'yargs/yargs';
import { hideBin } from 'yargs/helpers';
import chalk from 'chalk';
import { red } from 'picocolors';
import { Common } from '@rsdoctor/types';
import { analyze, bundleDiff } from './commands';
import { Command, CommandContext, GetCommandArgumentsType } from './types';
Expand Down Expand Up @@ -68,7 +68,7 @@ export async function execute(
} catch (error) {
const { message, stack } = error as Error;
console.log('');
console.error(chalk.red(stack || message));
console.error(red(stack || message));
process.exit(1);
}
},
Expand Down
20 changes: 10 additions & 10 deletions pnpm-lock.yaml

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

0 comments on commit b3bfa6b

Please sign in to comment.