From f5cb86b53e33f56a9a4e4484f68f3078e9dfd6e4 Mon Sep 17 00:00:00 2001 From: Philipp Kunz Date: Wed, 13 Apr 2022 16:54:40 +0200 Subject: [PATCH] fix(core): update --- .gitlab-ci.yml | 32 ++++++++++++++++++--------- .vscode/launch.json | 24 +++----------------- .vscode/settings.json | 2 +- npmextra.json | 2 +- package.json | 5 ++++- ts/smartupdate.classes.smartupdate.ts | 2 +- 6 files changed, 32 insertions(+), 35 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 56bcc38..7b61eb3 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -12,6 +12,9 @@ stages: - release - metadata +before_script: + - npm install -g @shipzone/npmci + # ==================== # security stage # ==================== @@ -19,23 +22,35 @@ mirror: stage: security script: - npmci git mirror + only: + - tags tags: - lossless - docker - notpriv -audit: +auditProductionDependencies: + image: registry.gitlab.com/hosttoday/ht-docker-node:npmci + stage: security + script: + - npmci npm prepare + - npmci command npm install --production --ignore-scripts + - npmci command npm config set registry https://registry.npmjs.org + - npmci command npm audit --audit-level=high --only=prod --production + tags: + - docker + allow_failure: true + +auditDevDependencies: image: registry.gitlab.com/hosttoday/ht-docker-node:npmci stage: security script: - npmci npm prepare - npmci command npm install --ignore-scripts - npmci command npm config set registry https://registry.npmjs.org - - npmci command npm audit --audit-level=high + - npmci command npm audit --audit-level=high --only=dev tags: - - lossless - docker - - notpriv allow_failure: true # ==================== @@ -51,9 +66,7 @@ testStable: - npmci npm test coverage: /\d+.?\d+?\%\s*coverage/ tags: - - lossless - docker - - priv testBuild: stage: test @@ -64,9 +77,7 @@ testBuild: - npmci command npm run build coverage: /\d+.?\d+?\%\s*coverage/ tags: - - lossless - docker - - notpriv release: stage: release @@ -86,11 +97,12 @@ release: codequality: stage: metadata allow_failure: true + only: + - tags script: - - npmci command npm install -g tslint typescript + - npmci command npm install -g typescript - npmci npm prepare - npmci npm install - - npmci command "tslint -c tslint.json ./ts/**/*.ts" tags: - lossless - docker diff --git a/.vscode/launch.json b/.vscode/launch.json index 112db52..26e9f92 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -2,28 +2,10 @@ "version": "0.2.0", "configurations": [ { - "name": "current file", - "type": "node", + "command": "npm test", + "name": "Run npm test", "request": "launch", - "args": [ - "${relativeFile}" - ], - "runtimeArgs": ["-r", "@gitzone/tsrun"], - "cwd": "${workspaceRoot}", - "protocol": "inspector", - "internalConsoleOptions": "openOnSessionStart" - }, - { - "name": "test.ts", - "type": "node", - "request": "launch", - "args": [ - "test/test.ts" - ], - "runtimeArgs": ["-r", "@gitzone/tsrun"], - "cwd": "${workspaceRoot}", - "protocol": "inspector", - "internalConsoleOptions": "openOnSessionStart" + "type": "node-terminal" } ] } diff --git a/.vscode/settings.json b/.vscode/settings.json index 01d2b8d..3648eaa 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -15,7 +15,7 @@ "properties": { "projectType": { "type": "string", - "enum": ["website", "element", "service", "npm"] + "enum": ["website", "element", "service", "npm", "wcc"] } } } diff --git a/npmextra.json b/npmextra.json index 40630f8..5d581d1 100644 --- a/npmextra.json +++ b/npmextra.json @@ -9,7 +9,7 @@ "githost": "gitlab.com", "gitscope": "pushrocks", "gitrepo": "smartupdate", - "shortDescription": "update your tools in a smart way", + "description": "update your tools in a smart way", "npmPackagename": "@pushrocks/smartupdate", "license": "MIT" } diff --git a/package.json b/package.json index 7c3d66e..1cbce47 100644 --- a/package.json +++ b/package.json @@ -40,5 +40,8 @@ "cli.js", "npmextra.json", "readme.md" + ], + "browserslist": [ + "last 1 chrome versions" ] -} +} \ No newline at end of file diff --git a/ts/smartupdate.classes.smartupdate.ts b/ts/smartupdate.classes.smartupdate.ts index 71e473f..28cf591 100644 --- a/ts/smartupdate.classes.smartupdate.ts +++ b/ts/smartupdate.classes.smartupdate.ts @@ -24,7 +24,7 @@ export class SmartUpdate { const newCacheData: ICacheStatus = { lastCheck: timeStamp.milliSeconds, latestVersion: 'x.x.x', - performedUpgrade: false + performedUpgrade: false, }; // the comparison data from the keyValue store