Skip to content

Commit 76f13b5

Browse files
authored
3.11.0 (#856)
1 parent 2c38c31 commit 76f13b5

21 files changed

+69
-52
lines changed

CHANGELOG.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,13 @@
11
# Changelog
22

3-
## 3.10.0
3+
## 3.11.0
4+
* CHANGE: Raven.js no longer auto-wraps jQuery.ready (if present); fixes jQuery deprecation warnings. See: https://github.com/getsentry/raven-js/pull/849
5+
* BUGFIX: Fix User-Agent not collected in web worker environment. See: https://github.com/getsentry/raven-js/issues/853
6+
* BUGFIX: Fix DOM tree summarizer (breadcrumbs) not splitting on breadcrumbs effectively. See: https://github.com/getsentry/raven-js/pull/852
7+
* BUGFIX: Fix Vue plugin breaking on production builds. See: https://github.com/getsentry/raven-js/pull/848
8+
* NEW: Added comment to Raven.wrap to indicate stack traces containing this frame are not indicative of a bug. See: https://github.com/getsentry/raven-js/pull/847
49

10+
## 3.10.0
511
* NEW: Raven.js will exponentially back off if server returns a 400-level error (e.g. 429 too many requests). See: https://github.com/getsentry/raven-js/pull/839
612
* CHANGE: Raven.js will not set lastEventId if transmission failed because Raven is not configured. See: https://github.com/getsentry/raven-js/pull/839
713
* BUGFIX: Raven.js now properly handles Firefox resource:// URLs (extensions). See: https://github.com/getsentry/raven-js/pull/837

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.10.0",
3+
"version": "3.11.0",
44
"dependencies": {},
55
"main": "dist/raven.js",
66
"ignore": [

dist/plugins/angular.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/*! Raven.js 3.10.0 (d7e787e) | github.com/getsentry/raven-js */
1+
/*! Raven.js 3.11.0 (c2f43d7) | github.com/getsentry/raven-js */
22

33
/*
44
* Includes TraceKit

dist/plugins/angular.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/plugins/console.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/*! Raven.js 3.10.0 (d7e787e) | github.com/getsentry/raven-js */
1+
/*! Raven.js 3.11.0 (c2f43d7) | github.com/getsentry/raven-js */
22

33
/*
44
* Includes TraceKit

dist/plugins/console.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/plugins/ember.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/*! Raven.js 3.10.0 (d7e787e) | github.com/getsentry/raven-js */
1+
/*! Raven.js 3.11.0 (c2f43d7) | github.com/getsentry/raven-js */
22

33
/*
44
* Includes TraceKit

dist/plugins/ember.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/plugins/require.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/*! Raven.js 3.10.0 (d7e787e) | github.com/getsentry/raven-js */
1+
/*! Raven.js 3.11.0 (c2f43d7) | github.com/getsentry/raven-js */
22

33
/*
44
* Includes TraceKit

dist/plugins/require.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/plugins/vue.js

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/*! Raven.js 3.10.0 (d7e787e) | github.com/getsentry/raven-js */
1+
/*! Raven.js 3.11.0 (c2f43d7) | github.com/getsentry/raven-js */
22

33
/*
44
* Includes TraceKit
@@ -17,6 +17,17 @@
1717
*/
1818
'use strict';
1919

20+
function formatComponentName (vm) {
21+
if (vm.$root === vm) {
22+
return 'root instance'
23+
}
24+
var name = vm._isVue
25+
? vm.$options.name || vm.$options._componentTag
26+
: vm.name
27+
return (name ? 'component <' + name + '>' : 'anonymous component') +
28+
(vm._isVue && vm.$options.__file ? ' at ' + vm.$options.__file : '')
29+
}
30+
2031
function vuePlugin(Raven, Vue) {
2132
Vue = Vue || window.Vue;
2233

@@ -27,7 +38,7 @@ function vuePlugin(Raven, Vue) {
2738
Vue.config.errorHandler = function VueErrorHandler(error, vm) {
2839
Raven.captureException(error, {
2940
extra: {
30-
componentName: Vue.util.formatComponentName(vm),
41+
componentName: formatComponentName(vm),
3142
propsData: vm.$options.propsData
3243
}
3344
});

dist/plugins/vue.min.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/plugins/vue.min.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/raven.js

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/*! Raven.js 3.10.0 (d7e787e) | github.com/getsentry/raven-js */
1+
/*! Raven.js 3.11.0 (c2f43d7) | github.com/getsentry/raven-js */
22

33
/*
44
* Includes TraceKit
@@ -114,6 +114,7 @@ var _window = typeof window !== 'undefined' ? window
114114
: typeof self !== 'undefined' ? self
115115
: {};
116116
var _document = _window.document;
117+
var _navigator = _window.navigator;
117118

118119
// First, check for JSON support
119120
// If there is no JSON, we no-op the core features of Raven
@@ -122,6 +123,7 @@ function Raven() {
122123
this._hasJSON = !!(typeof JSON === 'object' && JSON.stringify);
123124
// Raven can run in contexts where there's no document (react-native)
124125
this._hasDocument = !isUndefined(_document);
126+
this._hasNavigator = !isUndefined(_navigator);
125127
this._lastCapturedException = null;
126128
this._lastEventId = null;
127129
this._globalServer = null;
@@ -173,7 +175,7 @@ Raven.prototype = {
173175
// webpack (using a build step causes webpack #1617). Grunt verifies that
174176
// this value matches package.json during build.
175177
// See: https://github.com/getsentry/raven-js/issues/465
176-
VERSION: '3.10.0',
178+
VERSION: '3.11.0',
177179

178180
debug: false,
179181

@@ -374,6 +376,10 @@ Raven.prototype = {
374376
while(i--) args[i] = deep ? self.wrap(options, arguments[i]) : arguments[i];
375377

376378
try {
379+
// Attempt to invoke user-land function
380+
// NOTE: If you are a Sentry user, and you are seeing this stack frame, it
381+
// means Raven caught an error invoking your application code. This is
382+
// expected behavior and NOT indicative of a bug with Raven.js.
377383
return func.apply(this, args);
378384
} catch(e) {
379385
self._ignoreNextOnError();
@@ -1022,15 +1028,6 @@ Raven.prototype = {
10221028
for (var i = 0; i < eventTargets.length; i++) {
10231029
wrapEventTarget(eventTargets[i]);
10241030
}
1025-
1026-
var $ = _window.jQuery || _window.$;
1027-
if ($ && $.fn && $.fn.ready) {
1028-
fill($.fn, 'ready', function (orig) {
1029-
return function (fn) {
1030-
return orig.call(this, self.wrap(fn));
1031-
};
1032-
}, wrappedBuiltIns);
1033-
}
10341031
},
10351032

10361033

@@ -1400,20 +1397,23 @@ Raven.prototype = {
14001397
},
14011398

14021399
_getHttpData: function() {
1403-
if (!this._hasDocument || !_document.location || !_document.location.href) {
1404-
return;
1400+
if (!this._hasNavigator && !this._hasDocument) return;
1401+
var httpData = {};
1402+
1403+
if (this._hasNavigator && _navigator.userAgent) {
1404+
httpData.headers = {
1405+
'User-Agent': navigator.userAgent
1406+
};
14051407
}
14061408

1407-
var httpData = {
1408-
headers: {
1409-
'User-Agent': navigator.userAgent
1409+
if (this._hasDocument) {
1410+
if (_document.location && _document.location.href) {
1411+
httpData.url = _document.location.href;
1412+
}
1413+
if (_document.referrer) {
1414+
if (!httpData.headers) httpData.headers = {};
1415+
httpData.headers.Referer = _document.referrer;
14101416
}
1411-
};
1412-
1413-
httpData.url = _document.location.href;
1414-
1415-
if (_document.referrer) {
1416-
httpData.headers.Referer = _document.referrer;
14171417
}
14181418

14191419
return httpData;
@@ -1899,7 +1899,7 @@ function htmlElementAsString(elem) {
18991899

19001900
className = elem.className;
19011901
if (className && isString(className)) {
1902-
classes = className.split(' ');
1902+
classes = className.split(/\s+/);
19031903
for (i = 0; i < classes.length; i++) {
19041904
out.push('.' + classes[i]);
19051905
}

dist/raven.min.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/raven.min.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)