File tree Expand file tree Collapse file tree 2 files changed +6
-10
lines changed
Expand file tree Collapse file tree 2 files changed +6
-10
lines changed Original file line number Diff line number Diff line change @@ -25,11 +25,9 @@ export function release(increment) {
2525 readFileSync ( "package.json" ) . toString ( )
2626 ) ;
2727 const isPre = releaseType . startsWith ( "pre" ) ;
28- const nextVersion = semver . inc (
29- version ,
30- releaseType ,
31- isPre ? "alpha" : undefined
32- ) ;
28+ const nextVersion = isPre
29+ ? semver . inc ( version , releaseType , "alpha" )
30+ : semver . inc ( version , releaseType ) ;
3331 if ( nextVersion === null ) {
3432 throw new Error ( `could not increment ${ version } with ${ releaseType } ` ) ;
3533 }
Original file line number Diff line number Diff line change @@ -29,11 +29,9 @@ export function release(increment: string) {
2929 readFileSync ( "package.json" ) . toString ( )
3030 ) ;
3131 const isPre = releaseType . startsWith ( "pre" ) ;
32- const nextVersion = semver . inc (
33- version ,
34- releaseType ,
35- isPre ? "alpha" : undefined
36- ) ;
32+ const nextVersion = isPre
33+ ? semver . inc ( version , releaseType , "alpha" )
34+ : semver . inc ( version , releaseType ) ;
3735 if ( nextVersion === null ) {
3836 throw new Error ( `could not increment ${ version } with ${ releaseType } ` ) ;
3937 }
You can’t perform that action at this time.
0 commit comments