@@ -37,8 +37,8 @@ export async function parseArgs(): Promise<ParsedArgs> {
3737 push : args . push ,
3838 all : args . all ,
3939 noGitCheck : args . noGitCheck ,
40- confirm : ! args . yes ,
41- noVerify : ! args . verify ,
40+ confirm : args . yes === undefined ? undefined : ! args . yes ,
41+ noVerify : args . verify === undefined ? undefined : ! args . verify ,
4242 install : args . install ,
4343 files : [ ...( args [ '--' ] || [ ] ) , ...resultArgs ] ,
4444 ignoreScripts : args . ignoreScripts ,
@@ -102,18 +102,28 @@ export function loadCliArgs(argv = process.argv) {
102102 const rawArgs = cli . rawArgs
103103 const args = result . options
104104
105+ // TODO: To simplify the checks here, should we move the default value declaration to config.ts/bumpConfigDefaults?
105106 const COMMIT_REG = / (?: - c | - - c o m m i t | - - n o - c o m m i t ) (?: = .* | $ ) /
106107 const TAG_REG = / (?: - t | - - t a g | - - n o - t a g ) (?: = .* | $ ) /
108+ const YES_REG = / (?: - y | - - y e s ) (?: = .* | $ ) /
109+ const NO_VERIFY_REG = / - - n o - v e r i f y (?: = .* | $ ) /
110+ const INSTALL_ARG = / - - i n s t a l l (?: = .* | $ ) /
107111 const hasCommitFlag = rawArgs . some ( arg => COMMIT_REG . test ( arg ) )
108112 const hasTagFlag = rawArgs . some ( arg => TAG_REG . test ( arg ) )
113+ const hasYesFlag = rawArgs . some ( arg => YES_REG . test ( arg ) )
114+ const hasNoVerifyFlag = rawArgs . some ( arg => NO_VERIFY_REG . test ( arg ) )
115+ const hasInstallFlag = rawArgs . some ( arg => INSTALL_ARG . test ( arg ) )
109116
110- const { tag, commit, ...rest } = args
117+ const { tag, commit, yes , ...rest } = args
111118
112119 return {
113120 args : {
114121 ...rest ,
115122 commit : hasCommitFlag ? commit : undefined ,
116123 tag : hasTagFlag ? tag : undefined ,
124+ yes : hasYesFlag ? yes : undefined ,
125+ verify : hasNoVerifyFlag ? ! args . verify : undefined ,
126+ install : hasInstallFlag ? ! args . install : undefined
117127 } as { [ k : string ] : any } ,
118128 resultArgs : result . args ,
119129 }
0 commit comments