Skip to content

Commit de0ea62

Browse files
authored
chore: switch from picocolors to ansis (#474)
1 parent c71bf55 commit de0ea62

File tree

3 files changed

+17
-11
lines changed

3 files changed

+17
-11
lines changed

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@
5555
"@rspack/core": "^1.2.2",
5656
"@types/fs-extra": "^11.0.4",
5757
"@types/node": "^22.13.1",
58+
"ansis": "^3.12.0",
5859
"bumpp": "^10.0.1",
5960
"esbuild": "^0.24.2",
6061
"esbuild-plugin-copy": "^2.1.1",
@@ -64,7 +65,6 @@
6465
"jiti": "^2.4.2",
6566
"lint-staged": "^15.4.3",
6667
"magic-string": "^0.30.17",
67-
"picocolors": "^1.1.1",
6868
"rolldown": "^1.0.0-beta.3",
6969
"rollup": "^4.34.2",
7070
"simple-git-hooks": "^2.11.1",

pnpm-lock.yaml

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

scripts/buildFixtures.ts

+7-7
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import { execSync } from 'node:child_process'
22
import { join, resolve } from 'node:path'
33
import process from 'node:process'
4+
import c from 'ansis'
45
import fs from 'fs-extra'
5-
import c from 'picocolors'
66

77
async function run() {
88
const dir = resolve(__dirname, '../test/fixtures')
@@ -16,27 +16,27 @@ async function run() {
1616
if (fs.existsSync(join(path, 'dist')))
1717
await fs.remove(join(path, 'dist'))
1818

19-
console.log(c.yellow(c.inverse(c.bold('\n Vite '))), name, '\n')
19+
console.log(c.yellow.inverse.bold`\n Vite `, name, '\n')
2020
execSync('npx vite --version', { cwd: path, stdio: 'inherit' })
2121
execSync('npx vite build', { cwd: path, stdio: 'inherit' })
2222

23-
console.log(c.red(c.inverse(c.bold('\n Rollup '))), name, '\n')
23+
console.log(c.red.inverse.bold`\n Rollup `, name, '\n')
2424
execSync('npx rollup --version', { cwd: path, stdio: 'inherit' })
2525
execSync('npx rollup --bundleConfigAsCjs -c', { cwd: path, stdio: 'inherit' })
2626

27-
console.log(c.blue(c.inverse(c.bold('\n Webpack '))), name, '\n')
27+
console.log(c.blue.inverse.bold`\n Webpack `, name, '\n')
2828
execSync('npx webpack --version', { cwd: path, stdio: 'inherit' })
2929
execSync('npx webpack', { cwd: path, stdio: 'inherit' })
3030

31-
console.log(c.yellow(c.inverse(c.bold('\n Esbuild '))), name, '\n')
31+
console.log(c.yellow.inverse.bold`\n Esbuild `, name, '\n')
3232
execSync('npx esbuild --version', { cwd: path, stdio: 'inherit' })
3333
execSync('node esbuild.config.js', { cwd: path, stdio: 'inherit' })
3434

35-
console.log(c.cyan(c.inverse(c.bold('\n Rspack '))), name, '\n')
35+
console.log(c.cyan.inverse.bold`\n Rspack `, name, '\n')
3636
execSync('npx rspack --version', { cwd: path, stdio: 'inherit' })
3737
execSync('npx rspack', { cwd: path, stdio: 'inherit' })
3838

39-
console.log(c.magenta(c.inverse(c.bold('\n Farm '))), name, '\n')
39+
console.log(c.magenta.inverse.bold`\n Farm `, name, '\n')
4040
execSync('npx farm --version', { cwd: path, stdio: 'inherit' })
4141
execSync('npx farm build', { cwd: path, stdio: 'inherit' })
4242
}

0 commit comments

Comments
 (0)