Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cleanup(rspack): migrate rspack to picocolors #29562

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion packages/rspack/.eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,15 @@
"overrides": [
{
"files": ["*.ts", "*.tsx", "*.js", "*.jsx"],
"rules": {}
"rules": {
"no-restricted-imports": [
"error",
{
"name": "chalk",
"message": "Please use `picocolors` in place of `chalk` for rendering terminal colors"
}
]
}
},
{
"files": ["*.ts", "*.tsx"],
Expand Down
2 changes: 1 addition & 1 deletion packages/rspack/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@
"@rspack/plugin-react-refresh": "^1.0.0",
"autoprefixer": "^10.4.9",
"browserslist": "^4.21.4",
"chalk": "~4.1.0",
"css-loader": "^6.4.0",
"enquirer": "~2.3.6",
"express": "^4.19.2",
Expand All @@ -47,6 +46,7 @@
"sass-loader": "^12.2.0",
"source-map-loader": "^5.0.0",
"style-loader": "^3.3.0",
"picocolors": "^1.1.0",
"postcss-import": "~14.1.0",
"postcss-loader": "^8.1.1",
"postcss": "^8.4.38",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import {
runExecutor,
} from '@nx/devkit';
import { combineAsyncIterables } from '@nx/devkit/src/utils/async-iterable';
import * as chalk from 'chalk';
import * as pc from 'picocolors';

import { RspackExecutorSchema } from '../rspack/schema';
import { waitUntilServerIsListening } from './lib/wait-until-server-is-listening';
Expand Down Expand Up @@ -62,7 +62,7 @@ export async function* ssrDevServerExecutor(
if (nodeStarted && browserBuilt) {
await waitUntilServerIsListening(options.port);
console.log(
`[ ${chalk.green('ready')} ] on http://localhost:${options.port}`
`[ ${pc.green('ready')} ] on http://localhost:${options.port}`
);
yield {
...output,
Expand Down
Loading