Skip to content

Commit

Permalink
3.24.2
Browse files Browse the repository at this point in the history
  • Loading branch information
kamilogorek committed Apr 18, 2018
1 parent d92b6a2 commit 26fcb59
Show file tree
Hide file tree
Showing 22 changed files with 102 additions and 55 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# Changelog

## 3.24.2

* FEAT: Capture breadcrumbs on failed fetch request (#1293)
* BUGFIX: Make debug mode actually work (#1305)
* BUGFIX: Use correct frame url in ignore/whitelisturl calls (#1304)
* BUGFIX: Check input type before doing truncation (#1299)

## 3.24.1

* FEAT: Add flag for unhandled promise rejections (#1278)
Expand Down
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "raven-js",
"version": "3.24.1",
"version": "3.24.2",
"dependencies": {},
"main": "dist/raven.js",
"ignore": [
Expand Down
15 changes: 10 additions & 5 deletions dist/plugins/angular.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*! Raven.js 3.24.1 (f3b3500) | github.com/getsentry/raven-js */
/*! Raven.js 3.24.2 (d92b6a2) | github.com/getsentry/raven-js */

/*
* Includes TraceKit
Expand Down Expand Up @@ -250,7 +250,13 @@ function objectFrozen(obj) {
}

function truncate(str, max) {
return !max || str.length <= max ? str : str.substr(0, max) + '\u2026';
if (typeof max !== 'number') {
throw new Error('2nd argument to `truncate` function should be a number');
}
if (typeof str !== 'string' || max === 0) {
return str;
}
return str.length <= max ? str : str.substr(0, max) + '\u2026';
}

/**
Expand Down Expand Up @@ -549,10 +555,9 @@ function jsonSize(value) {
}

function serializeValue(value) {
var maxLength = 40;

if (typeof value === 'string') {
return value.length <= maxLength ? value : value.substr(0, maxLength - 1) + '\u2026';
var maxLength = 40;
return truncate(value, maxLength);
} else if (
typeof value === 'number' ||
typeof value === 'boolean' ||
Expand Down
4 changes: 2 additions & 2 deletions dist/plugins/angular.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/plugins/angular.min.js.map

Large diffs are not rendered by default.

15 changes: 10 additions & 5 deletions dist/plugins/console.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*! Raven.js 3.24.1 (f3b3500) | github.com/getsentry/raven-js */
/*! Raven.js 3.24.2 (d92b6a2) | github.com/getsentry/raven-js */

/*
* Includes TraceKit
Expand Down Expand Up @@ -252,7 +252,13 @@ function objectFrozen(obj) {
}

function truncate(str, max) {
return !max || str.length <= max ? str : str.substr(0, max) + '\u2026';
if (typeof max !== 'number') {
throw new Error('2nd argument to `truncate` function should be a number');
}
if (typeof str !== 'string' || max === 0) {
return str;
}
return str.length <= max ? str : str.substr(0, max) + '\u2026';
}

/**
Expand Down Expand Up @@ -551,10 +557,9 @@ function jsonSize(value) {
}

function serializeValue(value) {
var maxLength = 40;

if (typeof value === 'string') {
return value.length <= maxLength ? value : value.substr(0, maxLength - 1) + '\u2026';
var maxLength = 40;
return truncate(value, maxLength);
} else if (
typeof value === 'number' ||
typeof value === 'boolean' ||
Expand Down
4 changes: 2 additions & 2 deletions dist/plugins/console.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/plugins/console.min.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/plugins/ember.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*! Raven.js 3.24.1 (f3b3500) | github.com/getsentry/raven-js */
/*! Raven.js 3.24.2 (d92b6a2) | github.com/getsentry/raven-js */

/*
* Includes TraceKit
Expand Down
2 changes: 1 addition & 1 deletion dist/plugins/ember.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/plugins/require.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*! Raven.js 3.24.1 (f3b3500) | github.com/getsentry/raven-js */
/*! Raven.js 3.24.2 (d92b6a2) | github.com/getsentry/raven-js */

/*
* Includes TraceKit
Expand Down
2 changes: 1 addition & 1 deletion dist/plugins/require.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/plugins/vue.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*! Raven.js 3.24.1 (f3b3500) | github.com/getsentry/raven-js */
/*! Raven.js 3.24.2 (d92b6a2) | github.com/getsentry/raven-js */

/*
* Includes TraceKit
Expand Down
2 changes: 1 addition & 1 deletion dist/plugins/vue.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

64 changes: 47 additions & 17 deletions dist/raven.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*! Raven.js 3.24.1 (f3b3500) | github.com/getsentry/raven-js */
/*! Raven.js 3.24.2 (d92b6a2) | github.com/getsentry/raven-js */

/*
* Includes TraceKit
Expand Down Expand Up @@ -205,7 +205,7 @@ Raven.prototype = {
// webpack (using a build step causes webpack #1617). Grunt verifies that
// this value matches package.json during build.
// See: https://github.com/getsentry/raven-js/issues/465
VERSION: '3.24.1',
VERSION: '3.24.2',

debug: false,

Expand Down Expand Up @@ -639,6 +639,14 @@ Raven.prototype = {

// stack[0] is `throw new Error(msg)` call itself, we are interested in the frame that was just before that, stack[1]
var initialCall = isArray(stack.stack) && stack.stack[1];

// if stack[1] is `Raven.captureException`, it means that someone passed a string to it and we redirected that call
// to be handled by `captureMessage`, thus `initialCall` is the 3rd one, not 2nd
// initialCall => captureException(string) => captureMessage(string)
if (initialCall && initialCall.func === 'Raven.captureException') {
initialCall = stack.stack[2];
}

var fileurl = (initialCall && initialCall.url) || '';

if (
Expand Down Expand Up @@ -1436,17 +1444,30 @@ Raven.prototype = {
status_code: null
};

return origFetch.apply(this, args).then(function(response) {
fetchData.status_code = response.status;
return origFetch
.apply(this, args)
.then(function(response) {
fetchData.status_code = response.status;

self.captureBreadcrumb({
type: 'http',
category: 'fetch',
data: fetchData
});
self.captureBreadcrumb({
type: 'http',
category: 'fetch',
data: fetchData
});

return response;
});
return response;
})
['catch'](function(err) {
// if there is an error performing the request
self.captureBreadcrumb({
type: 'http',
category: 'fetch',
data: fetchData,
level: 'error'
});

throw err;
});
};
},
wrappedBuiltIns
Expand All @@ -1459,7 +1480,7 @@ Raven.prototype = {
if (_document.addEventListener) {
_document.addEventListener('click', self._breadcrumbEventHandler('click'), false);
_document.addEventListener('keypress', self._keypressEventHandler(), false);
} else if(_document.attachEvent){
} else if (_document.attachEvent) {
// IE8 Compatibility
_document.attachEvent('onclick', self._breadcrumbEventHandler('click'));
_document.attachEvent('onkeypress', self._keypressEventHandler());
Expand Down Expand Up @@ -2182,7 +2203,11 @@ Raven.prototype = {
},

_logDebug: function(level) {
if (this._originalConsoleMethods[level] && this.debug) {
// We allow `Raven.debug` and `Raven.config(DSN, { debug: true })` to not make backward incompatible API change
if (
this._originalConsoleMethods[level] &&
(this.debug || this._globalOptions.debug)
) {
// In IE<10 console methods do not have their own 'apply' method
Function.prototype.apply.call(
this._originalConsoleMethods[level],
Expand Down Expand Up @@ -2443,7 +2468,13 @@ function objectFrozen(obj) {
}

function truncate(str, max) {
return !max || str.length <= max ? str : str.substr(0, max) + '\u2026';
if (typeof max !== 'number') {
throw new Error('2nd argument to `truncate` function should be a number');
}
if (typeof str !== 'string' || max === 0) {
return str;
}
return str.length <= max ? str : str.substr(0, max) + '\u2026';
}

/**
Expand Down Expand Up @@ -2742,10 +2773,9 @@ function jsonSize(value) {
}

function serializeValue(value) {
var maxLength = 40;

if (typeof value === 'string') {
return value.length <= maxLength ? value : value.substr(0, maxLength - 1) + '\u2026';
var maxLength = 40;
return truncate(value, maxLength);
} else if (
typeof value === 'number' ||
typeof value === 'boolean' ||
Expand Down
6 changes: 3 additions & 3 deletions dist/raven.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/raven.min.js.map

Large diffs are not rendered by default.

12 changes: 6 additions & 6 deletions dist/sri.json
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
{
"@dist/raven.js": {
"hashes": {
"sha256": "/ONdAalAceMcNzn9xPsmeCnrYM52+JxI9taRSMwL6Bk=",
"sha512": "WMqEoQ1FfK46hKApMRtpKlvPKecuWGMCj7DRPglDKip7HXRv4xt1DiKSBPn0msNN1K4uI67lesz5wdIw5lE1AQ=="
"sha256": "986P+XPpcUAsCgHIffZrLXOM3qF8hwwRAf8Pbj3+l0U=",
"sha512": "B1SSEgalruqKHRjLG3hl+g55bgm5ucuCRg8oBCyB0DcIXhNlsHxeG3XwmDn93lAy9yLIMAW3hXKehkZj+h+8HQ=="
},
"type": null,
"integrity": "sha256-/ONdAalAceMcNzn9xPsmeCnrYM52+JxI9taRSMwL6Bk= sha512-WMqEoQ1FfK46hKApMRtpKlvPKecuWGMCj7DRPglDKip7HXRv4xt1DiKSBPn0msNN1K4uI67lesz5wdIw5lE1AQ==",
"integrity": "sha256-986P+XPpcUAsCgHIffZrLXOM3qF8hwwRAf8Pbj3+l0U= sha512-B1SSEgalruqKHRjLG3hl+g55bgm5ucuCRg8oBCyB0DcIXhNlsHxeG3XwmDn93lAy9yLIMAW3hXKehkZj+h+8HQ==",
"path": "dist/raven.js"
},
"@dist/raven.min.js": {
"hashes": {
"sha256": "C0v6xCW0XKv2zJSWSiNl920zYMsEWWLUvysjc48qp88=",
"sha512": "tdc7P+N+tY7wHWTALVNM1bTI0cdpgFckHXhydV0dWE4q1S3w9EWOJJYKF2Jy9J4srTruk3p/QJtH+/PpsCUsjw=="
"sha256": "iSi2Hd/fgRrUbyfELh7lQ0S4iqkOSNmEBMeb+rED1gI=",
"sha512": "VLhKf10cRS55TuheDYJRq3t5EU86sjfnu3ZEbIjGgo6AlZXJIZfvTSbOYTFliA9QABBfl057rAEyptvDPYuOMA=="
},
"type": null,
"integrity": "sha256-C0v6xCW0XKv2zJSWSiNl920zYMsEWWLUvysjc48qp88= sha512-tdc7P+N+tY7wHWTALVNM1bTI0cdpgFckHXhydV0dWE4q1S3w9EWOJJYKF2Jy9J4srTruk3p/QJtH+/PpsCUsjw==",
"integrity": "sha256-iSi2Hd/fgRrUbyfELh7lQ0S4iqkOSNmEBMeb+rED1gI= sha512-VLhKf10cRS55TuheDYJRq3t5EU86sjfnu3ZEbIjGgo6AlZXJIZfvTSbOYTFliA9QABBfl057rAEyptvDPYuOMA==",
"path": "dist/raven.min.js"
}
}
2 changes: 1 addition & 1 deletion docs/sentry-doc-config.json
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,6 @@
}
},
"vars": {
"RAVEN_VERSION": "3.24.1"
"RAVEN_VERSION": "3.24.2"
}
}
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"raven",
"sentry"
],
"version": "3.24.1",
"version": "3.24.2",
"repository": "git://github.com/getsentry/raven-js.git",
"license": "BSD-2-Clause",
"homepage": "https://github.com/getsentry/raven-js",
Expand Down
2 changes: 1 addition & 1 deletion src/raven.js
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ Raven.prototype = {
// webpack (using a build step causes webpack #1617). Grunt verifies that
// this value matches package.json during build.
// See: https://github.com/getsentry/raven-js/issues/465
VERSION: '3.24.1',
VERSION: '3.24.2',

debug: false,

Expand Down
4 changes: 2 additions & 2 deletions test/raven.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -1368,7 +1368,7 @@ describe('globals', function() {
extra: {'session:duration': 100}
});
assert.deepEqual(opts.auth, {
sentry_client: 'raven-js/3.24.1',
sentry_client: 'raven-js/3.24.2',
sentry_key: 'abc',
sentry_version: '7'
});
Expand Down Expand Up @@ -1415,7 +1415,7 @@ describe('globals', function() {
extra: {'session:duration': 100}
});
assert.deepEqual(opts.auth, {
sentry_client: 'raven-js/3.24.1',
sentry_client: 'raven-js/3.24.2',
sentry_key: 'abc',
sentry_secret: 'def',
sentry_version: '7'
Expand Down

0 comments on commit 26fcb59

Please sign in to comment.