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.4.0 to 0.4.1

lib/resolve-stack-trace-string.js

7

CHANGELOG.md

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

### [0.4.1](https://github.com/serverless/console/compare/@serverless/sdk@0.4.0...@serverless/sdk@0.4.1) (2023-01-26)
### Features
- Cover each `console.error` invocation with captured event ([c37ef74](https://github.com/serverless/console/commit/c37ef74094d8012570364572be69eaf633b44227))
- Store stack trace with each captured error and warning ([eadaafa](https://github.com/serverless/console/commit/eadaafa7f8b3258996e5a16d826bada94fa7f85c))
## [0.4.0](https://github.com/serverless/console/compare/@serverless/sdk@0.3.1...@serverless/sdk@0.4.0) (2023-01-19)

@@ -7,0 +14,0 @@

3

lib/create-error-captured-event.js

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

const CapturedEvent = require('./captured-event');
const resolveStackTraceString = require('./resolve-stack-trace-string');

@@ -30,3 +31,2 @@ const resolveNonErrorName = (value) => {

tags.message = error.message;
tags.stacktrace = error.stack;
} else {

@@ -36,2 +36,3 @@ tags.name = resolveNonErrorName(error);

}
tags.stacktrace = resolveStackTraceString(error);
capturedEvent.tags.setMany(tags, { prefix: 'error' });

@@ -38,0 +39,0 @@

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

const CapturedEvent = require('./captured-event');
const resolveStackTraceString = require('./resolve-stack-trace-string');

@@ -17,5 +18,9 @@ module.exports = (message, options = {}) => {

customFingerprint: options.fingerprint,
tags: { 'warning.message': message, 'warning.type': options.type || 1 },
tags: {
'warning.message': message,
'warning.type': options.type || 1,
'warning.stacktrace': resolveStackTraceString(),
},
_origin: options._origin,
});
};

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

const resolveWarnMesssage = (args) => {
const resolveMessage = (args) => {
let message = '';

@@ -35,5 +35,6 @@ const argsLength = args.length;

original.error.apply(this, args);
const error = args.find(isError);
if (!error) return;
createErrorCapturedEvent(error, { _origin: 'nodeConsole' });
createErrorCapturedEvent(
args.length === 1 && isError(args[0]) ? args[0] : resolveMessage(args),
{ _origin: 'nodeConsole' }
);
};

@@ -46,3 +47,3 @@

} else {
createWarningCapturedEvent(resolveWarnMesssage(args), { _origin: 'nodeConsole' });
createWarningCapturedEvent(resolveMessage(args), { _origin: 'nodeConsole' });
}

@@ -49,0 +50,0 @@ };

{
"name": "@serverless/sdk",
"repository": "serverless/console",
"version": "0.4.0",
"version": "0.4.1",
"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