mirror of
https://github.com/vitejs/vite.git
synced 2024-11-22 07:09:05 +00:00
chore: replace chalk with picocolors (#6342)
This commit is contained in:
parent
d8502e24cf
commit
577b31c954
@ -32,7 +32,6 @@
|
||||
"@types/semver": "^7.3.9",
|
||||
"@typescript-eslint/eslint-plugin": "^5.8.1",
|
||||
"@typescript-eslint/parser": "^5.8.1",
|
||||
"chalk": "^4.1.2",
|
||||
"conventional-changelog-cli": "^2.2.2",
|
||||
"cross-env": "^7.0.3",
|
||||
"esbuild": "0.14.3",
|
||||
@ -46,6 +45,7 @@
|
||||
"minimist": "^1.2.5",
|
||||
"node-fetch": "^2.6.6",
|
||||
"npm-run-all": "^4.1.5",
|
||||
"picocolors": "^1.0.0",
|
||||
"playwright-chromium": "^1.17.1",
|
||||
"prettier": "2.5.1",
|
||||
"prompts": "^2.4.2",
|
||||
|
@ -16,7 +16,6 @@ importers:
|
||||
'@types/semver': ^7.3.9
|
||||
'@typescript-eslint/eslint-plugin': ^5.8.1
|
||||
'@typescript-eslint/parser': ^5.8.1
|
||||
chalk: ^4.1.2
|
||||
conventional-changelog-cli: ^2.2.2
|
||||
cross-env: ^7.0.3
|
||||
esbuild: 0.14.3
|
||||
@ -30,6 +29,7 @@ importers:
|
||||
minimist: ^1.2.5
|
||||
node-fetch: ^2.6.6
|
||||
npm-run-all: ^4.1.5
|
||||
picocolors: ^1.0.0
|
||||
playwright-chromium: ^1.17.1
|
||||
prettier: 2.5.1
|
||||
prompts: ^2.4.2
|
||||
@ -52,7 +52,6 @@ importers:
|
||||
'@types/semver': 7.3.9
|
||||
'@typescript-eslint/eslint-plugin': 5.8.1_3a47348159e115370aa4cba56aba33b6
|
||||
'@typescript-eslint/parser': 5.8.1_eslint@8.5.0+typescript@4.5.4
|
||||
chalk: 4.1.2
|
||||
conventional-changelog-cli: 2.2.2
|
||||
cross-env: 7.0.3
|
||||
esbuild: 0.14.3
|
||||
@ -66,6 +65,7 @@ importers:
|
||||
minimist: 1.2.5
|
||||
node-fetch: 2.6.6
|
||||
npm-run-all: 4.1.5
|
||||
picocolors: 1.0.0
|
||||
playwright-chromium: 1.17.1
|
||||
prettier: 2.5.1
|
||||
prompts: 2.4.2
|
||||
@ -802,7 +802,7 @@ importers:
|
||||
'@rollup/plugin-dynamic-import-vars': 1.4.2_rollup@2.62.0
|
||||
'@rollup/plugin-json': 4.1.0_rollup@2.62.0
|
||||
'@rollup/plugin-node-resolve': 13.1.1_rollup@2.62.0
|
||||
'@rollup/plugin-typescript': 8.3.0_rollup@2.62.0+tslib@2.3.1
|
||||
'@rollup/plugin-typescript': 8.3.0_7c5ff569c0887b4f0035eb7cb6988163
|
||||
'@rollup/pluginutils': 4.1.2
|
||||
'@types/convert-source-map': 1.5.2
|
||||
'@types/cross-spawn': 6.0.2
|
||||
@ -845,7 +845,7 @@ importers:
|
||||
periscopic: 2.0.3
|
||||
picocolors: 1.0.0
|
||||
postcss-import: 14.0.2_postcss@8.4.5
|
||||
postcss-load-config: 3.1.0
|
||||
postcss-load-config: 3.1.0_ts-node@10.4.0
|
||||
postcss-modules: 4.3.0_postcss@8.4.5
|
||||
resolve.exports: 1.1.0
|
||||
rollup-plugin-license: 2.6.0_rollup@2.62.0
|
||||
@ -854,7 +854,7 @@ importers:
|
||||
source-map-support: 0.5.21
|
||||
strip-ansi: 6.0.1
|
||||
terser: 5.10.0_acorn@8.7.0
|
||||
tsconfck: 1.1.1
|
||||
tsconfck: 1.1.1_typescript@4.5.4
|
||||
tslib: 2.3.1
|
||||
types: link:types
|
||||
ws: 8.4.0
|
||||
@ -1995,7 +1995,7 @@ packages:
|
||||
rollup: 2.62.0
|
||||
dev: true
|
||||
|
||||
/@rollup/plugin-typescript/8.3.0_rollup@2.62.0+tslib@2.3.1:
|
||||
/@rollup/plugin-typescript/8.3.0_7c5ff569c0887b4f0035eb7cb6988163:
|
||||
resolution: {integrity: sha512-I5FpSvLbtAdwJ+naznv+B4sjXZUcIvLLceYpITAn7wAP8W0wqc5noLdGIp9HGVntNhRWXctwPYrSSFQxtl0FPA==}
|
||||
engines: {node: '>=8.0.0'}
|
||||
peerDependencies:
|
||||
@ -2007,6 +2007,7 @@ packages:
|
||||
resolve: 1.20.0
|
||||
rollup: 2.62.0
|
||||
tslib: 2.3.1
|
||||
typescript: 4.5.4
|
||||
dev: true
|
||||
|
||||
/@rollup/pluginutils/3.1.0_rollup@2.62.0:
|
||||
@ -4556,19 +4557,6 @@ packages:
|
||||
peerDependenciesMeta:
|
||||
debug:
|
||||
optional: true
|
||||
dev: false
|
||||
|
||||
/follow-redirects/1.14.6_debug@4.3.3:
|
||||
resolution: {integrity: sha512-fhUl5EwSJbbl8AR+uYL2KQDxLkdSjZGR36xy46AO7cOMTrCMON6Sa28FmAnC2tRTDbd/Uuzz3aJBv7EBN7JH8A==}
|
||||
engines: {node: '>=4.0'}
|
||||
peerDependencies:
|
||||
debug: '*'
|
||||
peerDependenciesMeta:
|
||||
debug:
|
||||
optional: true
|
||||
dependencies:
|
||||
debug: 4.3.3
|
||||
dev: true
|
||||
|
||||
/form-data/3.0.1:
|
||||
resolution: {integrity: sha512-RHkBKtLWUVwd7SqRIvCZMEvAMoGUp0XU+seQiZejj0COz3RI3hWP4sCv3gZWWLjJTd7rGwcsF5eKZGii0r/hbg==}
|
||||
@ -4960,7 +4948,7 @@ packages:
|
||||
engines: {node: '>=8.0.0'}
|
||||
dependencies:
|
||||
eventemitter3: 4.0.7
|
||||
follow-redirects: 1.14.6_debug@4.3.3
|
||||
follow-redirects: 1.14.6
|
||||
requires-port: 1.0.0
|
||||
transitivePeerDependencies:
|
||||
- debug
|
||||
@ -7002,20 +6990,6 @@ packages:
|
||||
postcss: 8.4.5
|
||||
dev: false
|
||||
|
||||
/postcss-load-config/3.1.0:
|
||||
resolution: {integrity: sha512-ipM8Ds01ZUophjDTQYSVP70slFSYg3T0/zyfII5vzhN6V57YSxMgG5syXuwi5VtS8wSf3iL30v0uBdoIVx4Q0g==}
|
||||
engines: {node: '>= 10'}
|
||||
peerDependencies:
|
||||
ts-node: '>=9.0.0'
|
||||
peerDependenciesMeta:
|
||||
ts-node:
|
||||
optional: true
|
||||
dependencies:
|
||||
import-cwd: 3.0.0
|
||||
lilconfig: 2.0.4
|
||||
yaml: 1.10.2
|
||||
dev: true
|
||||
|
||||
/postcss-load-config/3.1.0_ts-node@10.4.0:
|
||||
resolution: {integrity: sha512-ipM8Ds01ZUophjDTQYSVP70slFSYg3T0/zyfII5vzhN6V57YSxMgG5syXuwi5VtS8wSf3iL30v0uBdoIVx4Q0g==}
|
||||
engines: {node: '>= 10'}
|
||||
@ -7029,7 +7003,6 @@ packages:
|
||||
lilconfig: 2.0.4
|
||||
ts-node: 10.4.0_00264fd83560919cd06c986889baae0a
|
||||
yaml: 1.10.2
|
||||
dev: false
|
||||
|
||||
/postcss-modules-extract-imports/3.0.0_postcss@8.4.5:
|
||||
resolution: {integrity: sha512-bdHleFnP3kZ4NYDhuGlVK+CMrQ/pqUm8bx/oGL93K6gVwiclvX5x0n76fYMKuIGKzlABOy13zsvqjb0f92TEXw==}
|
||||
@ -8546,7 +8519,7 @@ packages:
|
||||
yn: 3.1.1
|
||||
dev: true
|
||||
|
||||
/tsconfck/1.1.1:
|
||||
/tsconfck/1.1.1_typescript@4.5.4:
|
||||
resolution: {integrity: sha512-uEsCWef+3lA9/YqpGt/mdr+nDovhlr+f0zoycYiOyVDDOUb3BjYFA71+Ee3LB/GiZBRDyTfKBK1kGN2iuPPuEA==}
|
||||
engines: {node: ^12.20 || ^14.13.1 || >= 16, pnpm: '>=6.7.0'}
|
||||
hasBin: true
|
||||
@ -8555,6 +8528,8 @@ packages:
|
||||
peerDependenciesMeta:
|
||||
typescript:
|
||||
optional: true
|
||||
dependencies:
|
||||
typescript: 4.5.4
|
||||
dev: true
|
||||
|
||||
/tslib/1.14.1:
|
||||
|
@ -1,7 +1,7 @@
|
||||
/**
|
||||
* modified from https://github.com/vuejs/vue-next/blob/master/scripts/release.js
|
||||
*/
|
||||
import chalk from 'chalk'
|
||||
import colors from 'picocolors'
|
||||
import type { ExecaChildProcess, Options as ExecaOptions } from 'execa'
|
||||
import execa from 'execa'
|
||||
import { readFileSync, writeFileSync } from 'fs'
|
||||
@ -45,11 +45,11 @@ const run: RunFn = (bin, args, opts = {}) =>
|
||||
type DryRunFn = (bin: string, args: string[], opts?: any) => void
|
||||
|
||||
const dryRun: DryRunFn = (bin, args, opts: any) =>
|
||||
console.log(chalk.blue(`[dryrun] ${bin} ${args.join(' ')}`), opts)
|
||||
console.log(colors.blue(`[dryrun] ${bin} ${args.join(' ')}`), opts)
|
||||
|
||||
const runIfNotDry = isDryRun ? dryRun : run
|
||||
|
||||
const step: (msg: string) => void = (msg) => console.log(chalk.cyan(msg))
|
||||
const step: (msg: string) => void = (msg) => console.log(colors.cyan(msg))
|
||||
|
||||
async function main(): Promise<void> {
|
||||
let targetVersion: string | undefined = args._[0]
|
||||
@ -170,10 +170,10 @@ async function publishPackage(
|
||||
await runIfNotDry('yarn', publicArgs, {
|
||||
stdio: 'pipe'
|
||||
})
|
||||
console.log(chalk.green(`Successfully published ${pkgName}@${version}`))
|
||||
console.log(colors.green(`Successfully published ${pkgName}@${version}`))
|
||||
} catch (e: any) {
|
||||
if (e.stderr.match(/previously published/)) {
|
||||
console.log(chalk.red(`Skipping already published: ${pkgName}`))
|
||||
console.log(colors.red(`Skipping already published: ${pkgName}`))
|
||||
} else {
|
||||
throw e
|
||||
}
|
||||
|
@ -1,6 +1,6 @@
|
||||
// Invoked on the commit-msg git hook by yorkie.
|
||||
|
||||
import chalk from 'chalk'
|
||||
import colors from 'picocolors'
|
||||
import { readFileSync } from 'fs'
|
||||
|
||||
const msgPath = process.env.GIT_PARAMS!
|
||||
@ -13,15 +13,15 @@ const commitRE =
|
||||
if (!releaseRE.test(msg) && !commitRE.test(msg)) {
|
||||
console.log()
|
||||
console.error(
|
||||
` ${chalk.bgRed.white(' ERROR ')} ${chalk.red(
|
||||
` ${colors.bgRed(colors.white(' ERROR '))} ${colors.red(
|
||||
`invalid commit message format.`
|
||||
)}\n\n` +
|
||||
chalk.red(
|
||||
colors.red(
|
||||
` Proper commit message format is required for automated changelog generation. Examples:\n\n`
|
||||
) +
|
||||
` ${chalk.green(`feat: add 'comments' option`)}\n` +
|
||||
` ${chalk.green(`fix: handle events on blur (close #28)`)}\n\n` +
|
||||
chalk.red(` See .github/commit-convention.md for more details.\n`)
|
||||
` ${colors.green(`feat: add 'comments' option`)}\n` +
|
||||
` ${colors.green(`fix: handle events on blur (close #28)`)}\n\n` +
|
||||
colors.red(` See .github/commit-convention.md for more details.\n`)
|
||||
)
|
||||
process.exit(1)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user