Skip to content

Commit cd9082a

Browse files
committed
3.18.0
1 parent b771bb2 commit cd9082a

25 files changed

+5233
-2510
lines changed

CHANGELOG.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,20 @@
11
# Changelog
22

3+
## 3.18.0
4+
5+
* NEW: All unit and integration tests are now running on CI using SauceLabs, to ensure everything is working correctly on all browsers https://github.com/getsentry/raven-js/pull/1026
6+
* NEW: `console.assert` is now instrumented in the same way as the rest of `console` methods https://github.com/getsentry/raven-js/pull/1044
7+
* NEW: Vue.js plugin now provides `lifecycleHook` as the 3rd argument to error handler, to make it in line with v2.2.0 implementation https://github.com/getsentry/raven-js/pull/1053
8+
* NEW: Updated Errors serialization to store all additional properties and allow for attaching other object instances directly to it https://github.com/getsentry/raven-js/pull/1060
9+
* NEW: Included exception type in `ignoreErrors` test, which allows for filtering based on error types https://github.com/getsentry/raven-js/pull/1057
10+
* CHANGE: Raven.js now uses Prettier to format it's code https://github.com/getsentry/raven-js/pull/1020
11+
* CHANGE: Unit tests are using Headless Chrome instead of PhantomJS https://github.com/getsentry/raven-js/pull/1029
12+
* CHANGE: Added `setDSN` typing definition for TypeScript https://github.com/getsentry/raven-js/pull/995
13+
* BUGFIX: Defend against undefined `XMLHttpRequest` while sending events https://github.com/getsentry/raven-js/pull/1024
14+
* BUGFIX: `lastEventId` won't be overriden when an event was dropped https://github.com/getsentry/raven-js/pull/1041
15+
* BUGFIX: Make sure that `document` is available before reading `location` https://github.com/getsentry/raven-js/pull/1038
16+
* BUGFIX: Prevent breadcrumbs with undefined url to throw an error https://github.com/getsentry/raven-js/pull/1018
17+
318
## 3.17.0
419
* CHANGE: Export TypeScript definitions as a CommonJS module. See: https://github.com/getsentry/raven-js/pull/977
520

bower.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "raven-js",
3-
"version": "3.17.0",
3+
"version": "3.18.0",
44
"dependencies": {},
55
"main": "dist/raven.js",
66
"ignore": [

dist/plugins/angular.js

Lines changed: 180 additions & 109 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/*! Raven.js 3.17.0 (6384830) | github.com/getsentry/raven-js */
1+
/*! Raven.js 3.18.0 (b771bb2) | github.com/getsentry/raven-js */
22

33
/*
44
* Includes TraceKit
@@ -10,115 +10,186 @@
1010
*
1111
*/
1212

13-
(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=(g.Raven||(g.Raven = {}));g=(g.Plugins||(g.Plugins = {}));g.Angular = 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-
/**
15-
* Angular.js plugin
16-
*
17-
* Provides an $exceptionHandler for Angular.js
18-
*/
19-
'use strict';
20-
21-
var wrappedCallback = _dereq_(2).wrappedCallback;
22-
23-
// See https://github.com/angular/angular.js/blob/v1.4.7/src/minErr.js
24-
var angularPattern = /^\[((?:[$a-zA-Z0-9]+:)?(?:[$a-zA-Z0-9]+))\] (.*?)\n?(\S+)$/;
25-
var moduleName = 'ngRaven';
26-
27-
28-
function angularPlugin(Raven, angular) {
29-
angular = angular || window.angular;
30-
31-
if (!angular) return;
32-
33-
function RavenProvider() {
34-
this.$get = ['$window', function($window) {
35-
return Raven;
36-
}];
37-
}
38-
39-
function ExceptionHandlerProvider($provide) {
40-
$provide.decorator('$exceptionHandler',
41-
['Raven', '$delegate', exceptionHandler]);
42-
}
43-
44-
function exceptionHandler(R, $delegate) {
45-
return function (ex, cause) {
46-
R.captureException(ex, {
47-
extra: { cause: cause }
48-
});
49-
$delegate(ex, cause);
50-
};
51-
}
52-
53-
angular.module(moduleName, [])
54-
.provider('Raven', RavenProvider)
55-
.config(['$provide', ExceptionHandlerProvider]);
56-
57-
Raven.setDataCallback(wrappedCallback(function(data) {
58-
return angularPlugin._normalizeData(data);
59-
}));
60-
}
61-
62-
angularPlugin._normalizeData = function (data) {
63-
// We only care about mutating an exception
64-
var exception = data.exception;
65-
if (exception) {
66-
exception = exception.values[0];
67-
var matches = angularPattern.exec(exception.value);
68-
69-
if (matches) {
70-
// This type now becomes something like: $rootScope:inprog
71-
exception.type = matches[1];
72-
exception.value = matches[2];
73-
74-
data.message = exception.type + ': ' + exception.value;
75-
// auto set a new tag specifically for the angular error url
76-
data.extra.angularDocs = matches[3].substr(0, 250);
77-
}
13+
(function(f) {
14+
if (typeof exports === 'object' && typeof module !== 'undefined') {
15+
module.exports = f();
16+
} else if (typeof define === 'function' && define.amd) {
17+
define([], f);
18+
} else {
19+
var g;
20+
if (typeof window !== 'undefined') {
21+
g = window;
22+
} else if (typeof global !== 'undefined') {
23+
g = global;
24+
} else if (typeof self !== 'undefined') {
25+
g = self;
26+
} else {
27+
g = this;
7828
}
79-
80-
return data;
81-
};
82-
83-
angularPlugin.moduleName = moduleName;
84-
85-
module.exports = angularPlugin;
86-
87-
},{"2":2}],2:[function(_dereq_,module,exports){
88-
'use strict';
89-
90-
function isObject(what) {
91-
return typeof what === 'object' && what !== null;
92-
}
93-
94-
// Yanked from https://git.io/vS8DV re-used under CC0
95-
// with some tiny modifications
96-
function isError(value) {
97-
switch ({}.toString.call(value)) {
98-
case '[object Error]': return true;
99-
case '[object Exception]': return true;
100-
case '[object DOMException]': return true;
101-
default: return value instanceof Error;
29+
g = g.Raven || (g.Raven = {});
30+
g = g.Plugins || (g.Plugins = {});
31+
g.Angular = f();
10232
}
103-
}
104-
105-
function wrappedCallback(callback) {
106-
function dataCallback(data, original) {
107-
var normalizedData = callback(data) || data;
108-
if (original) {
109-
return original(normalizedData) || normalizedData;
33+
})(function() {
34+
var define, module, exports;
35+
return (function e(t, n, r) {
36+
function s(o, u) {
37+
if (!n[o]) {
38+
if (!t[o]) {
39+
var a = typeof require == 'function' && require;
40+
if (!u && a) return a(o, !0);
41+
if (i) return i(o, !0);
42+
var f = new Error("Cannot find module '" + o + "'");
43+
throw ((f.code = 'MODULE_NOT_FOUND'), f);
44+
}
45+
var l = (n[o] = {exports: {}});
46+
t[o][0].call(
47+
l.exports,
48+
function(e) {
49+
var n = t[o][1][e];
50+
return s(n ? n : e);
51+
},
52+
l,
53+
l.exports,
54+
e,
55+
t,
56+
n,
57+
r
58+
);
11059
}
111-
return normalizedData;
60+
return n[o].exports;
11261
}
113-
114-
return dataCallback;
115-
}
116-
117-
module.exports = {
118-
isObject: isObject,
119-
isError: isError,
120-
wrappedCallback: wrappedCallback
121-
};
122-
123-
},{}]},{},[1])(1)
124-
});
62+
var i = typeof require == 'function' && require;
63+
for (var o = 0; o < r.length; o++) s(r[o]);
64+
return s;
65+
})(
66+
{
67+
1: [
68+
function(_dereq_, module, exports) {
69+
/**
70+
* Angular.js plugin
71+
*
72+
* Provides an $exceptionHandler for Angular.js
73+
*/
74+
var wrappedCallback = _dereq_(2).wrappedCallback;
75+
76+
// See https://github.com/angular/angular.js/blob/v1.4.7/src/minErr.js
77+
var angularPattern = /^\[((?:[$a-zA-Z0-9]+:)?(?:[$a-zA-Z0-9]+))\] (.*?)\n?(\S+)$/;
78+
var moduleName = 'ngRaven';
79+
80+
function angularPlugin(Raven, angular) {
81+
angular = angular || window.angular;
82+
83+
if (!angular) return;
84+
85+
function RavenProvider() {
86+
this.$get = [
87+
'$window',
88+
function($window) {
89+
return Raven;
90+
}
91+
];
92+
}
93+
94+
function ExceptionHandlerProvider($provide) {
95+
$provide.decorator('$exceptionHandler', [
96+
'Raven',
97+
'$delegate',
98+
exceptionHandler
99+
]);
100+
}
101+
102+
function exceptionHandler(R, $delegate) {
103+
return function(ex, cause) {
104+
R.captureException(ex, {
105+
extra: {cause: cause}
106+
});
107+
$delegate(ex, cause);
108+
};
109+
}
110+
111+
angular
112+
.module(moduleName, [])
113+
.provider('Raven', RavenProvider)
114+
.config(['$provide', ExceptionHandlerProvider]);
115+
116+
Raven.setDataCallback(
117+
wrappedCallback(function(data) {
118+
return angularPlugin._normalizeData(data);
119+
})
120+
);
121+
}
122+
123+
angularPlugin._normalizeData = function(data) {
124+
// We only care about mutating an exception
125+
var exception = data.exception;
126+
if (exception) {
127+
exception = exception.values[0];
128+
var matches = angularPattern.exec(exception.value);
129+
130+
if (matches) {
131+
// This type now becomes something like: $rootScope:inprog
132+
exception.type = matches[1];
133+
exception.value = matches[2];
134+
135+
data.message = exception.type + ': ' + exception.value;
136+
// auto set a new tag specifically for the angular error url
137+
data.extra.angularDocs = matches[3].substr(0, 250);
138+
}
139+
}
140+
141+
return data;
142+
};
143+
144+
angularPlugin.moduleName = moduleName;
145+
146+
module.exports = angularPlugin;
147+
},
148+
{'2': 2}
149+
],
150+
2: [
151+
function(_dereq_, module, exports) {
152+
function isObject(what) {
153+
return typeof what === 'object' && what !== null;
154+
}
155+
156+
// Yanked from https://git.io/vS8DV re-used under CC0
157+
// with some tiny modifications
158+
function isError(value) {
159+
switch ({}.toString.call(value)) {
160+
case '[object Error]':
161+
return true;
162+
case '[object Exception]':
163+
return true;
164+
case '[object DOMException]':
165+
return true;
166+
default:
167+
return value instanceof Error;
168+
}
169+
}
170+
171+
function wrappedCallback(callback) {
172+
function dataCallback(data, original) {
173+
var normalizedData = callback(data) || data;
174+
if (original) {
175+
return original(normalizedData) || normalizedData;
176+
}
177+
return normalizedData;
178+
}
179+
180+
return dataCallback;
181+
}
182+
183+
module.exports = {
184+
isObject: isObject,
185+
isError: isError,
186+
wrappedCallback: wrappedCallback
187+
};
188+
},
189+
{}
190+
]
191+
},
192+
{},
193+
[1]
194+
)(1);
195+
});

0 commit comments

Comments
 (0)