Skip to content

Commit

Permalink
3.0.1
Browse files Browse the repository at this point in the history
  • Loading branch information
benvinegar committed May 3, 2016
1 parent 996e09a commit 776caaa
Show file tree
Hide file tree
Showing 25 changed files with 136 additions and 137 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Changelog

## 3.0.1

* BUGFIX: Fix broken CDN builds. See: https://github.com/getsentry/raven-js/pull/566

## 3.0.0

* NEW: Raven.js now collects breadcrumbs from XMLHttpRequest objects, URL changes (pushState), console log calls, UI clicks, and errors.
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.0.0",
"version": "3.0.1",
"dependencies": {},
"main": "dist/raven.js",
"ignore": [
Expand Down
2 changes: 1 addition & 1 deletion dist/plugins/angular.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*! Raven.js 3.0.0 (6adaa62) | github.com/getsentry/raven-js */
/*! Raven.js 3.0.1 (996e09a) | github.com/getsentry/raven-js */

/*
* Includes TraceKit
Expand Down
2 changes: 1 addition & 1 deletion dist/plugins/angular.min.js

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

78 changes: 46 additions & 32 deletions dist/plugins/console.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*! Raven.js 3.0.0 (6adaa62) | github.com/getsentry/raven-js */
/*! Raven.js 3.0.1 (996e09a) | github.com/getsentry/raven-js */

/*
* Includes TraceKit
Expand All @@ -24,51 +24,65 @@
*/
'use strict';

var wrapConsoleMethod = _dereq_(2).wrapMethod;

function consolePlugin(Raven, console, pluginOptions) {
console = console || window.console || {};
pluginOptions = pluginOptions || {};

var originalConsole = console,
logLevels = pluginOptions.levels || ['debug', 'info', 'warn', 'error'],
var logLevels = pluginOptions.levels || ['debug', 'info', 'warn', 'error'],
level = logLevels.pop();

var logForGivenLevel = function(l) {
var originalConsoleLevel = console[l];

// warning level is the only level that doesn't map up
// correctly with what Sentry expects.
if (l === 'warn') l = 'warning';
return function () {
var args = [].slice.call(arguments);

var msg = '' + args.join(' ');
var data = {level: l, logger: 'console', extra: { 'arguments': args }};
if (pluginOptions.callback) {
pluginOptions.callback(msg, data);
} else {
Raven.captureMessage(msg, data);
}

// this fails for some browsers. :(
if (originalConsoleLevel) {
// IE9 doesn't allow calling apply on console functions directly
// See: https://stackoverflow.com/questions/5472938/does-ie9-support-console-log-and-is-it-a-real-function#answer-5473193
Function.prototype.apply.call(
originalConsoleLevel,
originalConsole,
args
);
}
};
var callback = function (msg, data) {
Raven.captureMessage(msg, data);
};

while(level) {
console[level] = logForGivenLevel(level);
wrapConsoleMethod(console, level, callback);
level = logLevels.pop();
}
}

module.exports = consolePlugin;

},{"2":2}],2:[function(_dereq_,module,exports){
'use strict';

var wrapMethod = function(console, level, callback) {
var originalConsoleLevel = console[level];
var originalConsole = console;

if (!(level in console)) {
return;
}

var sentryLevel = level === 'warn'
? 'warning'
: level;

console[level] = function () {
var args = [].slice.call(arguments);

var msg = '' + args.join(' ');
var data = {level: sentryLevel, logger: 'console', extra: {'arguments': args}};
callback && callback(msg, data);

// this fails for some browsers. :(
if (originalConsoleLevel) {
// IE9 doesn't allow calling apply on console functions directly
// See: https://stackoverflow.com/questions/5472938/does-ie9-support-console-log-and-is-it-a-real-function#answer-5473193
Function.prototype.apply.call(
originalConsoleLevel,
originalConsole,
args
);
}
};
};

module.exports = {
wrapMethod: wrapMethod
};

},{}]},{},[1])(1)
});
4 changes: 2 additions & 2 deletions dist/plugins/console.min.js

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

2 changes: 1 addition & 1 deletion dist/plugins/console.min.js.map

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

2 changes: 1 addition & 1 deletion dist/plugins/ember.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*! Raven.js 3.0.0 (6adaa62) | github.com/getsentry/raven-js */
/*! Raven.js 3.0.1 (996e09a) | github.com/getsentry/raven-js */

/*
* Includes TraceKit
Expand Down
2 changes: 1 addition & 1 deletion dist/plugins/ember.min.js

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

2 changes: 1 addition & 1 deletion dist/plugins/require.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*! Raven.js 3.0.0 (6adaa62) | github.com/getsentry/raven-js */
/*! Raven.js 3.0.1 (996e09a) | github.com/getsentry/raven-js */

/*
* Includes TraceKit
Expand Down
2 changes: 1 addition & 1 deletion dist/plugins/require.min.js

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

Loading

0 comments on commit 776caaa

Please sign in to comment.