11const args = require ( 'minimist' ) ( process . argv . slice ( 2 ) )
22const fs = require ( 'fs' )
33const path = require ( 'path' )
4- const chalk = require ( 'chalk ' )
4+ const colors = require ( 'picocolors ' )
55const semver = require ( 'semver' )
66const currentVersion = require ( '../package.json' ) . version
77const { prompt } = require ( 'enquirer' )
@@ -25,9 +25,9 @@ const inc = i => semver.inc(currentVersion, i, preId)
2525const run = ( bin , args , opts = { } ) =>
2626 execa ( bin , args , { stdio : 'inherit' , ...opts } )
2727const dryRun = ( bin , args , opts = { } ) =>
28- console . log ( chalk . blue ( `[dryrun] ${ bin } ${ args . join ( ' ' ) } ` ) , opts )
28+ console . log ( colors . blue ( `[dryrun] ${ bin } ${ args . join ( ' ' ) } ` ) , opts )
2929const runIfNotDry = isDryRun ? dryRun : run
30- const step = msg => console . log ( chalk . cyan ( msg ) )
30+ const step = msg => console . log ( colors . cyan ( msg ) )
3131
3232async 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 ( / p r e v i o u s l y p u b l i s h e d / ) ) {
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