import semver from 'semver' ; export function bumpMinSemverRange ( minVersion , semverRange ) { if ( semverRange === '*' ) { return semverRange ; } if ( semverRange . startsWith ( '~' ) || semverRange . startsWith ( '^' ) ) { return semverRange [ 0 ] + minVersion ; } else if ( semverRange . includes ( '>' ) ) { return `>=${ minVersion } <${ semver . inc ( minVersion , 'major' ) }` ; } else if ( semverRange . includes ( ' - ' ) ) { return `${ minVersion } - ${ semver . inc ( minVersion , 'major' ) }` ; } return minVersion ; }