File tree Expand file tree Collapse file tree 1 file changed +3
-4
lines changed
Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Original file line number Diff line number Diff line change @@ -3,7 +3,7 @@ import os from 'os';
33import path from 'path' ;
44import pkg from '../../package.json' ;
55import AppInfoParser from './app-info-parser' ;
6- import semverLt from 'semver/functions/lt ' ;
6+ import semverSatisfies from 'semver/functions/satisfies ' ;
77
88import read from 'read' ;
99
@@ -152,12 +152,11 @@ export function printVersionCommand() {
152152 console . log ( 'react-native-update: 无法获取版本号,请在项目目录中运行命令' ) ;
153153 }
154154 if ( pushyVersion ) {
155- if ( semverLt ( pushyVersion , '8.5.1' ) ) {
155+ if ( semverSatisfies ( pushyVersion , '< 8.5.1' ) ) {
156156 console . warn (
157157 '当前版本已不再支持,请至少升级到 v8 的最新小版本后重新打包(代码无需改动): npm i react-native-update@8' ,
158158 ) ;
159- }
160- if ( semverLt ( pushyVersion , '9.2.1' ) ) {
159+ } else if ( semverSatisfies ( pushyVersion , '9.0.0 - 9.2.0' ) ) {
161160 console . warn (
162161 '当前版本已不再支持,请至少升级到 v9 的最新小版本后重新打包(代码无需改动): npm i react-native-update@9' ,
163162 ) ;
You can’t perform that action at this time.
0 commit comments