(configVersion: string)
| 48 | } |
| 49 | |
| 50 | export function compatible(configVersion: string): boolean { |
| 51 | if (configVersion.indexOf("beta") != -1 && configVersion != version) { |
| 52 | return false; //如果是测试版,肯定要更新的 |
| 53 | } |
| 54 | try { |
| 55 | const configCount = version2int(configVersion); |
| 56 | const currentCount = version2int(version); |
| 57 | if (configCount > currentCount) { |
| 58 | return false; //回退到旧版本要把整个配置文件重置一下,避免冲突 |
| 59 | } |
| 60 | const minVersion = "12.1.0"; |
| 61 | const minCount = version2int(minVersion); |
| 62 | |
| 63 | if (configCount < minCount) { // 12.0.1 之前的版本,不支持新的配置项 |
| 64 | return false; |
| 65 | } |
| 66 | return true; |
| 67 | } catch (e) { |
| 68 | return false; |
| 69 | } |
| 70 | } |
| 71 | |
| 72 | export function isLower( |
| 73 | configVersion: string, |
no test coverage detected