@serverless/sdk
Advanced tools
Comparing version 0.5.9 to 0.5.10
@@ -5,2 +5,12 @@ # Changelog | ||
### [0.5.10](https://github.com/serverless/console/compare/@serverless/sdk@0.5.9...@serverless/sdk@0.5.10) (2023-04-20) | ||
### Bug Fixes | ||
- Do not fail on missing `layer.method` ([21aabd9](https://github.com/serverless/console/commit/21aabd98a7c22223814962132608acaa16907f74)) | ||
### Maintenance Improvements | ||
- Improve `sdk._reportWarning` resolution ([65ad54b](https://github.com/serverless/console/commit/65ad54b5485f5c1bda324b468f826437b44eb437)) | ||
### [0.5.9](https://github.com/serverless/console/compare/@serverless/sdk@0.5.8...@serverless/sdk@0.5.9) (2023-04-20) | ||
@@ -7,0 +17,0 @@ |
@@ -115,9 +115,3 @@ 'use strict'; | ||
serverlessSdk._createTraceSpan = (name, options = {}) => | ||
new TraceSpan( | ||
name, | ||
Object.assign(options, { | ||
_reportWarning: reportWarning, | ||
}) | ||
); | ||
serverlessSdk._createTraceSpan = (name, options = {}) => new TraceSpan(name, options); | ||
serverlessSdk._reportError = reportError; | ||
@@ -124,0 +118,0 @@ serverlessSdk._reportWarning = reportWarning; |
@@ -47,3 +47,5 @@ 'use strict'; | ||
return `express.middleware.route.${[ | ||
generateMiddlewareName(this.method), | ||
// TODO: Cover not set `this.method` case with integration test | ||
// (at this point it's not clear how to reproduce it) | ||
this.method && generateMiddlewareName(this.method), | ||
generateMiddlewareName(this.name) || 'unknown', | ||
@@ -50,0 +52,0 @@ ] |
@@ -46,3 +46,2 @@ 'use strict'; | ||
} | ||
this._reportWarning = options._reportWarning; | ||
this.startTime = startTime || defaultStartTime; | ||
@@ -90,3 +89,2 @@ this.name = ensureSpanName(name); | ||
immediateDescendants, | ||
_reportWarning: this._reportWarning, | ||
}); | ||
@@ -142,3 +140,4 @@ } | ||
`lambda invocation: ${leftoverSpans.map(({ name }) => name).join(', ')}\n`; | ||
this._reportWarning(message, 'SDK_SPAN_NOT_CLOSED', { type: 'USER' }); | ||
// Require on spot to avoid otherwise difficult to mitigate circular dependency | ||
require('..')._reportWarning(message, 'SDK_SPAN_NOT_CLOSED', { type: 'USER' }); | ||
} | ||
@@ -145,0 +144,0 @@ asyncLocalStorage.enterWith(this); |
{ | ||
"name": "@serverless/sdk", | ||
"repository": "serverless/console", | ||
"version": "0.5.9", | ||
"version": "0.5.10", | ||
"author": "Serverless, Inc.", | ||
@@ -6,0 +6,0 @@ "dependencies": { |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
80089
1571