Skip to content

Commit aeac6ce

Browse files
authored
3.2.0 (#641)
1 parent d052e7e commit aeac6ce

24 files changed

+53
-47
lines changed

CHANGELOG.md

+5
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
# Changelog
22

3+
## 3.2.0
4+
* CHANGE: Callbacks set via `setDataCallback`, `setShouldSendCallback` now receive any prior-set callback as the 2nd argument. See: https://github.com/getsentry/raven-js/pull/636
5+
* CHANGE: Raven.js no longer passes a 'message' interface for exceptions. See: https://github.com/getsentry/raven-js/pull/632
6+
* CHANGE: Log level now recorded for "sentry" breadcrumbs. See: https://github.com/getsentry/raven-js/pull/633
7+
38
## 3.1.1
49
* BUGFIX: Fix message truncation occurring before dataCallback is invoked. See: https://github.com/getsentry/raven-js/issues/605
510
* BUGFIX: Fix pushState error in Chrome Apps. See: https://github.com/getsentry/raven-js/issues/601

bower.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "raven-js",
3-
"version": "3.1.1",
3+
"version": "3.2.0",
44
"dependencies": {},
55
"main": "dist/raven.js",
66
"ignore": [

dist/plugins/angular.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/*! Raven.js 3.1.1 (34f456e) | github.com/getsentry/raven-js */
1+
/*! Raven.js 3.2.0 (d052e7e) | github.com/getsentry/raven-js */
22

33
/*
44
* Includes TraceKit

dist/plugins/angular.min.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/plugins/console.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/*! Raven.js 3.1.1 (34f456e) | github.com/getsentry/raven-js */
1+
/*! Raven.js 3.2.0 (d052e7e) | github.com/getsentry/raven-js */
22

33
/*
44
* Includes TraceKit

dist/plugins/console.min.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/plugins/ember.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/*! Raven.js 3.1.1 (34f456e) | github.com/getsentry/raven-js */
1+
/*! Raven.js 3.2.0 (d052e7e) | github.com/getsentry/raven-js */
22

33
/*
44
* Includes TraceKit

dist/plugins/ember.min.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/plugins/require.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/*! Raven.js 3.1.1 (34f456e) | github.com/getsentry/raven-js */
1+
/*! Raven.js 3.2.0 (d052e7e) | github.com/getsentry/raven-js */
22

33
/*
44
* Includes TraceKit

dist/plugins/require.min.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/raven.js

+18-17
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/*! Raven.js 3.1.1 (34f456e) | github.com/getsentry/raven-js */
1+
/*! Raven.js 3.2.0 (d052e7e) | github.com/getsentry/raven-js */
22

33
/*
44
* Includes TraceKit
@@ -150,7 +150,7 @@ Raven.prototype = {
150150
// webpack (using a build step causes webpack #1617). Grunt verifies that
151151
// this value matches package.json during build.
152152
// See: https://github.com/getsentry/raven-js/issues/465
153-
VERSION: '3.1.1',
153+
VERSION: '3.2.0',
154154

155155
debug: false,
156156

@@ -515,7 +515,10 @@ Raven.prototype = {
515515
* @return {Raven}
516516
*/
517517
setDataCallback: function(callback) {
518-
this._globalOptions.dataCallback = callback;
518+
var original = this._globalOptions.dataCallback;
519+
this._globalOptions.dataCallback = isFunction(callback)
520+
? function (data) { return callback(data, original); }
521+
: callback;
519522

520523
return this;
521524
},
@@ -528,7 +531,10 @@ Raven.prototype = {
528531
* @return {Raven}
529532
*/
530533
setShouldSendCallback: function(callback) {
531-
this._globalOptions.shouldSendCallback = callback;
534+
var original = this._globalOptions.shouldSendCallback;
535+
this._globalOptions.shouldSendCallback = isFunction(callback)
536+
? function (data) { return callback(data, original); }
537+
: callback;
532538

533539
return this;
534540
},
@@ -1126,12 +1132,11 @@ Raven.prototype = {
11261132
},
11271133

11281134
_processException: function(type, message, fileurl, lineno, frames, options) {
1129-
var stacktrace, fullMessage;
1135+
var stacktrace;
11301136

11311137
if (!!this._globalOptions.ignoreErrors.test && this._globalOptions.ignoreErrors.test(message)) return;
11321138

11331139
message += '';
1134-
fullMessage = (type ? type + ': ' : '') + message;
11351140

11361141
if (frames && frames.length) {
11371142
fileurl = frames[0].filename || fileurl;
@@ -1161,8 +1166,7 @@ Raven.prototype = {
11611166
stacktrace: stacktrace
11621167
}]
11631168
},
1164-
culprit: fileurl,
1165-
message: fullMessage
1169+
culprit: fileurl
11661170
}, options);
11671171

11681172
// Fire away!
@@ -1284,10 +1288,14 @@ Raven.prototype = {
12841288
auth.sentry_secret = this._globalSecret;
12851289
}
12861290

1291+
var exception = data.exception && data.exception.values[0];
12871292
this.captureBreadcrumb({
12881293
category: 'sentry',
1289-
message: data.message,
1290-
event_id: data.event_id
1294+
message: exception
1295+
? (exception.type ? exception.type + ': ' : '') + exception.message
1296+
: data.message,
1297+
event_id: data.event_id,
1298+
level: data.level || 'error' // presume error unless specified
12911299
});
12921300

12931301
var url = this._globalEndpoint;
@@ -1355,13 +1363,6 @@ Raven.prototype = {
13551363
request.send(JSON.stringify(opts.data));
13561364
},
13571365

1358-
// Note: this is shitty, but I can't figure out how to get
1359-
// sinon to stub document.createElement without breaking everything
1360-
// so this wrapper is just so I can stub it for tests.
1361-
_newImage: function() {
1362-
return document.createElement('img');
1363-
},
1364-
13651366
_logDebug: function(level) {
13661367
if (this._originalConsoleMethods[level] && this.debug) {
13671368
// In IE<10 console methods do not have their own 'apply' method

dist/raven.min.js

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/raven.min.js.map

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/sri.json

+6-6
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,20 @@
11
{
22
"@dist/raven.js": {
33
"hashes": {
4-
"sha256": "YfJL5HnkAUb6LaT41WdeubM9tHcj1KLNZzv091O0kAA=",
5-
"sha512": "rc2JMbKhV8x5vp/NPhCGMsrepxYezWg/Xyvb0saXLKNy8vC5unYVfMXxe6KS9WVhCPOIt12OoZDKDmohxpT60Q=="
4+
"sha256": "l424R9SHtp9TbZqeaYBEAqbTK4GypSj13iR6w3Er1nE=",
5+
"sha512": "jPVWiZXfhkVsdmExC8WQjD+sBgeipsaxylooysTGsMCtegPXqOqnh/8kstLhyh8suvIHX5FM1LRHZdgANvtfYQ=="
66
},
77
"type": null,
8-
"integrity": "sha256-YfJL5HnkAUb6LaT41WdeubM9tHcj1KLNZzv091O0kAA= sha512-rc2JMbKhV8x5vp/NPhCGMsrepxYezWg/Xyvb0saXLKNy8vC5unYVfMXxe6KS9WVhCPOIt12OoZDKDmohxpT60Q==",
8+
"integrity": "sha256-l424R9SHtp9TbZqeaYBEAqbTK4GypSj13iR6w3Er1nE= sha512-jPVWiZXfhkVsdmExC8WQjD+sBgeipsaxylooysTGsMCtegPXqOqnh/8kstLhyh8suvIHX5FM1LRHZdgANvtfYQ==",
99
"path": "dist/raven.js"
1010
},
1111
"@dist/raven.min.js": {
1212
"hashes": {
13-
"sha256": "kgc2mY6SdVCVixqDm9Jx5zGX+JAIYPWpXY6QJAzLmhE=",
14-
"sha512": "0Idcd2pOWVAvkBPiODuHMMq8YxGsrAc2SsFvQEdpQ2QGrPf/9OE2dUlspBBGC5UvD4Y/rbpY74SCVIfQzBBv8g=="
13+
"sha256": "wFrEe9hRl6lKZoUmCxgr0R1BbDylMR+wd40N7o5uEJM=",
14+
"sha512": "TxMxb9gCA8dX5xDcgClofPznLatqqf/9KdZ7P+0TZUetJSl/4GdvPZ5zI0AndeQOqf5IXCOUpNGznb/AAyNcJA=="
1515
},
1616
"type": null,
17-
"integrity": "sha256-kgc2mY6SdVCVixqDm9Jx5zGX+JAIYPWpXY6QJAzLmhE= sha512-0Idcd2pOWVAvkBPiODuHMMq8YxGsrAc2SsFvQEdpQ2QGrPf/9OE2dUlspBBGC5UvD4Y/rbpY74SCVIfQzBBv8g==",
17+
"integrity": "sha256-wFrEe9hRl6lKZoUmCxgr0R1BbDylMR+wd40N7o5uEJM= sha512-TxMxb9gCA8dX5xDcgClofPznLatqqf/9KdZ7P+0TZUetJSl/4GdvPZ5zI0AndeQOqf5IXCOUpNGznb/AAyNcJA==",
1818
"path": "dist/raven.min.js"
1919
}
2020
}

docs/config.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,7 @@ Putting it all together
237237
<body>
238238
...
239239
<script src="jquery.min.js"></script>
240-
<script src="https://cdn.ravenjs.com/3.1.1/raven.min.js"></script>
240+
<script src="https://cdn.ravenjs.com/3.2.0/raven.min.js"></script>
241241
<script>
242242
Raven.config('___PUBLIC_DSN___', {
243243
logger: 'my-logger',

docs/index.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ scripts. For all details see :doc:`install`.
2626

2727
.. sourcecode:: html
2828

29-
<script src="https://cdn.ravenjs.com/3.1.1/raven.min.js"></script>
29+
<script src="https://cdn.ravenjs.com/3.2.0/raven.min.js"></script>
3030

3131

3232
Configuring the Client

docs/install.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ So for example:
99
.. sourcecode:: html
1010

1111
<script src="jquery.js"></script>
12-
<script src="https://cdn.ravenjs.com/3.1.1/raven.min.js"></script>
12+
<script src="https://cdn.ravenjs.com/3.2.0/raven.min.js"></script>
1313
<script>Raven.config('___PUBLIC_DSN___').install();</script>
1414
<script src="app.js"></script>
1515

@@ -28,7 +28,7 @@ Our CDN distributes builds with and without :doc:`integrations <integrations/ind
2828

2929
.. sourcecode:: html
3030

31-
<script src="https://cdn.ravenjs.com/3.1.1/raven.min.js"></script>
31+
<script src="https://cdn.ravenjs.com/3.2.0/raven.min.js"></script>
3232

3333
This version does not include any plugins. See `ravenjs.com
3434
<http://ravenjs.com/>`_ for more information about plugins and getting

docs/integrations/angular.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ Example:
2424
.. sourcecode:: html
2525

2626
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.4.5/angular.min.js"></script>
27-
<script src="https://cdn.ravenjs.com/3.1.1/angular/raven.min.js"></script>
27+
<script src="https://cdn.ravenjs.com/3.2.0/angular/raven.min.js"></script>
2828
<script>Raven.config('___PUBLIC_DSN___').install();</script>
2929

3030
Note that this CDN build auto-initializes the Angular plugin.

docs/integrations/backbone.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ after you load all other external libraries (like jQuery), but before your code.
99

1010
.. sourcecode:: html
1111

12-
<script src="https://cdn.ravenjs.com/3.1.1/raven.min.js"></script>
12+
<script src="https://cdn.ravenjs.com/3.2.0/raven.min.js"></script>
1313

1414
Configuring the Client
1515
----------------------

docs/integrations/ember.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ Example:
2323
.. sourcecode:: html
2424

2525
<script src="http://builds.emberjs.com/tags/v2.3.1/ember.prod.js"></script>
26-
<script src="https://cdn.ravenjs.com/3.1.1/ember/raven.min.js"></script>
26+
<script src="https://cdn.ravenjs.com/3.2.0/ember/raven.min.js"></script>
2727
<script>Raven.config('___PUBLIC_DSN___').install();</script>
2828

2929
Note that this CDN build auto-initializes the Ember plugin.

docs/integrations/react.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ after you load all other external libraries (like jQuery), but before your code.
99

1010
.. sourcecode:: html
1111

12-
<script src="https://cdn.ravenjs.com/3.1.1/raven.min.js"></script>
12+
<script src="https://cdn.ravenjs.com/3.2.0/raven.min.js"></script>
1313

1414
Configuring the Client
1515
----------------------

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "raven-js",
3-
"version": "3.1.1",
3+
"version": "3.2.0",
44
"license": "BSD-2-Clause",
55
"homepage": "https://getsentry.com",
66
"scripts": {

src/raven.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ Raven.prototype = {
8686
// webpack (using a build step causes webpack #1617). Grunt verifies that
8787
// this value matches package.json during build.
8888
// See: https://github.com/getsentry/raven-js/issues/465
89-
VERSION: '3.1.1',
89+
VERSION: '3.2.0',
9090

9191
debug: false,
9292

test/raven.test.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -959,7 +959,7 @@ describe('globals', function() {
959959
extra: {'session:duration': 100},
960960
});
961961
assert.deepEqual(opts.auth, {
962-
sentry_client: 'raven-js/3.1.1',
962+
sentry_client: 'raven-js/3.2.0',
963963
sentry_key: 'abc',
964964
sentry_version: '7'
965965
});
@@ -1006,7 +1006,7 @@ describe('globals', function() {
10061006
extra: {'session:duration': 100},
10071007
});
10081008
assert.deepEqual(opts.auth, {
1009-
sentry_client: 'raven-js/3.1.1',
1009+
sentry_client: 'raven-js/3.2.0',
10101010
sentry_key: 'abc',
10111011
sentry_secret: 'def',
10121012
sentry_version: '7'

0 commit comments

Comments
 (0)