Skip to content

Commit 373122f

Browse files
committedJan 20, 2016
Merge pull request #481 from getsentry/2.1.0-release
2.1.0
2 parents 4c8c53c + e3f4e88 commit 373122f

30 files changed

+499
-137
lines changed
 

Diff for: ‎CHANGELOG.md

+12-1
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,19 @@
11
# Changelog
22

3+
## 2.1.0
4+
* BUGFIX: Fixed Raven.js rejecting frames w/ blob URLs. See: https://github.com/getsentry/raven-js/issues/463
5+
* BUGFIX: Fixed plugin files not consumable without module loader. See: https://github.com/getsentry/raven-js/issues/446
6+
* BUGFIX: Fixed bug in console.js plugin where `level` wasn't passed. See: https://github.com/getsentry/raven-js/pull/474
7+
* BUGFIX: Fixed broken debug logging in IE9 and below. See: https://github.com/getsentry/raven-js/pull/473
8+
* BUGFIX: Fixed `XMLHttpRequest` wrapper not capturing all event handlers. See: https://github.com/getsentry/raven-js/issues/453
9+
* CHANGE: `Raven.uninstall` now restores original builtin functions (e.g. setTimeout). See: https://github.com/getsentry/raven-js/issues/228
10+
* CHANGE: `maxMessageLength` now defaults to 0 (no limit). See: https://github.com/getsentry/raven-js/pull/441
11+
* NEW: New `stackTraceLimit` config option (default 50 in supported browsers). See: https://github.com/getsentry/raven-js/pull/419/files
12+
* NEW: `Raven.showReportDialog` (experimental). See: https://github.com/getsentry/raven-js/pull/456
13+
314
## 2.0.5
415
* BUGFIX: Fixed exception thrown by React Native plugin. See: https://github.com/getsentry/raven-js/issues/468
5-
* BUGFIX: Fixed "pre-built JavaScript" warning when loading Raven.js via Webpack: https://github.com/getsentry/raven-js/issues/465
16+
* BUGFIX: Fixed "pre-built JavaScript" warning when loading Raven.js via Webpack. See: https://github.com/getsentry/raven-js/issues/465
617

718
## 2.0.4
819
* BUGFIX: Fixed bug where Raven.VERSION was not set when required as a CommonJS module.

Diff for: ‎bower.json

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

Diff for: ‎dist/plugins/angular.js

+75
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
/*! Raven.js 2.1.0 (9ca11cd) | github.com/getsentry/raven-js */
2+
3+
/*
4+
* Includes TraceKit
5+
* https://github.com/getsentry/TraceKit
6+
*
7+
* Copyright 2016 Matt Robenolt and other contributors
8+
* Released under the BSD license
9+
* https://github.com/getsentry/raven-js/blob/master/LICENSE
10+
*
11+
*/
12+
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+
// See https://github.com/angular/angular.js/blob/v1.4.7/src/minErr.js
22+
var angularPattern = /^\[((?:[$a-zA-Z0-9]+:)?(?:[$a-zA-Z0-9]+))\] (.+?)\n(\S+)$/;
23+
24+
function angularPlugin(Raven, angular) {
25+
angular = angular || window.angular;
26+
27+
if (!angular) return;
28+
29+
function RavenProvider() {
30+
this.$get = ['$window', function($window) {
31+
return Raven;
32+
}];
33+
}
34+
35+
function ExceptionHandlerProvider($provide) {
36+
$provide.decorator('$exceptionHandler',
37+
['Raven', '$delegate', exceptionHandler]);
38+
}
39+
40+
function exceptionHandler(R, $delegate) {
41+
return function (ex, cause) {
42+
R.captureException(ex, {
43+
extra: { cause: cause }
44+
});
45+
$delegate(ex, cause);
46+
};
47+
}
48+
49+
angular.module('ngRaven', [])
50+
.provider('Raven', RavenProvider)
51+
.config(['$provide', ExceptionHandlerProvider]);
52+
53+
Raven.setDataCallback(function(data) {
54+
// We only care about mutating an exception
55+
var exception = data.exception;
56+
if (exception) {
57+
exception = exception.values[0];
58+
var matches = angularPattern.exec(exception.value);
59+
60+
if (matches) {
61+
// This type now becomes something like: $rootScope:inprog
62+
exception.type = matches[1];
63+
exception.value = matches[2];
64+
data.message = exception.type + ': ' + exception.value;
65+
// auto set a new tag specifically for the angular error url
66+
data.extra.angularDocs = matches[3].substr(0, 250);
67+
}
68+
}
69+
});
70+
}
71+
72+
module.exports = angularPlugin;
73+
74+
},{}]},{},[1])(1)
75+
});

Diff for: ‎dist/plugins/angular.min.js

+3
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Diff for: ‎dist/plugins/angular.min.js.map

+1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Diff for: ‎dist/plugins/console.js

+62
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
/*! Raven.js 2.1.0 (9ca11cd) | github.com/getsentry/raven-js */
2+
3+
/*
4+
* Includes TraceKit
5+
* https://github.com/getsentry/TraceKit
6+
*
7+
* Copyright 2016 Matt Robenolt and other contributors
8+
* Released under the BSD license
9+
* https://github.com/getsentry/raven-js/blob/master/LICENSE
10+
*
11+
*/
12+
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.Console = 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+
* console plugin
16+
*
17+
* Monkey patches console.* calls into Sentry messages with
18+
* their appropriate log levels. (Experimental)
19+
*/
20+
'use strict';
21+
22+
function consolePlugin(Raven, console) {
23+
console = console || window.console || {};
24+
25+
var originalConsole = console,
26+
logLevels = ['debug', 'info', 'warn', 'error'],
27+
level = logLevels.pop();
28+
29+
var logForGivenLevel = function(l) {
30+
var originalConsoleLevel = console[l];
31+
32+
// warning level is the only level that doesn't map up
33+
// correctly with what Sentry expects.
34+
if (l === 'warn') l = 'warning';
35+
return function () {
36+
var args = [].slice.call(arguments);
37+
Raven.captureMessage('' + args.join(' '), {level: l, logger: 'console', extra: { 'arguments': args }});
38+
39+
// this fails for some browsers. :(
40+
if (originalConsoleLevel) {
41+
// IE9 doesn't allow calling apply on console functions directly
42+
// See: https://stackoverflow.com/questions/5472938/does-ie9-support-console-log-and-is-it-a-real-function#answer-5473193
43+
Function.prototype.apply.call(
44+
originalConsoleLevel,
45+
originalConsole,
46+
args
47+
);
48+
}
49+
};
50+
};
51+
52+
53+
while(level) {
54+
console[level] = logForGivenLevel(level);
55+
level = logLevels.pop();
56+
}
57+
}
58+
59+
module.exports = consolePlugin;
60+
61+
},{}]},{},[1])(1)
62+
});

Diff for: ‎dist/plugins/console.min.js

+3
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Diff for: ‎dist/plugins/console.min.js.map

+1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Diff for: ‎dist/plugins/ember.js

+46
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
/*! Raven.js 2.1.0 (9ca11cd) | github.com/getsentry/raven-js */
2+
3+
/*
4+
* Includes TraceKit
5+
* https://github.com/getsentry/TraceKit
6+
*
7+
* Copyright 2016 Matt Robenolt and other contributors
8+
* Released under the BSD license
9+
* https://github.com/getsentry/raven-js/blob/master/LICENSE
10+
*
11+
*/
12+
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.Ember = 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+
* Ember.js plugin
16+
*
17+
* Patches event handler callbacks and ajax callbacks.
18+
*/
19+
'use strict';
20+
21+
function emberPlugin(Raven, Ember) {
22+
Ember = Ember || window.Ember;
23+
24+
// quit if Ember isn't on the page
25+
if (!Ember) return;
26+
27+
var _oldOnError = Ember.onerror;
28+
Ember.onerror = function EmberOnError(error) {
29+
Raven.captureException(error);
30+
if (typeof _oldOnError === 'function') {
31+
_oldOnError.call(this, error);
32+
}
33+
};
34+
Ember.RSVP.on('error', function (reason) {
35+
if (reason instanceof Error) {
36+
Raven.captureException(reason, {extra: {context: 'Unhandled Promise error detected'}});
37+
} else {
38+
Raven.captureMessage('Unhandled Promise error detected', {extra: {reason: reason}});
39+
}
40+
});
41+
}
42+
43+
module.exports = emberPlugin;
44+
45+
},{}]},{},[1])(1)
46+
});

Diff for: ‎dist/plugins/ember.min.js

+3
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Diff for: ‎dist/plugins/ember.min.js.map

+1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)
Please sign in to comment.