Skip to content

Commit

Permalink
3.21.0
Browse files Browse the repository at this point in the history
  • Loading branch information
kamilogorek committed Dec 13, 2017
1 parent fbfea0f commit a278000
Show file tree
Hide file tree
Showing 21 changed files with 217 additions and 90 deletions.
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
# Changelog

## 3.21.0

* NEW: Use Fetch instead of XHR when available https://github.com/getsentry/raven-js/pull/1157
* NEW: Ability to specify Custom headers https://github.com/getsentry/raven-js/pull/1166
* NEW: Handle ErrorEvent objects in TraceKit https://github.com/getsentry/raven-js/pull/1162
* BUGFIX: Check for both stacktraces before calling 'isSameException' https://github.com/getsentry/raven-js/pull/1150
* DOCS: Electron integration documentation https://github.com/getsentry/raven-js/pull/1142
* DOCS: Include Sentry Webpack Plugin in the Source Maps documentation https://github.com/getsentry/raven-js/pull/1155

## 3.20.1

* 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
Expand Down
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "raven-js",
"version": "3.20.1",
"version": "3.21.0",
"dependencies": {},
"main": "dist/raven.js",
"ignore": [
Expand Down
26 changes: 25 additions & 1 deletion dist/plugins/angular.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*! Raven.js 3.20.1 (42adaf5) | github.com/getsentry/raven-js */
/*! Raven.js 3.21.0 (fbfea0f) | github.com/getsentry/raven-js */

/*
* Includes TraceKit
Expand Down Expand Up @@ -150,6 +150,19 @@ function supportsErrorEvent() {
}
}

function supportsFetch() {
if (!('fetch' in _window)) return false;

try {
new Headers(); // eslint-disable-line no-new
new Request(''); // eslint-disable-line no-new
new Response(); // eslint-disable-line no-new
return true;
} catch (e) {
return false;
}
}

function wrappedCallback(callback) {
function dataCallback(data, original) {
var normalizedData = callback(data) || data;
Expand Down Expand Up @@ -399,6 +412,13 @@ function isOnlyOneTruthy(a, b) {
return !!(!!a ^ !!b);
}

/**
* Returns true if both parameters are undefined
*/
function isBothUndefined(a, b) {
return isUndefined(a) && isUndefined(b);
}

/**
* Returns true if the two input exception interfaces have the same content
*/
Expand All @@ -410,6 +430,9 @@ function isSameException(ex1, ex2) {

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

// in case both stacktraces are undefined, we can't decide so default to false
if (isBothUndefined(ex1.stacktrace, ex2.stacktrace)) return false;

return isSameStacktrace(ex1.stacktrace, ex2.stacktrace);
}

Expand Down Expand Up @@ -468,6 +491,7 @@ module.exports = {
isArray: isArray,
isEmptyObject: isEmptyObject,
supportsErrorEvent: supportsErrorEvent,
supportsFetch: supportsFetch,
wrappedCallback: wrappedCallback,
each: each,
objectMerge: objectMerge,
Expand Down
4 changes: 2 additions & 2 deletions dist/plugins/angular.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit a278000

Please sign in to comment.