Socket
Socket
Sign inDemoInstall

raven

Package Overview
Dependencies
Maintainers
4
Versions
70
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

raven - npm Package Compare versions

Comparing version 1.2.0 to 1.2.1

2

CONTRIBUTING.md
## How to release raven-node:
* [ ] Run the manual memory tests in `test/manual` to make sure we didn't introduce a memory leak
* [ ] Consider whether any changes warrant additions to these tests
* [ ] Stop and think "What version number should this be according to SemVer?"

@@ -3,0 +5,0 @@ * [ ] Bump version number in `package.json`.

@@ -0,1 +1,4 @@

# 1.1.6, 1.2.1 - 4/7/2017
- Fix memory leak in `consoleAlert` (and thus, if not disabled, in `captureException`) [See #300]
# 1.2.0 - 3/16/2017

@@ -2,0 +5,0 @@ - Add sampleRate config option [See #292]

16

lib/client.js

@@ -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');
}

@@ -449,15 +449,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);

@@ -467,11 +467,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;

@@ -478,0 +478,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.2.0",
"version": "1.2.1",
"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

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