Skip to content

Commit

Permalink
Fix: check version for queen-v2 (#76)
Browse files Browse the repository at this point in the history
* fix: check version for major version

* bumb: queen to 1.1.4 and drama-queen-container to 1.3.16
  • Loading branch information
laurentC35 authored Nov 28, 2023
1 parent f4e5e76 commit 1b9ba7c
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "drama-queen-container",
"private": true,
"version": "1.3.15",
"version": "1.3.16",
"workspaces": [
"drama-queen",
"queen-v2",
Expand Down
2 changes: 1 addition & 1 deletion queen-v2/package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
4 changes: 3 additions & 1 deletion queen-v2/src/utils/questionnaire/questionnaire.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 1b9ba7c

Please sign in to comment.