From 1b9ba7c4c2cef3224033df223695d9585c3465eb Mon Sep 17 00:00:00 2001 From: Laurent Caouissin <38245508+laurentC35@users.noreply.github.com> Date: Tue, 28 Nov 2023 10:22:39 +0100 Subject: [PATCH] Fix: check version for queen-v2 (#76) * fix: check version for major version * bumb: queen to 1.1.4 and drama-queen-container to 1.3.16 --- package.json | 2 +- queen-v2/package.json | 2 +- queen-v2/src/utils/questionnaire/questionnaire.js | 4 +++- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index eddde716..66473868 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "drama-queen-container", "private": true, - "version": "1.3.15", + "version": "1.3.16", "workspaces": [ "drama-queen", "queen-v2", diff --git a/queen-v2/package.json b/queen-v2/package.json index a21bf984..43bf2293 100644 --- a/queen-v2/package.json +++ b/queen-v2/package.json @@ -1,6 +1,6 @@ { "name": "queen-v2", - "version": "1.1.3", + "version": "1.1.4", "description": "Web application for the management of questionnaires powered by Lunatic", "repository": { "type": "git", diff --git a/queen-v2/src/utils/questionnaire/questionnaire.js b/queen-v2/src/utils/questionnaire/questionnaire.js index 0360407e..bf3eccf0 100644 --- a/queen-v2/src/utils/questionnaire/questionnaire.js +++ b/queen-v2/src/utils/questionnaire/questionnaire.js @@ -9,7 +9,9 @@ const checkVersion = (actualVersion, expectedVersion) => { const [majorA, minorA, patchA] = actualVersion .split('.') .map(v => parseInt(v.split('-')[0], 10)); - if (major === majorA && ((minorA === minor && patchA >= patch) || minorA > minor)) + + if (majorA > major) return { valid: true }; + if (majorA === major && ((minorA === minor && patchA >= patch) || minorA > minor)) return { valid: true }; return { valid: false }; } catch (e) {