Skip to content

Commit 8c7db8f

Browse files
authored
3.4.0 (#677)
1 parent 4dba6fe commit 8c7db8f

25 files changed

+74
-54
lines changed

CHANGELOG.md

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

3+
## 3.4.0
4+
* CHANGE: React Native plugin now stores errors in AsyncStorage and sends error data on app init. See: https://github.com/getsentry/raven-js/pull/626
5+
* BUGFIX: React Native path normalization regex has been updated. See: https://github.com/getsentry/raven-js/pull/666
6+
* BUGFIX: Angular 1 plugin now extracts errors from minified exception strings. See: https://github.com/getsentry/raven-js/pull/667
7+
38
## 3.3.0
49
* NEW: Can now specify `environment` configuration option. See: https://github.com/getsentry/raven-js/pull/661
510
* CHANGE: Raven.js now serializes data payload w/ json-stringify-safe to avoid circular references. See: https://github.com/getsentry/raven-js/pull/652

bower.json

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

dist/plugins/angular.js

+24-17
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/*! Raven.js 3.3.0 (74c6c03) | github.com/getsentry/raven-js */
1+
/*! Raven.js 3.4.0 (4dba6fe) | github.com/getsentry/raven-js */
22

33
/*
44
* Includes TraceKit
@@ -19,7 +19,8 @@
1919
'use strict';
2020

2121
// See https://github.com/angular/angular.js/blob/v1.4.7/src/minErr.js
22-
var angularPattern = /^\[((?:[$a-zA-Z0-9]+:)?(?:[$a-zA-Z0-9]+))\] (.+?)\n(\S+)$/;
22+
var angularPattern = /^\[((?:[$a-zA-Z0-9]+:)?(?:[$a-zA-Z0-9]+))\] (.*?)\n?(\S+)$/;
23+
2324

2425
function angularPlugin(Raven, angular) {
2526
angular = angular || window.angular;
@@ -51,25 +52,31 @@ function angularPlugin(Raven, angular) {
5152
.config(['$provide', ExceptionHandlerProvider]);
5253

5354
Raven.setDataCallback(function(data, original) {
54-
// We only care about mutating an exception
55-
var exception = data.exception;
56-
if (exception) {
57-
exception = exception.values[0];
58-
var matches = angularPattern.exec(exception.value);
59-
60-
if (matches) {
61-
// This type now becomes something like: $rootScope:inprog
62-
exception.type = matches[1];
63-
exception.value = matches[2];
64-
data.message = exception.type + ': ' + exception.value;
65-
// auto set a new tag specifically for the angular error url
66-
data.extra.angularDocs = matches[3].substr(0, 250);
67-
}
68-
}
55+
angularPlugin._normalizeData(data);
56+
6957
original && original(data);
7058
});
7159
}
7260

61+
angularPlugin._normalizeData = function (data) {
62+
// We only care about mutating an exception
63+
var exception = data.exception;
64+
if (exception) {
65+
exception = exception.values[0];
66+
var matches = angularPattern.exec(exception.value);
67+
68+
if (matches) {
69+
// This type now becomes something like: $rootScope:inprog
70+
exception.type = matches[1];
71+
exception.value = matches[2];
72+
73+
data.message = exception.type + ': ' + exception.value;
74+
// auto set a new tag specifically for the angular error url
75+
data.extra.angularDocs = matches[3].substr(0, 250);
76+
}
77+
}
78+
};
79+
7380
module.exports = angularPlugin;
7481

7582
},{}]},{},[1])(1)

dist/plugins/angular.min.js

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

dist/plugins/angular.min.js.map

+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.3.0 (74c6c03) | github.com/getsentry/raven-js */
1+
/*! Raven.js 3.4.0 (4dba6fe) | 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.3.0 (74c6c03) | github.com/getsentry/raven-js */
1+
/*! Raven.js 3.4.0 (4dba6fe) | 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.3.0 (74c6c03) | github.com/getsentry/raven-js */
1+
/*! Raven.js 3.4.0 (4dba6fe) | 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

+14-6
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/*! Raven.js 3.3.0 (74c6c03) | github.com/getsentry/raven-js */
1+
/*! Raven.js 3.4.0 (4dba6fe) | github.com/getsentry/raven-js */
22

33
/*
44
* Includes TraceKit
@@ -180,7 +180,7 @@ Raven.prototype = {
180180
// webpack (using a build step causes webpack #1617). Grunt verifies that
181181
// this value matches package.json during build.
182182
// See: https://github.com/getsentry/raven-js/issues/465
183-
VERSION: '3.3.0',
183+
VERSION: '3.4.0',
184184

185185
debug: false,
186186

@@ -1253,8 +1253,6 @@ Raven.prototype = {
12531253

12541254

12551255
_send: function(data) {
1256-
var self = this;
1257-
12581256
var globalOptions = this._globalOptions;
12591257

12601258
var baseData = {
@@ -1315,6 +1313,13 @@ Raven.prototype = {
13151313
return;
13161314
}
13171315

1316+
this._sendProcessedPayload(data);
1317+
},
1318+
1319+
_sendProcessedPayload: function(data, callback) {
1320+
var self = this;
1321+
var globalOptions = this._globalOptions;
1322+
13181323
// Send along an event_id if not explicitly passed.
13191324
// This event_id can be used to reference the error within Sentry itself.
13201325
// Set lastEventId after we know the error should actually be sent
@@ -1357,12 +1362,15 @@ Raven.prototype = {
13571362
data: data,
13581363
src: url
13591364
});
1365+
callback && callback();
13601366
},
1361-
onError: function failure() {
1367+
onError: function failure(error) {
13621368
self._triggerEvent('failure', {
13631369
data: data,
13641370
src: url
13651371
});
1372+
error = error || new Error('Raven send failed (no additional details provided)');
1373+
callback && callback(error);
13661374
}
13671375
});
13681376
},
@@ -1384,7 +1392,7 @@ Raven.prototype = {
13841392
opts.onSuccess();
13851393
}
13861394
} else if (opts.onError) {
1387-
opts.onError();
1395+
opts.onError(new Error('Sentry error code: ' + request.status));
13881396
}
13891397
}
13901398

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": "65Zh4g59PU/X0HvnUXUewj45H6YRX6cfF/Zu9lCWLtw=",
5-
"sha512": "LtwVrDsuhD9jH/i4Xwk/L5Z9LymEqRZqEaMSUwqePd592xKU7EfqveEwbH1BTox/hMfKH9rTX5TFiWfUVNgu5g=="
4+
"sha256": "bTEPripl705InCCs3lTOFnM/vPJj0Qh4pYfAE8ZZ3pg=",
5+
"sha512": "6lb2h4LW8tLdntlWW03/2NdKkBrlpQCJTizla34QzD7XyrcSy0gdp565VvjOpWMIQIxi7PaD6kL7+Ob9yr43Hw=="
66
},
77
"type": null,
8-
"integrity": "sha256-65Zh4g59PU/X0HvnUXUewj45H6YRX6cfF/Zu9lCWLtw= sha512-LtwVrDsuhD9jH/i4Xwk/L5Z9LymEqRZqEaMSUwqePd592xKU7EfqveEwbH1BTox/hMfKH9rTX5TFiWfUVNgu5g==",
8+
"integrity": "sha256-bTEPripl705InCCs3lTOFnM/vPJj0Qh4pYfAE8ZZ3pg= sha512-6lb2h4LW8tLdntlWW03/2NdKkBrlpQCJTizla34QzD7XyrcSy0gdp565VvjOpWMIQIxi7PaD6kL7+Ob9yr43Hw==",
99
"path": "dist/raven.js"
1010
},
1111
"@dist/raven.min.js": {
1212
"hashes": {
13-
"sha256": "t6dbTUe18VdvAAAA1jpqWEpn/ckStKILH1xmZycBr6s=",
14-
"sha512": "ZzvI6tyrNUfMct6N5TM1hwDkc9A6l0OqeQ5kJrW6bb8H/RuKpuUvZJ5M6KZNFrNb6qkMGaVKHnCHoFE7jHB0fg=="
13+
"sha256": "8gpwv4k7ehC3fCGeaTGjCjiP8v1ttVfzDxanZtKZVOY=",
14+
"sha512": "hkWLjB58gDHaCyYwq6sV6AU9HjG1+1Xybyf4u/SHyjzTuQWfRu85t9zdSTvbDtNaKCS39Rb0SZNEpwNH2ebZYg=="
1515
},
1616
"type": null,
17-
"integrity": "sha256-t6dbTUe18VdvAAAA1jpqWEpn/ckStKILH1xmZycBr6s= sha512-ZzvI6tyrNUfMct6N5TM1hwDkc9A6l0OqeQ5kJrW6bb8H/RuKpuUvZJ5M6KZNFrNb6qkMGaVKHnCHoFE7jHB0fg==",
17+
"integrity": "sha256-8gpwv4k7ehC3fCGeaTGjCjiP8v1ttVfzDxanZtKZVOY= sha512-hkWLjB58gDHaCyYwq6sV6AU9HjG1+1Xybyf4u/SHyjzTuQWfRu85t9zdSTvbDtNaKCS39Rb0SZNEpwNH2ebZYg==",
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.3.0/raven.min.js"></script>
240+
<script src="https://cdn.ravenjs.com/3.4.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.3.0/raven.min.js"></script>
29+
<script src="https://cdn.ravenjs.com/3.4.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.3.0/raven.min.js"></script>
12+
<script src="https://cdn.ravenjs.com/3.4.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.3.0/raven.min.js"></script>
31+
<script src="https://cdn.ravenjs.com/3.4.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

0 commit comments

Comments
 (0)