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

bugsnag

Package Overview
Dependencies
Maintainers
4
Versions
63
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

bugsnag - npm Package Compare versions

Comparing version 1.2.0 to 1.3.0

5

CHANGELOG.md
Changelog
=========
1.3.0
-----
- Send 'severity' of error to Bugsnag
- Add 'payloadVersion'
1.2.0

@@ -5,0 +10,0 @@ -----

17

lib/bugsnag.js

@@ -51,3 +51,5 @@ var Bugsnag, BugsnagError, Configuration, Logger, Notification, Utils, domain, path,

return process.on("uncaughtException", function(err) {
return Bugsnag.notify(err, autoNotifyCallback(err, true));
return Bugsnag.notify(err, {
severity: "error"
}, autoNotifyCallback(err, true));
});

@@ -80,3 +82,4 @@ }

Bugsnag.notify(err, {
req: req
req: req,
severity: "error"
}, autoNotifyCallback(err));

@@ -98,4 +101,5 @@ return next(err);

return Bugsnag.notify(err, {
req: req
});
req: req,
severity: "error"
}, autoNotifyCallback(err));
};

@@ -114,3 +118,5 @@

if (err && (err instanceof Error)) {
return Bugsnag.notify(err, autoNotifyCallback(err));
return Bugsnag.notify(err, {
severity: "error"
}, autoNotifyCallback(err));
}

@@ -132,2 +138,3 @@ if (cb) {

dom._bugsnagOptions = options;
options["severity"] = "error";
dom.on('error', function(err) {

@@ -134,0 +141,0 @@ return Bugsnag.notify(err, options, autoNotifyCallback(err));

@@ -10,6 +10,8 @@ var Configuration, Logger, Utils, path;

module.exports = Configuration = (function() {
var _ref;
var PAYLOAD_VERSION, _ref;
function Configuration() {}
PAYLOAD_VERSION = "2";
Configuration.filters = ["password"];

@@ -63,2 +65,3 @@

}
Configuration.payloadVersion = PAYLOAD_VERSION;
Configuration.releaseStage = options.releaseStage || Configuration.releaseStage;

@@ -65,0 +68,0 @@ Configuration.appVersion = options.appVersion || Configuration.appVersion;

@@ -1,2 +0,3 @@

var Configuration, Logger, Notification, Utils, path, requestInfo;
var Configuration, Logger, Notification, Utils, path, requestInfo,
__indexOf = [].indexOf || function(item) { for (var i = 0, l = this.length; i < l; i++) { if (i in this && this[i] === item) return i; } return -1; };

@@ -14,3 +15,3 @@ Utils = require("./utils");

module.exports = Notification = (function() {
var NOTIFIER_NAME, NOTIFIER_URL, NOTIFIER_VERSION;
var NOTIFIER_NAME, NOTIFIER_URL, NOTIFIER_VERSION, SUPPORTED_SEVERITIES;

@@ -23,4 +24,6 @@ NOTIFIER_NAME = "Bugsnag Node Notifier";

SUPPORTED_SEVERITIES = ["error", "warning", "info"];
function Notification(bugsnagError, options) {
var domainOptions, event, _ref, _ref1, _ref10, _ref11, _ref12, _ref13, _ref14, _ref2, _ref3, _ref4, _ref5, _ref6, _ref7, _ref8, _ref9;
var domainOptions, event, _ref, _ref1, _ref10, _ref11, _ref12, _ref13, _ref14, _ref15, _ref2, _ref3, _ref4, _ref5, _ref6, _ref7, _ref8, _ref9;
if (options == null) {

@@ -47,2 +50,10 @@ options = {};

}
if (Configuration.payloadVersion) {
event.payloadVersion = Configuration.payloadVersion;
}
if ((options.severity != null) && (_ref12 = options.severity, __indexOf.call(SUPPORTED_SEVERITIES, _ref12) >= 0)) {
event.severity = options.severity;
} else {
event.severity = "warning";
}
delete options.userId;

@@ -62,6 +73,6 @@ delete options.context;

delete options.req;
} else if (typeof process !== "undefined" && process !== null ? (_ref12 = process.domain) != null ? (_ref13 = _ref12._bugsnagOptions) != null ? _ref13.cleanedRequest : void 0 : void 0 : void 0) {
} else if (typeof process !== "undefined" && process !== null ? (_ref13 = process.domain) != null ? (_ref14 = _ref13._bugsnagOptions) != null ? _ref14.cleanedRequest : void 0 : void 0 : void 0) {
this.processRequest(event, process.domain._bugsnagOptions.cleanedRequest);
}
if (typeof process !== "undefined" && process !== null ? (_ref14 = process.domain) != null ? _ref14._bugsnagOptions : void 0 : void 0) {
if (typeof process !== "undefined" && process !== null ? (_ref15 = process.domain) != null ? _ref15._bugsnagOptions : void 0 : void 0) {
domainOptions = Utils.cloneObject(process.domain._bugsnagOptions, {

@@ -68,0 +79,0 @@ except: ["req", "context", "userId", "groupingHash"]

{
"name": "bugsnag",
"description": "Bugsnag notifier for node.js scripts",
"version": "1.2.0",
"version": "1.3.0",
"main": "./lib/bugsnag.js",

@@ -6,0 +6,0 @@ "homepage": "http://bugsnag.com",

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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