raven
Advanced tools
Comparing version 1.1.5 to 1.1.6
@@ -0,1 +1,4 @@ | ||
# 1.1.6 - 4/7/2017 | ||
- Fix memory leak in `consoleAlert` (and thus, if not disabled, in `captureException`) [See #300] | ||
# 1.1.5 - 3/16/2017 | ||
@@ -2,0 +5,0 @@ - Fix memory leak in http autoBreadcrumb instrumentation [See #296] |
@@ -28,3 +28,3 @@ 'use strict'; | ||
if (typeof window !== 'undefined' && typeof document !== 'undefined' && typeof navigator !== 'undefined') { | ||
utils.consoleAlert('This looks like a browser environment; are you sure you don\'t want Raven.js for browser JavaScript? https://sentry.io/for/javascript'); | ||
utils.consoleAlertOnce('This looks like a browser environment; are you sure you don\'t want Raven.js for browser JavaScript? https://sentry.io/for/javascript'); | ||
} | ||
@@ -446,15 +446,15 @@ | ||
getIdent: function getIdent(result) { | ||
utils.consoleAlert('getIdent has been deprecated and will be removed in v2.0'); | ||
utils.consoleAlertOnce('getIdent has been deprecated and will be removed in v2.0'); | ||
return result; | ||
}, | ||
captureError: function captureError() { | ||
utils.consoleAlert('captureError has been deprecated and will be removed in v2.0; use captureException instead'); | ||
utils.consoleAlertOnce('captureError has been deprecated and will be removed in v2.0; use captureException instead'); | ||
return this.captureException.apply(this, arguments); | ||
}, | ||
captureQuery: function captureQuery() { | ||
utils.consoleAlert('captureQuery has been deprecated and will be removed in v2.0'); | ||
utils.consoleAlertOnce('captureQuery has been deprecated and will be removed in v2.0'); | ||
return this; | ||
}, | ||
patchGlobal: function (cb) { | ||
utils.consoleAlert('patchGlobal has been deprecated and will be removed in v2.0; use install instead'); | ||
utils.consoleAlertOnce('patchGlobal has been deprecated and will be removed in v2.0; use install instead'); | ||
registerExceptionHandler(this, cb); | ||
@@ -464,11 +464,11 @@ return this; | ||
setUserContext: function setUserContext() { | ||
utils.consoleAlert('setUserContext has been deprecated and will be removed in v2.0; use setContext instead'); | ||
utils.consoleAlertOnce('setUserContext has been deprecated and will be removed in v2.0; use setContext instead'); | ||
return this; | ||
}, | ||
setExtraContext: function setExtraContext() { | ||
utils.consoleAlert('setExtraContext has been deprecated and will be removed in v2.0; use setContext instead'); | ||
utils.consoleAlertOnce('setExtraContext has been deprecated and will be removed in v2.0; use setContext instead'); | ||
return this; | ||
}, | ||
setTagsContext: function setTagsContext() { | ||
utils.consoleAlert('setTagsContext has been deprecated and will be removed in v2.0; use setContext instead'); | ||
utils.consoleAlertOnce('setTagsContext has been deprecated and will be removed in v2.0; use setContext instead'); | ||
return this; | ||
@@ -475,0 +475,0 @@ }, |
@@ -19,3 +19,3 @@ 'use strict'; | ||
connectMiddleware.errorHandler = function (clientOrDSN) { | ||
utils.consoleAlert('top-level Raven.middleware.*.errorHandler has been deprecated and will be removed in v2.0; use Raven.errorHandler() instance method instead'); | ||
utils.consoleAlertOnce('top-level Raven.middleware.*.errorHandler has been deprecated and will be removed in v2.0; use Raven.errorHandler() instance method instead'); | ||
return getClient(clientOrDSN).errorHandler(); | ||
@@ -27,3 +27,3 @@ }; | ||
connectMiddleware.requestHandler = function (clientOrDSN) { | ||
utils.consoleAlert('top-level Raven.middleware.*.requestHandler has been deprecated and will be removed in v2.0; use Raven.requestHandler() instance method instead'); | ||
utils.consoleAlertOnce('top-level Raven.middleware.*.requestHandler has been deprecated and will be removed in v2.0; use Raven.requestHandler() instance method instead'); | ||
return getClient(clientOrDSN).requestHandler(); | ||
@@ -30,0 +30,0 @@ }; |
@@ -24,2 +24,8 @@ 'use strict'; | ||
module.exports.consoleAlert = function consoleAlert(msg) { | ||
if (consoleAlerts) { | ||
console.log('raven@' + ravenVersion + ' alert: ' + msg); | ||
} | ||
}; | ||
module.exports.consoleAlertOnce = function consoleAlertOnce(msg) { | ||
if (consoleAlerts && !(msg in consoleAlerts)) { | ||
@@ -139,2 +145,8 @@ consoleAlerts[msg] = true; | ||
function parseLines(lines, frame) { | ||
frame.pre_context = lines.slice(Math.max(0, frame.lineno - (LINES_OF_CONTEXT + 1)), frame.lineno - 1); | ||
frame.context_line = lines[frame.lineno - 1]; | ||
frame.post_context = lines.slice(frame.lineno, frame.lineno + LINES_OF_CONTEXT); | ||
} | ||
function parseStack(err, cb) { | ||
@@ -189,3 +201,3 @@ var frames = [], | ||
if (frame.filename in cache) { | ||
parseLines(cache[frame.filename]); | ||
parseLines(cache[frame.filename], frame); | ||
if (--callbacks === 0) cb(frames); | ||
@@ -204,8 +216,2 @@ return; | ||
}); | ||
function parseLines(lines) { | ||
frame.pre_context = lines.slice(Math.max(0, frame.lineno - (LINES_OF_CONTEXT + 1)), frame.lineno - 1); | ||
frame.context_line = lines[frame.lineno - 1]; | ||
frame.post_context = lines.slice(frame.lineno, frame.lineno + LINES_OF_CONTEXT); | ||
} | ||
}); | ||
@@ -212,0 +218,0 @@ } |
@@ -12,3 +12,3 @@ { | ||
], | ||
"version": "1.1.5", | ||
"version": "1.1.6", | ||
"repository": "git://github.com/getsentry/raven-node.git", | ||
@@ -15,0 +15,0 @@ "author": "Matt Robenolt <matt@ydekproductions.com>", |
Sorry, the diff of this file is too big to display
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
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
366997
1489