Skip to content

Commit

Permalink
3.15.0
Browse files Browse the repository at this point in the history
  • Loading branch information
LewisJEllis committed May 5, 2017
1 parent d49a1b8 commit 5d9a3aa
Show file tree
Hide file tree
Showing 21 changed files with 69 additions and 34 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.15.0
* NEW: Added new `instrument` config option. See: https://github.com/getsentry/raven-js/pull/938
* NEW: Support CJS use of AngularJS module. See documentation: https://docs.sentry.io/clients/javascript/integrations/angularjs/

## 3.14.2
* BUGFIX: Fix bug in breadcrumb URL truncation when `fetch` is used with a `Request` argument. See: https://github.com/getsentry/raven-js/issues/924

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.14.2",
"version": "3.15.0",
"dependencies": {},
"main": "dist/raven.js",
"ignore": [
Expand Down
7 changes: 5 additions & 2 deletions dist/plugins/angular.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*! Raven.js 3.14.2 (5cf57e1) | github.com/getsentry/raven-js */
/*! Raven.js 3.15.0 (d49a1b8) | github.com/getsentry/raven-js */

/*
* Includes TraceKit
Expand All @@ -20,6 +20,7 @@

// See https://github.com/angular/angular.js/blob/v1.4.7/src/minErr.js
var angularPattern = /^\[((?:[$a-zA-Z0-9]+:)?(?:[$a-zA-Z0-9]+))\] (.*?)\n?(\S+)$/;
var moduleName = 'ngRaven';


function angularPlugin(Raven, angular) {
Expand Down Expand Up @@ -47,7 +48,7 @@ function angularPlugin(Raven, angular) {
};
}

angular.module('ngRaven', [])
angular.module(moduleName, [])
.provider('Raven', RavenProvider)
.config(['$provide', ExceptionHandlerProvider]);

Expand Down Expand Up @@ -77,6 +78,8 @@ angularPlugin._normalizeData = function (data) {
}
};

angularPlugin.moduleName = moduleName;

module.exports = angularPlugin;

},{}]},{},[1])(1)
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.

2 changes: 1 addition & 1 deletion dist/plugins/angular.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/console.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*! Raven.js 3.14.2 (5cf57e1) | github.com/getsentry/raven-js */
/*! Raven.js 3.15.0 (d49a1b8) | github.com/getsentry/raven-js */

/*
* Includes TraceKit
Expand Down
2 changes: 1 addition & 1 deletion 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/ember.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*! Raven.js 3.14.2 (5cf57e1) | github.com/getsentry/raven-js */
/*! Raven.js 3.15.0 (d49a1b8) | 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.14.2 (5cf57e1) | github.com/getsentry/raven-js */
/*! Raven.js 3.15.0 (d49a1b8) | 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.

2 changes: 1 addition & 1 deletion dist/plugins/vue.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*! Raven.js 3.14.2 (5cf57e1) | github.com/getsentry/raven-js */
/*! Raven.js 3.15.0 (d49a1b8) | github.com/getsentry/raven-js */

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

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

40 changes: 34 additions & 6 deletions dist/raven.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*! Raven.js 3.14.2 (5cf57e1) | github.com/getsentry/raven-js */
/*! Raven.js 3.15.0 (d49a1b8) | github.com/getsentry/raven-js */

/*
* Includes TraceKit
Expand Down Expand Up @@ -120,6 +120,7 @@ function Raven() {
maxUrlLength: 250,
stackTraceLimit: 50,
autoBreadcrumbs: true,
instrument: true,
sampleRate: 1
};
this._ignoreOnError = 0;
Expand Down Expand Up @@ -155,7 +156,7 @@ Raven.prototype = {
// webpack (using a build step causes webpack #1617). Grunt verifies that
// this value matches package.json during build.
// See: https://github.com/getsentry/raven-js/issues/465
VERSION: '3.14.2',
VERSION: '3.15.0',

debug: false,

Expand Down Expand Up @@ -220,6 +221,18 @@ Raven.prototype = {
}
globalOptions.autoBreadcrumbs = autoBreadcrumbs;

var instrumentDefaults = {
tryCatch: true
};

var instrument = globalOptions.instrument;
if ({}.toString.call(instrument) === '[object Object]') {
instrument = objectMerge(instrumentDefaults, instrument);
} else if (instrument !== false) {
instrument = instrumentDefaults;
}
globalOptions.instrument = instrument;

TraceKit.collectWindowErrors = !!globalOptions.collectWindowErrors;

// return for chaining
Expand All @@ -240,7 +253,10 @@ Raven.prototype = {
TraceKit.report.subscribe(function () {
self._handleOnErrorStackInfo.apply(self, arguments);
});
self._instrumentTryCatch();
if (self._globalOptions.instrument && self._globalOptions.instrument.tryCatch) {
self._instrumentTryCatch();
}

if (self._globalOptions.autoBreadcrumbs)
self._instrumentBreadcrumbs();

Expand Down Expand Up @@ -918,7 +934,8 @@ Raven.prototype = {
},

/**
* Install any queued plugins
* Wrap timer functions and event targets to catch errors and provide
* better metadata.
*/
_instrumentTryCatch: function() {
var self = this;
Expand Down Expand Up @@ -1116,19 +1133,30 @@ Raven.prototype = {
// Make a copy of the arguments to prevent deoptimization
// https://github.com/petkaantonov/bluebird/wiki/Optimization-killers#32-leaking-arguments
var args = new Array(arguments.length);
for(var i = 0; i < args.length; ++i) {
for (var i = 0; i < args.length; ++i) {
args[i] = arguments[i];
}

var fetchInput = args[0];
var method = 'GET';
var url;

if (typeof fetchInput === 'string') {
url = fetchInput;
} else {
url = fetchInput.url;
if (fetchInput.method) {
method = fetchInput.method;
}
}

if (args[1] && args[1].method) {
method = args[1].method;
}

var fetchData = {
method: method,
url: args[0],
url: url,
status_code: null
};

Expand Down
4 changes: 2 additions & 2 deletions dist/raven.min.js

Large diffs are not rendered by default.

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

Large diffs are not rendered by default.

Loading

0 comments on commit 5d9a3aa

Please sign in to comment.