From 955fb87129f2c20aba6591f6c61990da47df7e32 Mon Sep 17 00:00:00 2001 From: Janos Hrubos <33330538+janoshrubos@users.noreply.github.com> Date: Tue, 23 Feb 2021 13:54:00 +0100 Subject: [PATCH] fix: handle caret and tilde in runtime versions --- lib/controllers/migrate-controller.ts | 2 +- lib/services/project-config-service.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/controllers/migrate-controller.ts b/lib/controllers/migrate-controller.ts index 24f19d3a11..d8b3077d36 100644 --- a/lib/controllers/migrate-controller.ts +++ b/lib/controllers/migrate-controller.ts @@ -1128,7 +1128,7 @@ export class MigrateController allowInvalidVersions: boolean ): boolean { return !!version - ? semver.lt(version, targetVersion) + ? semver.lt(semver.coerce(version), targetVersion) : !allowInvalidVersions; } diff --git a/lib/services/project-config-service.ts b/lib/services/project-config-service.ts index d4597d7097..47735f06e2 100644 --- a/lib/services/project-config-service.ts +++ b/lib/services/project-config-service.ts @@ -372,7 +372,7 @@ export default { if ( runtimePackage.version && - semver.gte(runtimePackage.version, "7.0.0-rc.5") + semver.gte(semver.coerce(runtimePackage.version), "7.0.0-rc.5") ) { // runtimes >= 7.0.0-rc.5 support passing appPath and appResourcesPath through gradle project flags // so writing an nsconfig is not necessary.