Skip to content

Commit 4eb4464

Browse files
committed
workflow: fix use of chalk
1 parent f25451c commit 4eb4464

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

scripts/release.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
const args = require('minimist')(process.argv.slice(2))
22
const fs = require('fs')
33
const path = require('path')
4-
const chalk = require('chalk')
4+
const colors = require('picocolors')
55
const semver = require('semver')
66
const currentVersion = require('../package.json').version
77
const { prompt } = require('enquirer')
@@ -25,9 +25,9 @@ const inc = i => semver.inc(currentVersion, i, preId)
2525
const run = (bin, args, opts = {}) =>
2626
execa(bin, args, { stdio: 'inherit', ...opts })
2727
const dryRun = (bin, args, opts = {}) =>
28-
console.log(chalk.blue(`[dryrun] ${bin} ${args.join(' ')}`), opts)
28+
console.log(colors.blue(`[dryrun] ${bin} ${args.join(' ')}`), opts)
2929
const runIfNotDry = isDryRun ? dryRun : run
30-
const step = msg => console.log(chalk.cyan(msg))
30+
const step = msg => console.log(colors.cyan(msg))
3131

3232
async function main() {
3333
let targetVersion = args._[0]
@@ -154,11 +154,11 @@ async function publishPackage(version, runIfNotDry) {
154154
}
155155
)
156156
console.log(
157-
chalk.green(`Successfully published ${publishedName}@${version}`)
157+
colors.green(`Successfully published ${publishedName}@${version}`)
158158
)
159159
} catch (e) {
160160
if (e.stderr.match(/previously published/)) {
161-
console.log(chalk.red(`Skipping already published: ${publishedName}`))
161+
console.log(colors.red(`Skipping already published: ${publishedName}`))
162162
} else {
163163
throw e
164164
}

0 commit comments

Comments
 (0)