Skip to content

Commit a278000

Browse files
committed
3.21.0
1 parent fbfea0f commit a278000

21 files changed

+217
-90
lines changed

CHANGELOG.md

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

3+
## 3.21.0
4+
5+
* NEW: Use Fetch instead of XHR when available https://github.com/getsentry/raven-js/pull/1157
6+
* NEW: Ability to specify Custom headers https://github.com/getsentry/raven-js/pull/1166
7+
* NEW: Handle ErrorEvent objects in TraceKit https://github.com/getsentry/raven-js/pull/1162
8+
* BUGFIX: Check for both stacktraces before calling 'isSameException' https://github.com/getsentry/raven-js/pull/1150
9+
* DOCS: Electron integration documentation https://github.com/getsentry/raven-js/pull/1142
10+
* DOCS: Include Sentry Webpack Plugin in the Source Maps documentation https://github.com/getsentry/raven-js/pull/1155
11+
312
## 3.20.1
413

514
* BUGFIX: Prevent Raven throwing during installation when `Function.prototype.toString` is called in Angular projects with `zone.js` and `core.js` wrapped functions https://github.com/getsentry/raven-js/pull/1135

bower.json

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

dist/plugins/angular.js

+25-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/*! Raven.js 3.20.1 (42adaf5) | github.com/getsentry/raven-js */
1+
/*! Raven.js 3.21.0 (fbfea0f) | github.com/getsentry/raven-js */
22

33
/*
44
* Includes TraceKit
@@ -150,6 +150,19 @@ function supportsErrorEvent() {
150150
}
151151
}
152152

153+
function supportsFetch() {
154+
if (!('fetch' in _window)) return false;
155+
156+
try {
157+
new Headers(); // eslint-disable-line no-new
158+
new Request(''); // eslint-disable-line no-new
159+
new Response(); // eslint-disable-line no-new
160+
return true;
161+
} catch (e) {
162+
return false;
163+
}
164+
}
165+
153166
function wrappedCallback(callback) {
154167
function dataCallback(data, original) {
155168
var normalizedData = callback(data) || data;
@@ -399,6 +412,13 @@ function isOnlyOneTruthy(a, b) {
399412
return !!(!!a ^ !!b);
400413
}
401414

415+
/**
416+
* Returns true if both parameters are undefined
417+
*/
418+
function isBothUndefined(a, b) {
419+
return isUndefined(a) && isUndefined(b);
420+
}
421+
402422
/**
403423
* Returns true if the two input exception interfaces have the same content
404424
*/
@@ -410,6 +430,9 @@ function isSameException(ex1, ex2) {
410430

411431
if (ex1.type !== ex2.type || ex1.value !== ex2.value) return false;
412432

433+
// in case both stacktraces are undefined, we can't decide so default to false
434+
if (isBothUndefined(ex1.stacktrace, ex2.stacktrace)) return false;
435+
413436
return isSameStacktrace(ex1.stacktrace, ex2.stacktrace);
414437
}
415438

@@ -468,6 +491,7 @@ module.exports = {
468491
isArray: isArray,
469492
isEmptyObject: isEmptyObject,
470493
supportsErrorEvent: supportsErrorEvent,
494+
supportsFetch: supportsFetch,
471495
wrappedCallback: wrappedCallback,
472496
each: each,
473497
objectMerge: objectMerge,

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.

0 commit comments

Comments
 (0)