File tree Expand file tree Collapse file tree 2 files changed +6
-5
lines changed
Expand file tree Collapse file tree 2 files changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -29,16 +29,16 @@ const diff = (version1, version2) => {
2929
3030 // Otherwise it can be determined by checking the high version
3131
32- if ( highVersion . patch ) {
33- // anything higher than a patch bump would result in the wrong version
34- return 'patch'
35- }
36-
3732 if ( highVersion . minor ) {
3833 // anything higher than a minor bump would result in the wrong version
3934 return 'minor'
4035 }
4136
37+ if ( highVersion . patch ) {
38+ // anything higher than a patch bump would result in the wrong version
39+ return 'patch'
40+ }
41+
4242 // bumping major/minor/patch all have same result
4343 return 'major'
4444 }
Original file line number Diff line number Diff line change @@ -34,6 +34,7 @@ test('diff versions test', (t) => {
3434 [ '1.0.0-1' , '2.0.0-1' , 'premajor' ] ,
3535 [ '1.0.0-1' , '1.1.0-1' , 'preminor' ] ,
3636 [ '1.0.0-1' , '1.0.1-1' , 'prepatch' ] ,
37+ [ '1.7.2-1' , '1.8.1' , 'minor' ] ,
3738 ] . forEach ( ( v ) => {
3839 const version1 = v [ 0 ]
3940 const version2 = v [ 1 ]
You can’t perform that action at this time.
0 commit comments