Skip to content

Commit d84f21c

Browse files
authoredMar 7, 2017
3.12.1 (#880)
1 parent 3600a05 commit d84f21c

20 files changed

+66
-46
lines changed
 

‎CHANGELOG.md

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

3+
## 3.12.1
4+
* BUGFIX: Fix Raven.js not properly catching some thrown messages, objects. See: https://github.com/getsentry/raven-js/pull/872
5+
36
## 3.12.0
47
* NEW: Raven.js now attempts to suppress back-to-back duplicate errors by default. See: https://github.com/getsentry/raven-js/pull/861
58
* BUGFIX: Fix case where breadcrumb instrumention could sometimes throw errors on custom DOM events. See: https://github.com/getsentry/raven-js/pull/857

‎bower.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "raven-js",
3-
"version": "3.12.0",
3+
"version": "3.12.1",
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.11.0 (cb87941) | github.com/getsentry/raven-js */
1+
/*! Raven.js 3.12.1 (3600a05) | 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.11.0 (cb87941) | github.com/getsentry/raven-js */
1+
/*! Raven.js 3.12.1 (3600a05) | 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.11.0 (cb87941) | github.com/getsentry/raven-js */
1+
/*! Raven.js 3.12.1 (3600a05) | 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.11.0 (cb87941) | github.com/getsentry/raven-js */
1+
/*! Raven.js 3.12.1 (3600a05) | 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/plugins/vue.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/*! Raven.js 3.11.0 (cb87941) | github.com/getsentry/raven-js */
1+
/*! Raven.js 3.12.1 (3600a05) | github.com/getsentry/raven-js */
22

33
/*
44
* Includes TraceKit

‎dist/plugins/vue.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

+38-21
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/*! Raven.js 3.11.0 (cb87941) | github.com/getsentry/raven-js */
1+
/*! Raven.js 3.12.1 (3600a05) | github.com/getsentry/raven-js */
22

33
/*
44
* Includes TraceKit
@@ -95,8 +95,13 @@ module.exports = {
9595
/*global XDomainRequest:false, __DEV__:false*/
9696
'use strict';
9797

98-
var TraceKit = _dereq_(6);
98+
var TraceKit = _dereq_(7);
9999
var RavenConfigError = _dereq_(2);
100+
var utils = _dereq_(6);
101+
102+
var isError = utils.isError,
103+
isObject = utils.isObject;
104+
100105
var stringify = _dereq_(1);
101106

102107
var wrapConsoleMethod = _dereq_(3).wrapMethod;
@@ -176,7 +181,7 @@ Raven.prototype = {
176181
// webpack (using a build step causes webpack #1617). Grunt verifies that
177182
// this value matches package.json during build.
178183
// See: https://github.com/getsentry/raven-js/issues/465
179-
VERSION: '3.11.0',
184+
VERSION: '3.12.1',
180185

181186
debug: false,
182187

@@ -1749,25 +1754,12 @@ function isString(what) {
17491754
return objectPrototype.toString.call(what) === '[object String]';
17501755
}
17511756

1752-
function isObject(what) {
1753-
return typeof what === 'object' && what !== null;
1754-
}
17551757

17561758
function isEmptyObject(what) {
17571759
for (var _ in what) return false; // eslint-disable-line guard-for-in, no-unused-vars
17581760
return true;
17591761
}
17601762

1761-
// Sorta yanked from https://github.com/joyent/node/blob/aa3b4b4/lib/util.js#L560
1762-
// with some tiny modifications
1763-
function isError(what) {
1764-
var toString = objectPrototype.toString.call(what);
1765-
return isObject(what) &&
1766-
toString === '[object Error]' ||
1767-
toString === '[object Exception]' || // Firefox NS_ERROR_FAILURE Exceptions
1768-
what instanceof Error;
1769-
}
1770-
17711763
function each(obj, callback) {
17721764
var i, j;
17731765

@@ -2067,7 +2059,7 @@ Raven.prototype.setReleaseContext = Raven.prototype.setRelease;
20672059
module.exports = Raven;
20682060

20692061
}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
2070-
},{"1":1,"2":2,"3":3,"6":6}],5:[function(_dereq_,module,exports){
2062+
},{"1":1,"2":2,"3":3,"6":6,"7":7}],5:[function(_dereq_,module,exports){
20712063
(function (global){
20722064
/**
20732065
* Enforces a single instance of the Raven client, and the
@@ -2105,9 +2097,32 @@ module.exports = Raven;
21052097

21062098
}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
21072099
},{"4":4}],6:[function(_dereq_,module,exports){
2100+
'use strict';
2101+
2102+
function isObject(what) {
2103+
return typeof what === 'object' && what !== null;
2104+
}
2105+
2106+
// Sorta yanked from https://github.com/joyent/node/blob/aa3b4b4/lib/util.js#L560
2107+
// with some tiny modifications
2108+
function isError(what) {
2109+
var toString = {}.toString.call(what);
2110+
return isObject(what) &&
2111+
toString === '[object Error]' ||
2112+
toString === '[object Exception]' || // Firefox NS_ERROR_FAILURE Exceptions
2113+
what instanceof Error;
2114+
}
2115+
2116+
module.exports = {
2117+
isObject: isObject,
2118+
isError: isError
2119+
};
2120+
},{}],7:[function(_dereq_,module,exports){
21082121
(function (global){
21092122
'use strict';
21102123

2124+
var utils = _dereq_(6);
2125+
21112126
/*
21122127
TraceKit - Cross brower stack traces
21132128
@@ -2134,7 +2149,7 @@ var _slice = [].slice;
21342149
var UNKNOWN_FUNCTION = '?';
21352150

21362151
// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error#Error_types
2137-
var ERROR_TYPES_RE = /^(?:Uncaught (?:exception: )?)?((?:Eval|Internal|Range|Reference|Syntax|Type|URI)Error): ?(.*)$/;
2152+
var ERROR_TYPES_RE = /^(?:[Uu]ncaught (?:exception: )?)?(?:((?:Eval|Internal|Range|Reference|Syntax|Type|URI|)Error): )?(.*)$/;
21382153

21392154
function getLocationHref() {
21402155
if (typeof document === 'undefined' || typeof document.location === 'undefined')
@@ -2143,6 +2158,7 @@ function getLocationHref() {
21432158
return document.location.href;
21442159
}
21452160

2161+
21462162
/**
21472163
* TraceKit.report: cross-browser processing of unhandled exceptions
21482164
*
@@ -2260,7 +2276,9 @@ TraceKit.report = (function reportModuleWrapper() {
22602276
if (lastExceptionStack) {
22612277
TraceKit.computeStackTrace.augmentStackTraceWithInitialElement(lastExceptionStack, url, lineNo, message);
22622278
processLastException();
2263-
} else if (ex) {
2279+
} else if (ex && utils.isError(ex)) {
2280+
// non-string `ex` arg; attempt to extract stack trace
2281+
22642282
// New chrome and blink send along a real error object
22652283
// Let's just report that like a normal error.
22662284
// See: https://mikewest.org/2013/08/debugging-runtime-errors-with-window-onerror
@@ -2703,7 +2721,6 @@ TraceKit.computeStackTrace = (function computeStackTraceWrapper() {
27032721
throw e;
27042722
}
27052723
}
2706-
27072724
return {
27082725
'name': ex.name,
27092726
'message': ex.message,
@@ -2720,5 +2737,5 @@ TraceKit.computeStackTrace = (function computeStackTraceWrapper() {
27202737
module.exports = TraceKit;
27212738

27222739
}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
2723-
},{}]},{},[5])(5)
2740+
},{"6":6}]},{},[5])(5)
27242741
});

‎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": "Dwnqh7Kf/MtddZEib7nlf8EgV02obB2QNJwJrgmleCw=",
5-
"sha512": "rFBEzM66OQgGkmJ1HjHmAH3SyX8Li7U1DHeFHKFytJEdgFBOp+A+JTiWTzR02DSOQbx3rGOZLSBO0LaFskiXQA=="
4+
"sha256": "lo47JDw5iui9P+8BVkoYgcXash9DqsapFwWuBx47xg4=",
5+
"sha512": "4VSTdDWObyBxQUbuBYSOd2MZlXM9F1CsRsC1LTyArrGbWiqHVIEEv8vuprjLF+5t3rGI9qJf4mMeBFyircjiIw=="
66
},
77
"type": null,
8-
"integrity": "sha256-Dwnqh7Kf/MtddZEib7nlf8EgV02obB2QNJwJrgmleCw= sha512-rFBEzM66OQgGkmJ1HjHmAH3SyX8Li7U1DHeFHKFytJEdgFBOp+A+JTiWTzR02DSOQbx3rGOZLSBO0LaFskiXQA==",
8+
"integrity": "sha256-lo47JDw5iui9P+8BVkoYgcXash9DqsapFwWuBx47xg4= sha512-4VSTdDWObyBxQUbuBYSOd2MZlXM9F1CsRsC1LTyArrGbWiqHVIEEv8vuprjLF+5t3rGI9qJf4mMeBFyircjiIw==",
99
"path": "dist/raven.js"
1010
},
1111
"@dist/raven.min.js": {
1212
"hashes": {
13-
"sha256": "bNou8nfAvackB8vWBJLCEarwQsiyHAZ6doKQz+lH+G8=",
14-
"sha512": "VyEfGJStPnFTCFYIGp0EdsWnKEUGgk2xjkI5dW2EzFFKwngACxlCSNvSiOelovr1CqjOeJGKkU99988ZZoNNYw=="
13+
"sha256": "8uqNKvEWACUnXXdaGWrX2mEz3TEE2h+m5dcC8DJVyCI=",
14+
"sha512": "LobR1Ghrmpm2vODObzjVZuWLajD0wEl58MWvfBzfeSQA4K0VrZSNBpwlEOpKhNPD/qwdSPAoKdXWilbAzryNNA=="
1515
},
1616
"type": null,
17-
"integrity": "sha256-bNou8nfAvackB8vWBJLCEarwQsiyHAZ6doKQz+lH+G8= sha512-VyEfGJStPnFTCFYIGp0EdsWnKEUGgk2xjkI5dW2EzFFKwngACxlCSNvSiOelovr1CqjOeJGKkU99988ZZoNNYw==",
17+
"integrity": "sha256-8uqNKvEWACUnXXdaGWrX2mEz3TEE2h+m5dcC8DJVyCI= sha512-LobR1Ghrmpm2vODObzjVZuWLajD0wEl58MWvfBzfeSQA4K0VrZSNBpwlEOpKhNPD/qwdSPAoKdXWilbAzryNNA==",
1818
"path": "dist/raven.min.js"
1919
}
2020
}

‎docs/sentry-doc-config.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,6 @@
6666
}
6767
},
6868
"vars": {
69-
"RAVEN_VERSION": "3.12.0"
69+
"RAVEN_VERSION": "3.12.1"
7070
}
7171
}

‎package.json

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

‎src/raven.js

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

9292
debug: false,
9393

‎test/raven.test.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -1010,7 +1010,7 @@ describe('globals', function() {
10101010
extra: {'session:duration': 100},
10111011
});
10121012
assert.deepEqual(opts.auth, {
1013-
sentry_client: 'raven-js/3.12.0',
1013+
sentry_client: 'raven-js/3.12.1',
10141014
sentry_key: 'abc',
10151015
sentry_version: '7'
10161016
});
@@ -1057,7 +1057,7 @@ describe('globals', function() {
10571057
extra: {'session:duration': 100},
10581058
});
10591059
assert.deepEqual(opts.auth, {
1060-
sentry_client: 'raven-js/3.12.0',
1060+
sentry_client: 'raven-js/3.12.1',
10611061
sentry_key: 'abc',
10621062
sentry_secret: 'def',
10631063
sentry_version: '7'

0 commit comments

Comments
 (0)
Please sign in to comment.