@@ -7,7 +7,7 @@ import { choosePackage } from './package';
77import { depVersions } from './utils/dep-versions' ;
88import { getCommitInfo } from './utils/git' ;
99import type { Package , Platform , Version } from 'types' ;
10- import semverSatisfies from 'semver/functions/satisfies ' ;
10+ import { satisfies } from 'compare-versions ' ;
1111
1212interface CommandOptions {
1313 name ?: string ;
@@ -170,7 +170,8 @@ export const commands = {
170170 const { id } = await post ( `/app/${ appId } /version/create` , {
171171 name : versionName ,
172172 hash,
173- description : description || ( await question ( t ( 'versionDescriptionQuestion' ) ) ) ,
173+ description :
174+ description || ( await question ( t ( 'versionDescriptionQuestion' ) ) ) ,
174175 metaInfo : metaInfo || ( await question ( t ( 'versionMetaInfoQuestion' ) ) ) ,
175176 deps : depVersions ,
176177 commit : await getCommitInfo ( ) ,
@@ -233,7 +234,7 @@ export const commands = {
233234 if ( minPkgVersion ) {
234235 minPkgVersion = String ( minPkgVersion ) . trim ( ) ;
235236 pkgsToBind = allPkgs . filter ( ( pkg : Package ) =>
236- semverSatisfies ( pkg . name , `>=${ minPkgVersion } ` ) ,
237+ satisfies ( pkg . name , `>=${ minPkgVersion } ` ) ,
237238 ) ;
238239 if ( pkgsToBind . length === 0 ) {
239240 throw new Error (
@@ -243,7 +244,7 @@ export const commands = {
243244 } else if ( maxPkgVersion ) {
244245 maxPkgVersion = String ( maxPkgVersion ) . trim ( ) ;
245246 pkgsToBind = allPkgs . filter ( ( pkg : Package ) =>
246- semverSatisfies ( pkg . name , `<=${ maxPkgVersion } ` ) ,
247+ satisfies ( pkg . name , `<=${ maxPkgVersion } ` ) ,
247248 ) ;
248249 if ( pkgsToBind . length === 0 ) {
249250 throw new Error (
@@ -263,7 +264,7 @@ export const commands = {
263264 } else if ( semverRange ) {
264265 semverRange = semverRange . trim ( ) ;
265266 pkgsToBind = allPkgs . filter ( ( pkg : Package ) =>
266- semverSatisfies ( pkg . name , semverRange ! ) ,
267+ satisfies ( pkg . name , semverRange ! ) ,
267268 ) ;
268269 if ( pkgsToBind . length === 0 ) {
269270 throw new Error (
0 commit comments