@@ -9,9 +9,7 @@ module.exports = options => {
99 const pkg = readPkgUp . sync ( ) . pkg ;
1010 const oldVersion = pkg . version ;
1111
12- console . log ( '\n' ) ;
13- console . log ( `Releasing a new version of ${ chalk . bold ( pkg . name ) } ${ chalk . gray . dim ( `(current version: ${ oldVersion } )` ) } ` ) ;
14- console . log ( '\n' ) ;
12+ console . log ( `\nPublish a new version of ${ chalk . bold . magenta ( pkg . name ) } ${ chalk . dim ( `(${ oldVersion } )` ) } \n` ) ;
1513
1614 const prompts = [
1715 {
@@ -40,10 +38,11 @@ module.exports = options => {
4038 filter : input => version . isValidVersionInput ( input ) ? version . getNewVersion ( pkg . version , input ) : input ,
4139 validate : input => {
4240 if ( ! version . isValidVersionInput ( input ) ) {
43- return 'Please specify a valid semver, e.g. 1.2.3. See http://semver.org' ;
41+ return 'Please specify a valid semver, for example, ` 1.2.3` . See http://semver.org' ;
4442 } else if ( ! version . isVersionGreater ( oldVersion , input ) ) {
4543 return `Version must be greater than ${ oldVersion } ` ;
4644 }
45+
4746 return true ;
4847 }
4948 } ,
@@ -79,9 +78,9 @@ module.exports = options => {
7978 when : answers => ! pkg . private && version . isPrereleaseVersion ( answers . version ) && ! options . tag && ! answers . tag ,
8079 validate : input => {
8180 if ( input . length === 0 ) {
82- return 'Please specify a tag, e.g. next.' ;
81+ return 'Please specify a tag, for example, ` next` .' ;
8382 } else if ( input . toLowerCase ( ) === 'latest' ) {
84- return 'It\'s not possible to publish pre-releases under the latest tag. Please specifiy something else, e.g. next.' ;
83+ return 'It\'s not possible to publish pre-releases under the ` latest` tag. Please specify something else, for example, ` next` .' ;
8584 }
8685 return true ;
8786 }
@@ -93,7 +92,7 @@ module.exports = options => {
9392 const tag = answers . tag || options . tag ;
9493 const tagPart = tag ? ` and tag this release in npm as ${ tag } ` : '' ;
9594
96- return `Will bump from ${ oldVersion } to ${ answers . version } ${ tagPart } . Continue?` ;
95+ return `Will bump from ${ chalk . cyan ( oldVersion ) } to ${ chalk . cyan ( answers . version + tagPart ) } . Continue?` ;
9796 }
9897 }
9998 ] ;
0 commit comments