import type { ExpoConfig } from '@expo/config-types' ; import semver from 'semver' ; export function gteSdkVersion ( exp , sdkVersion ) { if ( ! exp . sdkVersion ) { return false ; } if ( exp . sdkVersion === 'UNVERSIONED' ) { return true ; } try { return semver . gte ( exp . sdkVersion , sdkVersion ) ; } catch ( e ) { throw new Error ( `${ exp . sdkVersion } is not a valid version. Must be in the form of x.y.z` ) ; } } export function lteSdkVersion ( exp , sdkVersion ) { if ( ! exp . sdkVersion ) { return false ; } if ( exp . sdkVersion === 'UNVERSIONED' ) { return false ; } try { return semver . lte ( exp . sdkVersion , sdkVersion ) ; } catch ( e ) { throw new Error ( `${ exp . sdkVersion } is not a valid version. Must be in the form of x.y.z` ) ; } }