diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 8ebc8b5..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,36 @@ 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 # ==================== # test stage @@ -50,9 +66,7 @@ testStable: - npmci npm test coverage: /\d+.?\d+?\%\s*coverage/ tags: - - lossless - docker - - priv testBuild: stage: test @@ -63,9 +77,7 @@ testBuild: - npmci command npm run build coverage: /\d+.?\d+?\%\s*coverage/ tags: - - lossless - docker - - notpriv release: stage: release @@ -85,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/package.json b/package.json index ea0f140..db50bcb 100644 --- a/package.json +++ b/package.json @@ -53,5 +53,8 @@ "cli.js", "npmextra.json", "readme.md" + ], + "browserslist": [ + "last 1 chrome versions" ] -} +} \ No newline at end of file diff --git a/readme.md b/readme.md index db5b6c4..d583586 100644 --- a/readme.md +++ b/readme.md @@ -19,7 +19,7 @@ TypeScript Support | [![TypeScript](https://badgen.net/badge/TypeScript/>=%203.x node Support | [![node](https://img.shields.io/badge/node->=%2010.x.x-blue.svg)](https://nodejs.org/dist/latest-v10.x/docs/api/) Code Style | [![Code Style](https://badgen.net/badge/style/prettier/purple)](https://lossless.cloud) PackagePhobia (total standalone install weight) | [![PackagePhobia](https://badgen.net/packagephobia/install/@pushrocks/projectinfo)](https://lossless.cloud) -PackagePhobia (package size on registry) | [![PackagePhobia](https://badgen.net/packagephobia/publish/@pushrocks/projectinfo)](https://lossless.cloud) +PackagePhobia (package size on registry) | [![PackagePhobia](https://badgen.net/packagephobia/publish/@pushrocks/projectinfo)](https://lossless.cloud) BundlePhobia (total size when bundled) | [![BundlePhobia](https://badgen.net/bundlephobia/minzip/@pushrocks/projectinfo)](https://lossless.cloud) Platform support | [![Supports Windows 10](https://badgen.net/badge/supports%20Windows%2010/yes/green?icon=windows)](https://lossless.cloud) [![Supports Mac OS X](https://badgen.net/badge/supports%20Mac%20OS%20X/yes/green?icon=apple)](https://lossless.cloud) diff --git a/test/test.ts b/test/test.ts index e1ddb6c..1a73345 100644 --- a/test/test.ts +++ b/test/test.ts @@ -2,7 +2,6 @@ import { tap, expect } from '@pushrocks/tapbundle'; import * as smartpath from '@pushrocks/smartpath'; import * as projectinfo from '../ts/index.js'; - import * as path from 'path'; let testBasePath = path.resolve(smartpath.get.dirnameFromImportMetaUrl(import.meta.url)); diff --git a/ts/index.ts b/ts/index.ts index 9f41c16..fc765cd 100644 --- a/ts/index.ts +++ b/ts/index.ts @@ -1,4 +1,4 @@ -import * as plugins from './projectinfo.plugins.js' +import * as plugins from './projectinfo.plugins.js'; // direct access to classes export * from './projectinfo.classes.git.js'; @@ -13,7 +13,7 @@ import { ProjectinfoNpm } from './projectinfo.classes.npm.js'; /** * gets the name from package.json in a specified directory */ -export let getNpmNameForDir = function(cwdArg) { +export let getNpmNameForDir = function (cwdArg) { let localNpm = new ProjectinfoNpm(cwdArg); if (localNpm.status === 'ok') { return localNpm.name;