@@ -85,7 +85,7 @@ module.exports = async (options, pkg) => {
85
85
} ,
86
86
{
87
87
type : 'input' ,
88
- name : 'version ' ,
88
+ name : 'customVersion ' ,
89
89
message : 'Version' ,
90
90
when : answers => ! answers . version ,
91
91
filter : input => version . isValidInput ( input ) ? version ( pkg . version ) . getNewVersionFrom ( input ) : input ,
@@ -105,7 +105,7 @@ module.exports = async (options, pkg) => {
105
105
type : 'list' ,
106
106
name : 'tag' ,
107
107
message : 'How should this pre-release version be tagged in npm?' ,
108
- when : answers => options . runPublish && version . isPrereleaseOrIncrement ( answers . version ) && ! options . tag ,
108
+ when : answers => options . runPublish && ( version . isPrereleaseOrIncrement ( answers . customVersion ) || version . isPrereleaseOrIncrement ( answers . version ) ) && ! options . tag ,
109
109
choices : async ( ) => {
110
110
const existingPrereleaseTags = await prereleaseTags ( pkg . name ) ;
111
111
@@ -121,9 +121,9 @@ module.exports = async (options, pkg) => {
121
121
} ,
122
122
{
123
123
type : 'input' ,
124
- name : 'tag ' ,
124
+ name : 'customTag ' ,
125
125
message : 'Tag' ,
126
- when : answers => options . runPublish && version . isPrereleaseOrIncrement ( answers . version ) && ! options . tag && ! answers . tag ,
126
+ when : answers => options . runPublish && ( version . isPrereleaseOrIncrement ( answers . customVersion ) || version . isPrereleaseOrIncrement ( answers . version ) ) && ! options . tag && ! answers . tag ,
127
127
validate : input => {
128
128
if ( input . length === 0 ) {
129
129
return 'Please specify a tag, for example, `next`.' ;
@@ -193,7 +193,8 @@ module.exports = async (options, pkg) => {
193
193
194
194
return {
195
195
...options ,
196
- ...answers ,
196
+ version : answers . version || answers . customVersion ,
197
+ tag : answers . tag || answers . customTag ,
197
198
confirm : true ,
198
199
repoUrl,
199
200
releaseNotes
0 commit comments