Skip to content

Commit

Permalink
force exact ui-framework version
Browse files Browse the repository at this point in the history
  • Loading branch information
tomaskikutis committed Dec 19, 2024
1 parent eee8e23 commit e20bca6
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
8 changes: 8 additions & 0 deletions grep-lint.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ def get_command(branch=None):

arguments_list.append("--")
arguments_list.append("scripts")
arguments_list.append("./package.json")

return arguments_list

Expand Down Expand Up @@ -43,6 +44,13 @@ def get_command(branch=None):
'perl_regex': 'template\s*?:\s*[\'|"|`][^\'|"|`]*<[^\'|"|`]*[\'|"|`]',
'tolerance': True
},
{
'name': 'force exact ui-framework version',

# errors if finds a caret or a tilde next to ui-framework version
'perl_regex': '"superdesk-ui-framework": "(\^|~)',
'tolerance': False
},
]

any_rule_violated = False
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@
"sass-loader": "6.0.6",
"shortid": "2.2.8",
"style-loader": "0.20.2",
"superdesk-ui-framework": "^4.0.4",
"superdesk-ui-framework": "4.0.4",
"ts-loader": "3.5.0",
"typescript": "4.9.5",
"uuid": "8.3.1",
Expand Down Expand Up @@ -163,7 +163,7 @@
"test": "npm run lint && npm run unit && node tasks/verify-client-api-changes.js",
"debug-unit-tests": "karma start --reporters=progress --browsers=Chrome",
"unit": "karma start --single-run",
"lint": "tsc -p scripts --noEmit && eslint --quiet --parser=@typescript-eslint/parser --ext .js --ext .jsx --ext .ts --ext .tsx scripts e2e/client tasks",
"lint": "python ./grep-lint.py && tsc -p scripts --noEmit && eslint --quiet --parser=@typescript-eslint/parser --ext .js --ext .jsx --ext .ts --ext .tsx scripts e2e/client tasks",
"lint-fix": "eslint --fix --parser=@typescript-eslint/parser --ext .js --ext .jsx --ext .ts --ext .tsx scripts e2e/client tasks",
"server": "grunt server",
"dev": "npm run server"
Expand Down

0 comments on commit e20bca6

Please sign in to comment.