New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.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.3.0 to 1.3.2

.travis.yml

11

CHANGELOG.md
Changelog
=========
1.3.2
-----
- Push yanked version
1.3.1
-----
- Allow the filters to be configured
- Fix bug where null errors could cause bugsnag not to notify
- Fix iis issues on windows
- Detect oauth caused by errors
1.3.0

@@ -5,0 +16,0 @@ -----

6

lib/bugsnag.js

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

Bugsnag.notify = function(error, options, cb) {
var bugsnagError, notification;
var bugsnagErrors, notification;
if (Utils.typeOf(options) === "function") {

@@ -73,5 +73,5 @@ cb = options;

Configuration.logger.info("Notifying Bugsnag of exception...\n" + ((error != null ? error.stack : void 0) || error));
bugsnagError = new BugsnagError(error, options.errorName);
bugsnagErrors = BugsnagError.buildErrors(error, options.errorName);
delete options.errorName;
notification = new Notification(bugsnagError, options);
notification = new Notification(bugsnagErrors, options);
return notification.deliver(cb);

@@ -78,0 +78,0 @@ };

@@ -69,2 +69,3 @@ var Configuration, Logger, Utils, path;

Configuration.useSSL = options.useSSL != null ? options.useSSL : Configuration.useSSL;
Configuration.filters = options.filters || Configuration.filters;
Configuration.notifyReleaseStages = options.notifyReleaseStages || Configuration.notifyReleaseStages;

@@ -71,0 +72,0 @@ Configuration.notifyHost = options.notifyHost || Configuration.notifyHost;

@@ -12,2 +12,11 @@ var Configuration, Error, Utils, stacktrace;

Error.buildErrors = function(error, errorClass) {
var returnArray;
returnArray = [new module.exports(error, errorClass)];
if (error.oauthError) {
returnArray.push(new module.exports(error.oauthError));
}
return returnArray;
};
function Error(error, errorClass) {

@@ -18,5 +27,8 @@ var callSites;

this.errorClass = errorClass || "Error";
} else {
} else if (error) {
this.message = error.message;
this.errorClass = errorClass || error.constructor.name || error.name || "Error";
} else {
this.message = "[unknown]";
this.errorClass = errorClass || "Error";
}

@@ -23,0 +35,0 @@ callSites = stacktrace.parse(error);

@@ -25,3 +25,3 @@ var Configuration, Logger, Notification, Utils, path, requestInfo,

function Notification(bugsnagError, options) {
function Notification(bugsnagErrors, options) {
var domainOptions, event, _ref, _ref1, _ref10, _ref11, _ref12, _ref13, _ref14, _ref15, _ref2, _ref3, _ref4, _ref5, _ref6, _ref7, _ref8, _ref9;

@@ -32,3 +32,3 @@ if (options == null) {

event = {
exceptions: [bugsnagError]
exceptions: bugsnagErrors
};

@@ -35,0 +35,0 @@ if (options.userId || (typeof process !== "undefined" && process !== null ? (_ref = process.domain) != null ? (_ref1 = _ref._bugsnagOptions) != null ? _ref1.userId : void 0 : void 0 : void 0)) {

@@ -28,9 +28,9 @@ var requestInfo;

request.connection = {
remoteAddress: connection.remoteAddress,
remoteAddress: connection.remoteAddress || req.ip,
remotePort: connection.remotePort,
bytesRead: connection.bytesRead,
bytesWritten: connection.bytesWritten,
localPort: address.port,
localAddress: address.address,
IPVersion: address.family
localPort: portNumber,
localAddress: address != null ? address.address : void 0,
IPVersion: address != null ? address.family : void 0
};

@@ -37,0 +37,0 @@ }

@@ -40,7 +40,3 @@ var Utils, classToType, name, path, _i, _len, _ref;

Utils.fullPath = function(unknownPath) {
if (unknownPath.indexOf(path.sep) === 0) {
return unknownPath;
} else {
return path.join(__dirname, unknownPath);
}
return path.resolve(__dirname, unknownPath);
};

@@ -47,0 +43,0 @@

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

@@ -32,3 +32,3 @@ "homepage": "http://bugsnag.com",

"scripts": {
"test": "mocha"
"test": "mocha --compilers coffee:coffee-script/register"
},

@@ -38,2 +38,2 @@ "engine": {

}
}
}

@@ -100,2 +100,19 @@ Bugsnag Notifier for Node.js

### Severity
You can set the severity of an error in Bugsnag by including the severity option when
notifying bugsnag of the error,
```javascript
bugsnag.notify(new Error("Non-fatal"), {
severity: "error"
})
```
Valid severities are `error`, `warning` and `info`.
Severity is displayed in the dashboard and can be used to filter the error list.
By default all crashes (or unhandled exceptions) are set to `error` and all
`bugsnag.notify` calls default to `warning`.
See the full documentation for the [notify](#notify) function for more details.

@@ -216,3 +233,3 @@

It is often very useful to send some extra application or user specific data along with every exception. To do this, you can set the `metaData`:
```javascript

@@ -281,2 +298,19 @@ bugsnag.register("your-api-key-here", { metaData: {

### severity
You can set the severity of an error in Bugsnag by including the severity option when
notifying bugsnag of the error,
```ruby
bugsnag.notify(new Error("Non-fatal"), {
severity: "error"
})
```
Valid severities are `error`, `warning` and `info`.
Severity is displayed in the dashboard and can be used to filter the error list.
By default all crashes (or unhandled exceptions) are set to `error` and all
`Bugsnag.notify` calls default to `warning`.
### callback

@@ -283,0 +317,0 @@

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

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