Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@applitools/monitoring-commons

Package Overview
Dependencies
Maintainers
45
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@applitools/monitoring-commons - npm Package Compare versions

Comparing version 1.0.19 to 2.0.1

dist/cjs/monitoring-commons.d.ts

43

package.json
{
"name": "@applitools/monitoring-commons",
"version": "1.0.19",
"version": "2.0.1",
"description": "",
"main": "src/monitoring-commons.js",
"main": "dist/cjs/monitoring-commons.js",
"module": "dist/mjs/monitoring-commons.js",
"exports": {
".": {
"import": "./dist/mjs/monitoring-commons.js",
"require": "./dist/cjs/monitoring-commons.js"
}
},
"engines": {

@@ -10,7 +17,10 @@ "node": ">=8.0.0"

"files": [
"src"
"src",
"dist"
],
"scripts": {
"build": "#",
"test": "mocha --no-timeouts 'test/unit/*.test.js' 'test/it/*.test.js' 'test/e2e/*.test.js' && npm run eslint",
"build": "rm -fr dist/* && tsc -p tsconfig.json && tsc -p tsconfig-cjs.json",
"test": "npm run test:mocha && npm run eslint",
"test:mocha": "npm run build && mocha --no-timeouts 'test/unit/*.test.js' 'test/it/*.test.js'",
"test:mocha-mjs": "npm run build && mocha --require @babel/register --no-timeouts 'test/**/*.test.mjs'",
"eslint": "eslint '**/*.js'",

@@ -34,15 +44,16 @@ "prepublishOnly": "npm version patch"

},
"dependencies": {
"debug": "^4.1.0"
},
"devDependencies": {
"@applitools/build-commons": "^1.1.13",
"chai": "^4.2.0",
"eslint": "^5.16.0",
"eslint-plugin-mocha-no-only": "^1.1.0",
"eslint-plugin-node": "^8.0.1",
"eslint-plugin-prettier": "^3.1.2",
"mocha": "^4.0.1",
"prettier": "^1.19.1"
"@babel/cli": "^7.15.7",
"@babel/core": "^7.15.5",
"@babel/preset-env": "^7.15.6",
"@babel/register": "^7.15.3",
"chai": "^4.3.8",
"eslint": "^8.48.0",
"eslint-plugin-mocha-no-only": "^1.1.1",
"eslint-plugin-node": "^11.1.0",
"eslint-plugin-prettier": "^5.0.0",
"mocha": "^10.2.0",
"prettier": "^3.0.3",
"typescript": "^5.1.6"
}
}

@@ -1,5 +0,8 @@

'use strict'
"use strict";
function makeTiming({parentPerformance = undefined, nowService = Date.now} = {}) {
const performance = parentPerformance || {}
function makeTiming({
parentPerformance = undefined,
nowService = Date.now,
} = {}) {
const performance = parentPerformance || {};

@@ -14,10 +17,13 @@ /**

function timeItAsync(name, f) {
const start = nowService()
const start = nowService();
return f().then(
v => ((performance[name] = (performance[name] || 0) + nowService() - start), v),
v => (
(performance[name] = (performance[name] || 0) + nowService() - start), Promise.reject(v)
(v) => (
(performance[name] = (performance[name] || 0) + nowService() - start), v
),
)
(v) => (
(performance[name] = (performance[name] || 0) + nowService() - start),
Promise.reject(v)
),
);
}

@@ -31,6 +37,6 @@

function getTimeItCallback(name) {
const start = nowService()
const start = nowService();
return () => {
performance[name] = (performance[name] || 0) + nowService() - start
}
performance[name] = (performance[name] || 0) + nowService() - start;
};
}

@@ -46,12 +52,12 @@

function timeIt(name, f) {
const start = nowService()
const start = nowService();
try {
const ret = f()
const ret = f();
performance[name] = (performance[name] || 0) + nowService() - start
performance[name] = (performance[name] || 0) + nowService() - start;
return ret
return ret;
} catch (err) {
performance[name] = (performance[name] || 0) + nowService() - start
throw err
performance[name] = (performance[name] || 0) + nowService() - start;
throw err;
}

@@ -65,3 +71,3 @@ }

performance,
}
};
}

@@ -71,2 +77,2 @@

makeTiming,
}
};
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc