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

alpha-lambda-bunyan

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

alpha-lambda-bunyan - npm Package Compare versions

Comparing version 1.1.0 to 1.2.0

16

lib/middleware.js

@@ -9,6 +9,12 @@ 'use strict';

function child(fields) {
const newContext = _.cloneDeep(this);
const refProps = this._refProps;
const newContext = _.cloneDeepWith(this, (val, key) => {
return _.includes(refProps, key)
? val
: undefined;
});
const log = this.log.child(fields);
return Object.assign(newContext, { log });
return _.assign(newContext, { log });
}

@@ -19,2 +25,6 @@

const _refProps = options.refProps
? [].concat(options.refProps)
: [];
const log = bunyan.createLogger({

@@ -32,3 +42,3 @@ name: context.functionName,

return _.assign(context, { log, child });
return _.assign(context, { log, child, _refProps });
}

@@ -35,0 +45,0 @@

2

lib/serializers.js

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

context(ctx) {
return _.omit(ctx, ['log', 'child']);
return _.omit(ctx, ['log', 'child', '_refProps']);
},

@@ -11,0 +11,0 @@

{
"name": "alpha-lambda-bunyan",
"version": "1.1.0",
"version": "1.2.0",
"description": "Bunyan logger middleware for alpha-lambda",

@@ -5,0 +5,0 @@ "repository": {

@@ -71,2 +71,3 @@ # alpha-lambda-bunyan

- **[serializers]** - { Object } - [custom serializers][bunyan-serializers-url] that override / extend existing ones
- **[refProps]** - { String | String[] } - properties on the context that should be shallow copied and not deep copied when a child context is created

@@ -73,0 +74,0 @@ ## License

Sorry, the diff of this file is too big to display

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