Socket
Socket
Sign inDemoInstall

@contrast/instrumentation

Package Overview
Dependencies
1
Maintainers
9
Versions
18
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.8.0 to 1.9.0

7

lib/http.js

@@ -17,2 +17,3 @@ /*

const { StringPrototypeSubstring } = require('@contrast/common');
const { get } = require('./utils');

@@ -31,2 +32,8 @@

methods.forEach((method) => {
const dotIdx = name.indexOf('.');
const firstName = dotIdx > -1 ? StringPrototypeSubstring.call(name, 0, dotIdx) : name;
// check for whether the target on the module exists first to avoid these Node warnings:
// (node:12155) Warning: Accessing non-existent property 'Server' of module exports inside circular dependency
if (!(firstName in module)) return;
const patchObj = get(module, name);

@@ -33,0 +40,0 @@ if (!patchObj) return;

4

lib/utils.js

@@ -17,3 +17,3 @@ /*

const { split } = require('@contrast/common');
const { StringPrototypeSplit } = require('@contrast/common');

@@ -24,3 +24,3 @@ function get(obj, name) {

let nest = obj;
for (const prop of split(name, '.')) {
for (const prop of StringPrototypeSplit.call(name, '.')) {
nest = nest?.[prop];

@@ -27,0 +27,0 @@ if (nest === undefined) break;

{
"name": "@contrast/instrumentation",
"version": "1.8.0",
"version": "1.9.0",
"description": "Shared hooks and patches between Protect and Assess components",

@@ -14,3 +14,3 @@ "license": "SEE LICENSE IN LICENSE",

"npm": ">=6.13.7 <7 || >= 8.3.1",
"node": ">= 14.18.0"
"node": ">= 16.9.1"
},

@@ -21,4 +21,4 @@ "scripts": {

"dependencies": {
"@contrast/common": "1.21.0"
"@contrast/common": "1.21.1"
}
}
SocketSocket SOC 2 Logo

Product

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

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc