Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@serverless/sdk

Package Overview
Dependencies
Maintainers
6
Versions
62
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@serverless/sdk - npm Package Compare versions

Comparing version 0.5.5 to 0.5.6

6

CHANGELOG.md

@@ -5,2 +5,8 @@ # Changelog

### [0.5.6](https://github.com/serverless/console/compare/@serverless/sdk@0.5.5...@serverless/sdk@0.5.6) (2023-04-12)
### Bug Fixes
- SC-799 Added capture warning when spans are not closed ([#631](https://github.com/serverless/console/issues/631)) ([16f9a8b](https://github.com/serverless/console/commit/16f9a8b9ced92a39c4fcff9af50e50ee7315aa1c))
### [0.5.5](https://github.com/serverless/console/compare/@serverless/sdk@0.5.4...@serverless/sdk@0.5.5) (2023-04-06)

@@ -7,0 +13,0 @@

8

index.js

@@ -113,3 +113,9 @@ 'use strict';

serverlessSdk._createTraceSpan = (name, options = {}) => new TraceSpan(name, options);
serverlessSdk._createTraceSpan = (name, options = {}) =>
new TraceSpan(
name,
Object.assign(options, {
_reportWarning: reportWarning,
})
);
serverlessSdk._reportError = reportError;

@@ -116,0 +122,0 @@ serverlessSdk._reportWarning = reportWarning;

8

lib/trace-span.js

@@ -46,2 +46,3 @@ 'use strict';

}
this._reportWarning = options._reportWarning;
this.startTime = startTime || defaultStartTime;

@@ -89,2 +90,3 @@ this.name = ensureSpanName(name);

immediateDescendants,
_reportWarning: this._reportWarning,
});

@@ -137,6 +139,6 @@ }

if (leftoverSpans.length) {
process.stderr.write(
const message =
"Serverless SDK Warning: Following trace spans didn't end before end of " +
`lambda invocation: ${leftoverSpans.map(({ name }) => name).join(', ')}\n`
);
`lambda invocation: ${leftoverSpans.map(({ name }) => name).join(', ')}\n`;
this._reportWarning(message, 'SDK_SPAN_NOT_CLOSED');
}

@@ -143,0 +145,0 @@ asyncLocalStorage.enterWith(this);

{
"name": "@serverless/sdk",
"repository": "serverless/console",
"version": "0.5.5",
"version": "0.5.6",
"author": "Serverless, Inc.",

@@ -6,0 +6,0 @@ "dependencies": {

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