Comparing version 1.5.0 to 1.5.1
Changelog | ||
========= | ||
1.5.1 | ||
----- | ||
- Send correct content-length with utf8 strings | ||
1.5.0 | ||
@@ -5,0 +9,0 @@ ----- |
@@ -164,2 +164,2 @@ var Bugsnag, BugsnagError, Configuration, Logger, Notification, Utils, domain, path, | ||
}).call(this); | ||
})(); |
@@ -89,2 +89,2 @@ var Configuration, Logger, Utils, path; | ||
}).call(this); | ||
})(); |
@@ -13,11 +13,8 @@ var Logger, | ||
this.error = __bind(this.error, this); | ||
this.warn = __bind(this.warn, this); | ||
this.info = __bind(this.info, this); | ||
} | ||
Logger.prototype.info = function() { | ||
var output; | ||
var e, output; | ||
output = 1 <= arguments.length ? __slice.call(arguments, 0) : []; | ||
@@ -28,4 +25,4 @@ try { | ||
} | ||
} catch (e) { | ||
} catch (_error) { | ||
e = _error; | ||
} | ||
@@ -35,3 +32,3 @@ }; | ||
Logger.prototype.warn = function() { | ||
var output; | ||
var e, output; | ||
output = 1 <= arguments.length ? __slice.call(arguments, 0) : []; | ||
@@ -42,4 +39,4 @@ try { | ||
} | ||
} catch (e) { | ||
} catch (_error) { | ||
e = _error; | ||
} | ||
@@ -49,3 +46,3 @@ }; | ||
Logger.prototype.error = function() { | ||
var output; | ||
var e, output; | ||
output = 1 <= arguments.length ? __slice.call(arguments, 0) : []; | ||
@@ -56,4 +53,4 @@ try { | ||
} | ||
} catch (e) { | ||
} catch (_error) { | ||
e = _error; | ||
} | ||
@@ -60,0 +57,0 @@ }; |
@@ -119,3 +119,3 @@ var Configuration, Logger, Notification, Utils, path, request, requestInfo, | ||
"Content-Type": 'application/json', | ||
"Content-Length": payload.length | ||
"Content-Length": Buffer.byteLength(payload, 'utf8') | ||
} | ||
@@ -122,0 +122,0 @@ }; |
@@ -14,3 +14,2 @@ var Utils, classToType, name, path, _i, _len, _ref; | ||
module.exports = Utils = (function() { | ||
function Utils() {} | ||
@@ -31,7 +30,8 @@ | ||
Utils.getPackageVersion = function(packageJSONPath) { | ||
var packageInfo; | ||
var e, packageInfo; | ||
try { | ||
packageInfo = require(packageJSONPath); | ||
return packageInfo.version; | ||
} catch (e) { | ||
} catch (_error) { | ||
e = _error; | ||
return null; | ||
@@ -106,4 +106,3 @@ } | ||
Utils.filterObject = function(object, filters, options) { | ||
var alreadyFiltered, | ||
_this = this; | ||
var alreadyFiltered; | ||
if (options == null) { | ||
@@ -119,16 +118,18 @@ options = {}; | ||
alreadyFiltered = options.alreadyFiltered || []; | ||
return Object.keys(object).forEach(function(key) { | ||
if (object.hasOwnProperty(key)) { | ||
return filters.forEach(function(filter) { | ||
if (key.indexOf(filter) !== -1) { | ||
return object[key] = "[FILTERED]"; | ||
} else if (_this.typeOf(object[key]) === "object" && alreadyFiltered.indexOf(object[key]) === -1) { | ||
alreadyFiltered.push(object[key]); | ||
return _this.filterObject(object[key], filters, { | ||
alreadyFiltered: alreadyFiltered | ||
}); | ||
} | ||
}); | ||
} | ||
}); | ||
return Object.keys(object).forEach((function(_this) { | ||
return function(key) { | ||
if (object.hasOwnProperty(key)) { | ||
return filters.forEach(function(filter) { | ||
if (key.indexOf(filter) !== -1) { | ||
return object[key] = "[FILTERED]"; | ||
} else if (_this.typeOf(object[key]) === "object" && alreadyFiltered.indexOf(object[key]) === -1) { | ||
alreadyFiltered.push(object[key]); | ||
return _this.filterObject(object[key], filters, { | ||
alreadyFiltered: alreadyFiltered | ||
}); | ||
} | ||
}); | ||
} | ||
}; | ||
})(this)); | ||
}; | ||
@@ -135,0 +136,0 @@ |
{ | ||
"name": "bugsnag", | ||
"description": "Bugsnag notifier for node.js scripts", | ||
"version": "1.5.0", | ||
"version": "1.5.1", | ||
"main": "./lib/bugsnag.js", | ||
@@ -6,0 +6,0 @@ "homepage": "http://bugsnag.com", |
Sorry, the diff of this file is not supported yet
77478
600