Compare commits

...

5 Commits

Author SHA1 Message Date
0c5a88a08f 4.0.2 2022-03-22 00:14:49 +01:00
261f86d664 fix(core): update 2022-03-22 00:14:49 +01:00
b0116a7967 4.0.1 2022-03-21 18:21:07 +01:00
6dfdfd41b9 fix(core): update 2022-03-21 18:21:07 +01:00
2e9bc0db42 4.0.0 2022-03-21 08:30:50 +01:00
7 changed files with 29 additions and 32 deletions

View File

@ -12,6 +12,9 @@ stages:
- release
- metadata
before_script:
- npm install -g @shipzone/npmci
# ====================
# security stage
# ====================
@ -26,16 +29,29 @@ mirror:
- 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:
- docker
allow_failure: true
# ====================
# test stage
@ -84,10 +100,9 @@ codequality:
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

24
.vscode/launch.json vendored
View File

@ -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"
}
]
}

View File

@ -9,7 +9,7 @@
"githost": "gitlab.com",
"gitscope": "pushrocks",
"gitrepo": "early",
"shortDescription": "minimal and fast loading plugin for startup time measuring",
"description": "minimal and fast loading plugin for startup time measuring",
"npmPackagename": "@pushrocks/early",
"license": "MIT"
}

4
package-lock.json generated
View File

@ -1,12 +1,12 @@
{
"name": "@pushrocks/early",
"version": "3.0.7",
"version": "4.0.2",
"lockfileVersion": 2,
"requires": true,
"packages": {
"": {
"name": "@pushrocks/early",
"version": "3.0.7",
"version": "4.0.2",
"license": "MIT",
"dependencies": {
"@gitzone/tsbuild": "^2.1.60",

View File

@ -1,6 +1,6 @@
{
"name": "@pushrocks/early",
"version": "3.0.7",
"version": "4.0.2",
"private": false,
"description": "minimal and fast loading plugin for startup time measuring",
"main": "dist_ts/index.js",

View File

@ -1,7 +1,7 @@
import { expect, expectAsync, tap } from '@pushrocks/tapbundle';
import * as smartdelay from '@pushrocks/smartdelay';
import * as early from '../ts/index.js'
import * as early from '../ts/index.js';
tap.test('.start()', async () => {
process.env.CLI_CALL_MODULENAME = 'early';

View File

@ -6,8 +6,8 @@ import * as process from 'process';
export class HrtMeasurement {
nanoSeconds: number = null;
milliSeconds: number = null;
private _hrTimeStart = null;
private _hrTimeStopDiff = null;
private _hrTimeStart: [number, number] = null;
private _hrTimeStopDiff: [number, number] = null;
private _started: boolean = false;
/**