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

@dotcom-reliability-kit/logger

Package Overview
Dependencies
Maintainers
5
Versions
51
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@dotcom-reliability-kit/logger - npm Package Compare versions

Comparing version 2.2.4 to 2.2.5

16

lib/logger.js
const pino = require('pino').default;
const serializeError = require('@dotcom-reliability-kit/serialize-error');
const { default: clone } = require('@ungap/structured-clone');
const clone = require('lodash.clonedeep');
const appInfo = require('@dotcom-reliability-kit/app-info');

@@ -149,3 +149,3 @@

*
* @param {LoggerOptions & PrivateLoggerOptions} [options = {}]
* @param {LoggerOptions & PrivateLoggerOptions} [options]
* Options to configure the logger.

@@ -158,3 +158,3 @@ */

// object with `Object.freeze` to prevent any editing after instantiation
this.#baseLogData = clone(options.baseLogData, { lossy: true });
this.#baseLogData = clone(options.baseLogData);
}

@@ -342,2 +342,5 @@

log(level, ...logData) {
if (typeof level !== 'string') {
throw new TypeError('The log `level` argument must be a string');
}
try {

@@ -361,5 +364,3 @@ const { logLevel, isDeprecated } = Logger.getLogLevelInfo(level);

// Transform the log data
let transformedLogData = clone(sanitizedLogData, {
lossy: true
});
let transformedLogData = clone(sanitizedLogData);
if (this.#transforms.length) {

@@ -551,4 +552,3 @@ transformedLogData = this.#transforms.reduce(

return Object.assign(collect, item);
}, {}),
{ lossy: true }
}, {})
);

@@ -555,0 +555,0 @@ }

@@ -18,3 +18,4 @@ export = createLegacyMaskTransform;

maskString: string;
references: WeakSet<any>;
};
//# sourceMappingURL=legacy-mask.d.ts.map

@@ -19,2 +19,4 @@ /**

* The mask string to apply to discovered sensitive values.
* @property {WeakSet} references
* An internal store of references used to avoid masking the same object infinitely.
*/

@@ -73,2 +75,11 @@

}
// Handle circular references
if (value && typeof value === 'object') {
if (settings.references.has(value)) {
return value;
}
settings.references.add(value);
}
if (Array.isArray(value)) {

@@ -182,3 +193,4 @@ return value.map((item) => mask(item, settings));

maskRegExp,
maskString
maskString,
references: new WeakSet()
});

@@ -185,0 +197,0 @@ };

{
"name": "@dotcom-reliability-kit/logger",
"version": "2.2.4",
"version": "2.2.5",
"description": "A simple and fast logger based on Pino, with FT preferences baked in",

@@ -21,3 +21,3 @@ "repository": {

"@dotcom-reliability-kit/serialize-error": "^2.1.0",
"@ungap/structured-clone": "^1.2.0",
"lodash.clonedeep": "^4.5.0",
"pino": "^8.14.1"

@@ -37,4 +37,5 @@ },

"@types/events": "^3.0.0",
"@types/lodash.clonedeep": "^4.5.7",
"@types/ungap__structured-clone": "^0.3.0"
}
}

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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