Socket
Socket
Sign inDemoInstall

@contrast/core

Package Overview
Dependencies
Maintainers
9
Versions
62
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@contrast/core - npm Package Compare versions

Comparing version 1.31.0 to 1.31.1

20

lib/app-info.js

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

let pkgInfo;
let name;
let err;

@@ -46,2 +47,3 @@

entrypoint = getEntrypoint();
name = getApplicationName();
} catch (_err) {

@@ -64,3 +66,3 @@ err = _err;

pkg: pkgInfo.packageData,
name: config.application.name || pkgInfo.packageData.name,
name,
app_dir: pkgInfo.dir,

@@ -203,2 +205,18 @@ version: config.application.version || pkgInfo.packageData.version,

}
/**
* The name field is required e.g. reporting, rewrite caching, etc.
* @throws {Error} if there is no name identified
*/
function getApplicationName() {
name = config.application.name || pkgInfo.packageData.name;
if (!name) {
throw new Error(
'The application\'s name was not identified. ' +
'Please provide name in package.json field or with the agent\'s application.name config option.'
);
}
return name;
}
};

6

package.json
{
"name": "@contrast/core",
"version": "1.31.0",
"version": "1.31.1",
"description": "Preconfigured Contrast agent core services and models",

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

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

@@ -20,3 +20,3 @@ "scripts": {

"dependencies": {
"@contrast/common": "1.20.0",
"@contrast/common": "1.20.1",
"@contrast/find-package-json": "^1.0.0",

@@ -23,0 +23,0 @@ "@contrast/fn-inspect": "^4.0.0"

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