Skip to content

Commit e677410

Browse files
committed
3.12.2
1 parent d911cb7 commit e677410

20 files changed

+108
-83
lines changed

CHANGELOG.md

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

3+
## 3.12.2
4+
* BUGFIX: Fix Raven.js not capturing IE8 errors. See: https://github.com/getsentry/raven-js/pull/883
5+
36
## 3.12.1
47
* BUGFIX: Fix Raven.js not properly catching some thrown messages, objects. See: https://github.com/getsentry/raven-js/pull/872
58

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.1",
3+
"version": "3.12.2",
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.12.1 (3600a05) | github.com/getsentry/raven-js */
1+
/*! Raven.js 3.12.2 (d911cb7) | 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.12.1 (3600a05) | github.com/getsentry/raven-js */
1+
/*! Raven.js 3.12.2 (d911cb7) | 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.12.1 (3600a05) | github.com/getsentry/raven-js */
1+
/*! Raven.js 3.12.2 (d911cb7) | 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.12.1 (3600a05) | github.com/getsentry/raven-js */
1+
/*! Raven.js 3.12.2 (d911cb7) | 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.12.1 (3600a05) | github.com/getsentry/raven-js */
1+
/*! Raven.js 3.12.2 (d911cb7) | 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

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

33
/*
44
* Includes TraceKit
@@ -11,35 +11,6 @@
1111
*/
1212

1313
(function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.Raven = f()}})(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(_dereq_,module,exports){
14-
exports = module.exports = stringify
15-
exports.getSerialize = serializer
16-
17-
function stringify(obj, replacer, spaces, cycleReplacer) {
18-
return JSON.stringify(obj, serializer(replacer, cycleReplacer), spaces)
19-
}
20-
21-
function serializer(replacer, cycleReplacer) {
22-
var stack = [], keys = []
23-
24-
if (cycleReplacer == null) cycleReplacer = function(key, value) {
25-
if (stack[0] === value) return "[Circular ~]"
26-
return "[Circular ~." + keys.slice(0, stack.indexOf(value)).join(".") + "]"
27-
}
28-
29-
return function(key, value) {
30-
if (stack.length > 0) {
31-
var thisPos = stack.indexOf(this)
32-
~thisPos ? stack.splice(thisPos + 1) : stack.push(this)
33-
~thisPos ? keys.splice(thisPos, Infinity, key) : keys.push(key)
34-
if (~stack.indexOf(value)) value = cycleReplacer.call(this, key, value)
35-
}
36-
else stack.push(value)
37-
38-
return replacer == null ? value : replacer.call(this, key, value)
39-
}
40-
}
41-
42-
},{}],2:[function(_dereq_,module,exports){
4314
'use strict';
4415

4516
function RavenConfigError(message) {
@@ -51,7 +22,7 @@ RavenConfigError.prototype.constructor = RavenConfigError;
5122

5223
module.exports = RavenConfigError;
5324

54-
},{}],3:[function(_dereq_,module,exports){
25+
},{}],2:[function(_dereq_,module,exports){
5526
'use strict';
5627

5728
var wrapMethod = function(console, level, callback) {
@@ -90,21 +61,20 @@ module.exports = {
9061
wrapMethod: wrapMethod
9162
};
9263

93-
},{}],4:[function(_dereq_,module,exports){
64+
},{}],3:[function(_dereq_,module,exports){
9465
(function (global){
9566
/*global XDomainRequest:false, __DEV__:false*/
9667
'use strict';
9768

98-
var TraceKit = _dereq_(7);
99-
var RavenConfigError = _dereq_(2);
100-
var utils = _dereq_(6);
69+
var TraceKit = _dereq_(6);
70+
var stringify = _dereq_(7);
71+
var RavenConfigError = _dereq_(1);
72+
var utils = _dereq_(5);
10173

10274
var isError = utils.isError,
10375
isObject = utils.isObject;
10476

105-
var stringify = _dereq_(1);
106-
107-
var wrapConsoleMethod = _dereq_(3).wrapMethod;
77+
var wrapConsoleMethod = _dereq_(2).wrapMethod;
10878

10979
var dsnKeys = 'source protocol user pass host port path'.split(' '),
11080
dsnPattern = /^(?:(\w+):)?\/\/(?:(\w+)(:\w+)?@)?([\w\.-]+)(?::(\d+))?(\/.*)/;
@@ -181,7 +151,7 @@ Raven.prototype = {
181151
// webpack (using a build step causes webpack #1617). Grunt verifies that
182152
// this value matches package.json during build.
183153
// See: https://github.com/getsentry/raven-js/issues/465
184-
VERSION: '3.12.1',
154+
VERSION: '3.12.2',
185155

186156
debug: false,
187157

@@ -1679,24 +1649,18 @@ Raven.prototype = {
16791649
if (!hasCORS) return;
16801650

16811651
var url = opts.url;
1682-
function handler() {
1683-
if (request.status === 200) {
1684-
if (opts.onSuccess) {
1685-
opts.onSuccess();
1686-
}
1687-
} else if (opts.onError) {
1688-
var err = new Error('Sentry error code: ' + request.status);
1689-
err.request = request;
1690-
opts.onError(err);
1691-
}
1692-
}
16931652

16941653
if ('withCredentials' in request) {
16951654
request.onreadystatechange = function () {
16961655
if (request.readyState !== 4) {
16971656
return;
1657+
} else if (request.status === 200) {
1658+
opts.onSuccess && opts.onSuccess();
1659+
} else if (opts.onError) {
1660+
var err = new Error('Sentry error code: ' + request.status);
1661+
err.request = request;
1662+
opts.onError(err);
16981663
}
1699-
handler();
17001664
};
17011665
} else {
17021666
request = new XDomainRequest();
@@ -1705,7 +1669,16 @@ Raven.prototype = {
17051669
url = url.replace(/^https?:/, '');
17061670

17071671
// onreadystatechange not supported by XDomainRequest
1708-
request.onload = handler;
1672+
if (opts.onSuccess) {
1673+
request.onload = opts.onSuccess;
1674+
}
1675+
if (opts.onError) {
1676+
request.onerror = function () {
1677+
var err = new Error('Sentry error code: XDomainRequest');
1678+
err.request = request;
1679+
opts.onError(err);
1680+
}
1681+
}
17091682
}
17101683

17111684
// NOTE: auth is intentionally sent as part of query string (NOT as custom
@@ -2059,7 +2032,7 @@ Raven.prototype.setReleaseContext = Raven.prototype.setRelease;
20592032
module.exports = Raven;
20602033

20612034
}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
2062-
},{"1":1,"2":2,"3":3,"6":6,"7":7}],5:[function(_dereq_,module,exports){
2035+
},{"1":1,"2":2,"5":5,"6":6,"7":7}],4:[function(_dereq_,module,exports){
20632036
(function (global){
20642037
/**
20652038
* Enforces a single instance of the Raven client, and the
@@ -2069,7 +2042,7 @@ module.exports = Raven;
20692042

20702043
'use strict';
20712044

2072-
var RavenConstructor = _dereq_(4);
2045+
var RavenConstructor = _dereq_(3);
20732046

20742047
// This is to be defensive in environments where window does not exist (see https://github.com/getsentry/raven-js/pull/785)
20752048
var _window = typeof window !== 'undefined' ? window
@@ -2096,7 +2069,7 @@ Raven.afterLoad();
20962069
module.exports = Raven;
20972070

20982071
}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
2099-
},{"4":4}],6:[function(_dereq_,module,exports){
2072+
},{"3":3}],5:[function(_dereq_,module,exports){
21002073
'use strict';
21012074

21022075
function isObject(what) {
@@ -2117,11 +2090,11 @@ module.exports = {
21172090
isObject: isObject,
21182091
isError: isError
21192092
};
2120-
},{}],7:[function(_dereq_,module,exports){
2093+
},{}],6:[function(_dereq_,module,exports){
21212094
(function (global){
21222095
'use strict';
21232096

2124-
var utils = _dereq_(6);
2097+
var utils = _dereq_(5);
21252098

21262099
/*
21272100
TraceKit - Cross brower stack traces
@@ -2737,5 +2710,54 @@ TraceKit.computeStackTrace = (function computeStackTraceWrapper() {
27372710
module.exports = TraceKit;
27382711

27392712
}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
2740-
},{"6":6}]},{},[5])(5)
2713+
},{"5":5}],7:[function(_dereq_,module,exports){
2714+
'use strict';
2715+
2716+
/*
2717+
json-stringify-safe
2718+
Like JSON.stringify, but doesn't throw on circular references.
2719+
2720+
Originally forked from https://github.com/isaacs/json-stringify-safe
2721+
version 5.0.1 on 3/8/2017 and modified for IE8 compatibility.
2722+
Tests for this are in test/vendor.
2723+
2724+
ISC license: https://github.com/isaacs/json-stringify-safe/blob/master/LICENSE
2725+
*/
2726+
2727+
exports = module.exports = stringify
2728+
exports.getSerialize = serializer
2729+
2730+
function indexOf(haystack, needle) {
2731+
for (var i = 0; i < haystack.length; ++i) {
2732+
if (haystack[i] === needle) return i;
2733+
}
2734+
return -1;
2735+
}
2736+
2737+
function stringify(obj, replacer, spaces, cycleReplacer) {
2738+
return JSON.stringify(obj, serializer(replacer, cycleReplacer), spaces)
2739+
}
2740+
2741+
function serializer(replacer, cycleReplacer) {
2742+
var stack = [], keys = []
2743+
2744+
if (cycleReplacer == null) cycleReplacer = function(key, value) {
2745+
if (stack[0] === value) return '[Circular ~]'
2746+
return '[Circular ~.' + keys.slice(0, indexOf(stack, value)).join('.') + ']'
2747+
}
2748+
2749+
return function(key, value) {
2750+
if (stack.length > 0) {
2751+
var thisPos = indexOf(stack, this);
2752+
~thisPos ? stack.splice(thisPos + 1) : stack.push(this)
2753+
~thisPos ? keys.splice(thisPos, Infinity, key) : keys.push(key)
2754+
if (~indexOf(stack, value)) value = cycleReplacer.call(this, key, value)
2755+
}
2756+
else stack.push(value)
2757+
2758+
return replacer == null ? value : replacer.call(this, key, value)
2759+
}
2760+
}
2761+
2762+
},{}]},{},[4])(4)
27412763
});

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": "lo47JDw5iui9P+8BVkoYgcXash9DqsapFwWuBx47xg4=",
5-
"sha512": "4VSTdDWObyBxQUbuBYSOd2MZlXM9F1CsRsC1LTyArrGbWiqHVIEEv8vuprjLF+5t3rGI9qJf4mMeBFyircjiIw=="
4+
"sha256": "0jz3OL8CfgEWZEXV15V03fJnv6QsV5Oh8U98Ab3ZB6s=",
5+
"sha512": "rD0+yqgIv0MsBrZNAilL7uzutAObf20GpYeGdsm6yJ1e6UyfZmwBuBA9SWXfta228prhZ1kbPqqjFDtIMglH7Q=="
66
},
77
"type": null,
8-
"integrity": "sha256-lo47JDw5iui9P+8BVkoYgcXash9DqsapFwWuBx47xg4= sha512-4VSTdDWObyBxQUbuBYSOd2MZlXM9F1CsRsC1LTyArrGbWiqHVIEEv8vuprjLF+5t3rGI9qJf4mMeBFyircjiIw==",
8+
"integrity": "sha256-0jz3OL8CfgEWZEXV15V03fJnv6QsV5Oh8U98Ab3ZB6s= sha512-rD0+yqgIv0MsBrZNAilL7uzutAObf20GpYeGdsm6yJ1e6UyfZmwBuBA9SWXfta228prhZ1kbPqqjFDtIMglH7Q==",
99
"path": "dist/raven.js"
1010
},
1111
"@dist/raven.min.js": {
1212
"hashes": {
13-
"sha256": "8uqNKvEWACUnXXdaGWrX2mEz3TEE2h+m5dcC8DJVyCI=",
14-
"sha512": "LobR1Ghrmpm2vODObzjVZuWLajD0wEl58MWvfBzfeSQA4K0VrZSNBpwlEOpKhNPD/qwdSPAoKdXWilbAzryNNA=="
13+
"sha256": "6bH9yJOSxvm/1apXVXlIm9ps7+zKz6R4VoUADoCiEiI=",
14+
"sha512": "4iLoJOdPpE4eHuC1+8xhUvYbJs7R38qNKBaLR39dg/I1kQN3XepMXw1vjwMBTMnkqKPY3UcMRgIw5t9IHcYo9g=="
1515
},
1616
"type": null,
17-
"integrity": "sha256-8uqNKvEWACUnXXdaGWrX2mEz3TEE2h+m5dcC8DJVyCI= sha512-LobR1Ghrmpm2vODObzjVZuWLajD0wEl58MWvfBzfeSQA4K0VrZSNBpwlEOpKhNPD/qwdSPAoKdXWilbAzryNNA==",
17+
"integrity": "sha256-6bH9yJOSxvm/1apXVXlIm9ps7+zKz6R4VoUADoCiEiI= sha512-4iLoJOdPpE4eHuC1+8xhUvYbJs7R38qNKBaLR39dg/I1kQN3XepMXw1vjwMBTMnkqKPY3UcMRgIw5t9IHcYo9g==",
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.1"
69+
"RAVEN_VERSION": "3.12.2"
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.1",
3+
"version": "3.12.2",
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
@@ -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.12.1',
89+
VERSION: '3.12.2',
9090

9191
debug: false,
9292

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.1',
1013+
sentry_client: 'raven-js/3.12.2',
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.1',
1060+
sentry_client: 'raven-js/3.12.2',
10611061
sentry_key: 'abc',
10621062
sentry_secret: 'def',
10631063
sentry_version: '7'

0 commit comments

Comments
 (0)