Skip to content

Commit

Permalink
3.14.1 (#933)
Browse files Browse the repository at this point in the history
  • Loading branch information
benvinegar authored Apr 12, 2017
1 parent 21187de commit 5cf57e1
Show file tree
Hide file tree
Showing 20 changed files with 51 additions and 61 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# Changelog

## 3.14.1
* BUGFIX: Fix TypeError caused by breadcrumb URL truncation in some situations. See: https://github.com/getsentry/raven-js/issues/925
* BUGFIX: Made URL truncation more defensive for some rare cases. See: https://github.com/getsentry/raven-js/pull/918
* BUGFIX: Raven.js now treats DOMExceptions as "Error" objects w/ traces. See: https://github.com/getsentry/raven-js/pull/919/
* CHANGE: Remove unused/deprecated escape functions in vendored TraceKit.js. See: https://github.com/getsentry/raven-js/pull/923
* CHANGE: Removed json-stringify-safe from package.json (was already vendored). See: https://github.com/getsentry/raven-js/pull/917

## 3.14.0
* NEW: URL values captured in http + breadcrumb interfaces are now trimmed to new `maxUrlLength` config (default 250). See: https://github.com/getsentry/raven-js/pull/906
* CHANGE: Better extraction of URLs from eval frames on Chrome, Firefox. This may affect issue grouping of some events. See: https://github.com/getsentry/raven-js/pull/907
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.0",
"version": "3.14.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.14.0 (6b817d7) | github.com/getsentry/raven-js */
/*! Raven.js 3.14.1 (21187de) | 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.

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.0 (6b817d7) | github.com/getsentry/raven-js */
/*! Raven.js 3.14.1 (21187de) | 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.0 (6b817d7) | github.com/getsentry/raven-js */
/*! Raven.js 3.14.1 (21187de) | 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.0 (6b817d7) | github.com/getsentry/raven-js */
/*! Raven.js 3.14.1 (21187de) | 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.0 (6b817d7) | github.com/getsentry/raven-js */
/*! Raven.js 3.14.1 (21187de) | 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.

55 changes: 19 additions & 36 deletions dist/raven.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*! Raven.js 3.14.0 (6b817d7) | github.com/getsentry/raven-js */
/*! Raven.js 3.14.1 (21187de) | github.com/getsentry/raven-js */

/*
* Includes TraceKit
Expand Down Expand Up @@ -155,7 +155,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.0',
VERSION: '3.14.1',

debug: false,

Expand Down Expand Up @@ -1414,19 +1414,21 @@ Raven.prototype = {
_trimBreadcrumbs: function (breadcrumbs) {
// known breadcrumb properties with urls
// TODO: also consider arbitrary prop values that start with (https?)?://
var urlprops = {to: 1, from: 1, url: 1},
var urlProps = ['to', 'from', 'url'],
urlProp,
crumb,
data;

for (var i = 0; i < breadcrumbs.values.length; i++) {
for (var i = 0; i < breadcrumbs.values.length; ++i) {
crumb = breadcrumbs.values[i];
if (!crumb.hasOwnProperty('data'))
if (!crumb.hasOwnProperty('data') || !isObject(crumb.data))
continue;

data = crumb.data;
for (var prop in urlprops) {
if (data.hasOwnProperty(prop)) {
data[prop] = truncate(data[prop], this._globalOptions.maxUrlLength);
for (var j = 0; j < urlProps.length; ++j) {
urlProp = urlProps[j];
if (data.hasOwnProperty(urlProp)) {
data[urlProp] = truncate(data[urlProp], this._globalOptions.maxUrlLength);
}
}
}
Expand Down Expand Up @@ -2127,20 +2129,22 @@ function isObject(what) {
return typeof what === 'object' && what !== null;
}

// Sorta yanked from https://github.com/joyent/node/blob/aa3b4b4/lib/util.js#L560
// Yanked from https://git.io/vS8DV re-used under CC0
// with some tiny modifications
function isError(what) {
var toString = {}.toString.call(what);
return isObject(what) &&
toString === '[object Error]' ||
toString === '[object Exception]' || // Firefox NS_ERROR_FAILURE Exceptions
what instanceof Error;
function isError(value) {
switch ({}.toString.call(value)) {
case '[object Error]': return true;
case '[object Exception]': return true;
case '[object DOMException]': return true;
default: return value instanceof Error;
}
}

module.exports = {
isObject: isObject,
isError: isError
};

},{}],6:[function(_dereq_,module,exports){
(function (global){
'use strict';
Expand Down Expand Up @@ -2468,27 +2472,6 @@ TraceKit.report = (function reportModuleWrapper() {
*
*/
TraceKit.computeStackTrace = (function computeStackTraceWrapper() {
/**
* Escapes special characters, except for whitespace, in a string to be
* used inside a regular expression as a string literal.
* @param {string} text The string.
* @return {string} The escaped string literal.
*/
function escapeRegExp(text) {
return text.replace(/[\-\[\]{}()*+?.,\\\^$|#]/g, '\\$&');
}

/**
* Escapes special characters in a string to be used inside a regular
* expression as a string literal. Also ensures that HTML entities will
* be matched the same as their literal friends.
* @param {string} body The string.
* @return {string} The escaped string.
*/
function escapeCodeAsRegExpForMatchingInsideHTML(body) {
return escapeRegExp(body).replace('<', '(?:<|&lt;)').replace('>', '(?:>|&gt;)').replace('&', '(?:&|&amp;)').replace('"', '(?:"|&quot;)').replace(/\s+/g, '\\s+');
}

// Contents of Exception in various browsers.
//
// SAFARI:
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.

12 changes: 6 additions & 6 deletions dist/sri.json
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
{
"@dist/raven.js": {
"hashes": {
"sha256": "GaVHYvmPLfox/Z5Ob1I5FWL3pVAPwZLuPktzwzCxcms=",
"sha512": "SEmxNHXuuNcE69xNoUGYGeNqfDJoip3KO39CZAR5n1UNu1gYNFKF138iQz9d6xq7ZO4jEHH95Nb4zgQpFigkpA=="
"sha256": "TpqBK0HQBnzZ+qRfi/ASOyd3PgaJ4Yu1zkSZxdAt0MQ=",
"sha512": "ig3qYRkj3auHLnnrSrwwD+9QDCdspIm+jtjqZO4qR1Nb0xqUXQxzzO63rItP/w5/aNaDfBSApAZBVUH07pSjSw=="
},
"type": null,
"integrity": "sha256-GaVHYvmPLfox/Z5Ob1I5FWL3pVAPwZLuPktzwzCxcms= sha512-SEmxNHXuuNcE69xNoUGYGeNqfDJoip3KO39CZAR5n1UNu1gYNFKF138iQz9d6xq7ZO4jEHH95Nb4zgQpFigkpA==",
"integrity": "sha256-TpqBK0HQBnzZ+qRfi/ASOyd3PgaJ4Yu1zkSZxdAt0MQ= sha512-ig3qYRkj3auHLnnrSrwwD+9QDCdspIm+jtjqZO4qR1Nb0xqUXQxzzO63rItP/w5/aNaDfBSApAZBVUH07pSjSw==",
"path": "dist/raven.js"
},
"@dist/raven.min.js": {
"hashes": {
"sha256": "YqZhLyo9sB/cpJWaREgvUe+nFUN9qC8h+qdNs8OoAVk=",
"sha512": "s7n51Ike9SKQix2aVAB8KytL5B3H9Uk5LAMY731p6lQtGX9JNgVL3uxqoTDEM/pJ9gxVyO2aJXNAjvFNvrFzrg=="
"sha256": "iAeyHrZnm0YGPY9cNCVUETvopLSP2fNtUjDrquNDFQM=",
"sha512": "xFPCiUPegZDDm6haV4l8y7jqh0IHkyKk5xUaIHaTr9ReIcpaxkqHtYszaZKlomSLn1BWDcb9TeAezv9wllZbUg=="
},
"type": null,
"integrity": "sha256-YqZhLyo9sB/cpJWaREgvUe+nFUN9qC8h+qdNs8OoAVk= sha512-s7n51Ike9SKQix2aVAB8KytL5B3H9Uk5LAMY731p6lQtGX9JNgVL3uxqoTDEM/pJ9gxVyO2aJXNAjvFNvrFzrg==",
"integrity": "sha256-iAeyHrZnm0YGPY9cNCVUETvopLSP2fNtUjDrquNDFQM= sha512-xFPCiUPegZDDm6haV4l8y7jqh0IHkyKk5xUaIHaTr9ReIcpaxkqHtYszaZKlomSLn1BWDcb9TeAezv9wllZbUg==",
"path": "dist/raven.min.js"
}
}
2 changes: 1 addition & 1 deletion docs/sentry-doc-config.json
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,6 @@
}
},
"vars": {
"RAVEN_VERSION": "3.14.0"
"RAVEN_VERSION": "3.14.1"
}
}
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "raven-js",
"version": "3.14.0",
"version": "3.14.1",
"license": "BSD-2-Clause",
"homepage": "https://github.com/getsentry/raven-js",
"scripts": {
Expand Down
2 changes: 1 addition & 1 deletion src/raven.js
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,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.0',
VERSION: '3.14.1',

debug: false,

Expand Down
4 changes: 2 additions & 2 deletions test/raven.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -1092,7 +1092,7 @@ describe('globals', function() {
extra: {'session:duration': 100},
});
assert.deepEqual(opts.auth, {
sentry_client: 'raven-js/3.14.0',
sentry_client: 'raven-js/3.14.1',
sentry_key: 'abc',
sentry_version: '7'
});
Expand Down Expand Up @@ -1139,7 +1139,7 @@ describe('globals', function() {
extra: {'session:duration': 100},
});
assert.deepEqual(opts.auth, {
sentry_client: 'raven-js/3.14.0',
sentry_client: 'raven-js/3.14.1',
sentry_key: 'abc',
sentry_secret: 'def',
sentry_version: '7'
Expand Down

0 comments on commit 5cf57e1

Please sign in to comment.