New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@janiscommerce/log

Package Overview
Dependencies
Maintainers
1
Versions
41
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@janiscommerce/log - npm Package Compare versions

Comparing version 3.5.0 to 3.5.1

7

CHANGELOG.md

@@ -10,2 +10,9 @@ # Changelog

## [3.5.1] - 2022-07-11
### Changed
- Validation of environment
### Removed
- LogError `code: 3` for environment validation
## [3.5.0] - 2022-07-07

@@ -12,0 +19,0 @@ ### Added

13

lib/helpers/utils.js
'use strict';
const LogError = require('../log-error');
const envs = {
local: 'Local',
beta: 'Beta',

@@ -31,12 +28,4 @@ qa: 'QA',

const getEnv = () => {
const getEnv = () => process.env.JANIS_ENV;
const env = process.env.JANIS_ENV;
if(!env || !envs[env])
throw new LogError('Unknown environment', LogError.codes.NO_ENVIRONMENT);
return env;
};
const getFormattedEnv = () => envs[getEnv()];

@@ -43,0 +32,0 @@

@@ -10,6 +10,4 @@ 'use strict';

FIREHOSE_ERROR: 2,
NO_ENVIRONMENT: 3,
ASSUME_ROLE_ERROR: 4
};
}

@@ -16,0 +14,0 @@

@@ -62,3 +62,3 @@ 'use strict';

if(!this.shouldAddLogs())
return true;
return;

@@ -80,4 +80,3 @@ if(!Array.isArray(logs))

static shouldAddLogs() {
// No logs are added for local development
return getEnv() !== 'local';
return ['beta', 'qa', 'prod'].includes(getEnv());
}

@@ -84,0 +83,0 @@

{
"name": "@janiscommerce/log",
"version": "3.5.0",
"version": "3.5.1",
"description": "A package for creating logs in Janis Trace Service",

@@ -5,0 +5,0 @@ "main": "lib/index.js",

@@ -72,4 +72,6 @@ # log

| 2 | Firehose Error |
| 3 | Unknown stage name |
| 4 | Assuming STS role error |
- Error `code: 3` removed since _3.5.1_
## Usage

@@ -76,0 +78,0 @@

@@ -6,3 +6,2 @@ export = LogError;

FIREHOSE_ERROR: number;
NO_ENVIRONMENT: number;
ASSUME_ROLE_ERROR: number;

@@ -9,0 +8,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