Skip to content

Commit 5cf57e1

Browse files
authored
3.14.1 (#933)
1 parent 21187de commit 5cf57e1

20 files changed

+51
-61
lines changed

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
# Changelog
22

3+
## 3.14.1
4+
* BUGFIX: Fix TypeError caused by breadcrumb URL truncation in some situations. See: https://github.com/getsentry/raven-js/issues/925
5+
* BUGFIX: Made URL truncation more defensive for some rare cases. See: https://github.com/getsentry/raven-js/pull/918
6+
* BUGFIX: Raven.js now treats DOMExceptions as "Error" objects w/ traces. See: https://github.com/getsentry/raven-js/pull/919/
7+
* CHANGE: Remove unused/deprecated escape functions in vendored TraceKit.js. See: https://github.com/getsentry/raven-js/pull/923
8+
* CHANGE: Removed json-stringify-safe from package.json (was already vendored). See: https://github.com/getsentry/raven-js/pull/917
9+
310
## 3.14.0
411
* 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
512
* 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

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.14.0",
3+
"version": "3.14.1",
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.14.0 (6b817d7) | github.com/getsentry/raven-js */
1+
/*! Raven.js 3.14.1 (21187de) | 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.14.0 (6b817d7) | github.com/getsentry/raven-js */
1+
/*! Raven.js 3.14.1 (21187de) | 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.14.0 (6b817d7) | github.com/getsentry/raven-js */
1+
/*! Raven.js 3.14.1 (21187de) | 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.14.0 (6b817d7) | github.com/getsentry/raven-js */
1+
/*! Raven.js 3.14.1 (21187de) | 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: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/*! Raven.js 3.14.0 (6b817d7) | github.com/getsentry/raven-js */
1+
/*! Raven.js 3.14.1 (21187de) | github.com/getsentry/raven-js */
22

33
/*
44
* Includes TraceKit

dist/plugins/vue.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/raven.js

Lines changed: 19 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/*! Raven.js 3.14.0 (6b817d7) | github.com/getsentry/raven-js */
1+
/*! Raven.js 3.14.1 (21187de) | github.com/getsentry/raven-js */
22

33
/*
44
* Includes TraceKit
@@ -155,7 +155,7 @@ Raven.prototype = {
155155
// webpack (using a build step causes webpack #1617). Grunt verifies that
156156
// this value matches package.json during build.
157157
// See: https://github.com/getsentry/raven-js/issues/465
158-
VERSION: '3.14.0',
158+
VERSION: '3.14.1',
159159

160160
debug: false,
161161

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

1421-
for (var i = 0; i < breadcrumbs.values.length; i++) {
1422+
for (var i = 0; i < breadcrumbs.values.length; ++i) {
14221423
crumb = breadcrumbs.values[i];
1423-
if (!crumb.hasOwnProperty('data'))
1424+
if (!crumb.hasOwnProperty('data') || !isObject(crumb.data))
14241425
continue;
14251426

14261427
data = crumb.data;
1427-
for (var prop in urlprops) {
1428-
if (data.hasOwnProperty(prop)) {
1429-
data[prop] = truncate(data[prop], this._globalOptions.maxUrlLength);
1428+
for (var j = 0; j < urlProps.length; ++j) {
1429+
urlProp = urlProps[j];
1430+
if (data.hasOwnProperty(urlProp)) {
1431+
data[urlProp] = truncate(data[urlProp], this._globalOptions.maxUrlLength);
14301432
}
14311433
}
14321434
}
@@ -2127,20 +2129,22 @@ function isObject(what) {
21272129
return typeof what === 'object' && what !== null;
21282130
}
21292131

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

21402143
module.exports = {
21412144
isObject: isObject,
21422145
isError: isError
21432146
};
2147+
21442148
},{}],6:[function(_dereq_,module,exports){
21452149
(function (global){
21462150
'use strict';
@@ -2468,27 +2472,6 @@ TraceKit.report = (function reportModuleWrapper() {
24682472
*
24692473
*/
24702474
TraceKit.computeStackTrace = (function computeStackTraceWrapper() {
2471-
/**
2472-
* Escapes special characters, except for whitespace, in a string to be
2473-
* used inside a regular expression as a string literal.
2474-
* @param {string} text The string.
2475-
* @return {string} The escaped string literal.
2476-
*/
2477-
function escapeRegExp(text) {
2478-
return text.replace(/[\-\[\]{}()*+?.,\\\^$|#]/g, '\\$&');
2479-
}
2480-
2481-
/**
2482-
* Escapes special characters in a string to be used inside a regular
2483-
* expression as a string literal. Also ensures that HTML entities will
2484-
* be matched the same as their literal friends.
2485-
* @param {string} body The string.
2486-
* @return {string} The escaped string.
2487-
*/
2488-
function escapeCodeAsRegExpForMatchingInsideHTML(body) {
2489-
return escapeRegExp(body).replace('<', '(?:<|&lt;)').replace('>', '(?:>|&gt;)').replace('&', '(?:&|&amp;)').replace('"', '(?:"|&quot;)').replace(/\s+/g, '\\s+');
2490-
}
2491-
24922475
// Contents of Exception in various browsers.
24932476
//
24942477
// SAFARI:

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.

dist/sri.json

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,20 @@
11
{
22
"@dist/raven.js": {
33
"hashes": {
4-
"sha256": "GaVHYvmPLfox/Z5Ob1I5FWL3pVAPwZLuPktzwzCxcms=",
5-
"sha512": "SEmxNHXuuNcE69xNoUGYGeNqfDJoip3KO39CZAR5n1UNu1gYNFKF138iQz9d6xq7ZO4jEHH95Nb4zgQpFigkpA=="
4+
"sha256": "TpqBK0HQBnzZ+qRfi/ASOyd3PgaJ4Yu1zkSZxdAt0MQ=",
5+
"sha512": "ig3qYRkj3auHLnnrSrwwD+9QDCdspIm+jtjqZO4qR1Nb0xqUXQxzzO63rItP/w5/aNaDfBSApAZBVUH07pSjSw=="
66
},
77
"type": null,
8-
"integrity": "sha256-GaVHYvmPLfox/Z5Ob1I5FWL3pVAPwZLuPktzwzCxcms= sha512-SEmxNHXuuNcE69xNoUGYGeNqfDJoip3KO39CZAR5n1UNu1gYNFKF138iQz9d6xq7ZO4jEHH95Nb4zgQpFigkpA==",
8+
"integrity": "sha256-TpqBK0HQBnzZ+qRfi/ASOyd3PgaJ4Yu1zkSZxdAt0MQ= sha512-ig3qYRkj3auHLnnrSrwwD+9QDCdspIm+jtjqZO4qR1Nb0xqUXQxzzO63rItP/w5/aNaDfBSApAZBVUH07pSjSw==",
99
"path": "dist/raven.js"
1010
},
1111
"@dist/raven.min.js": {
1212
"hashes": {
13-
"sha256": "YqZhLyo9sB/cpJWaREgvUe+nFUN9qC8h+qdNs8OoAVk=",
14-
"sha512": "s7n51Ike9SKQix2aVAB8KytL5B3H9Uk5LAMY731p6lQtGX9JNgVL3uxqoTDEM/pJ9gxVyO2aJXNAjvFNvrFzrg=="
13+
"sha256": "iAeyHrZnm0YGPY9cNCVUETvopLSP2fNtUjDrquNDFQM=",
14+
"sha512": "xFPCiUPegZDDm6haV4l8y7jqh0IHkyKk5xUaIHaTr9ReIcpaxkqHtYszaZKlomSLn1BWDcb9TeAezv9wllZbUg=="
1515
},
1616
"type": null,
17-
"integrity": "sha256-YqZhLyo9sB/cpJWaREgvUe+nFUN9qC8h+qdNs8OoAVk= sha512-s7n51Ike9SKQix2aVAB8KytL5B3H9Uk5LAMY731p6lQtGX9JNgVL3uxqoTDEM/pJ9gxVyO2aJXNAjvFNvrFzrg==",
17+
"integrity": "sha256-iAeyHrZnm0YGPY9cNCVUETvopLSP2fNtUjDrquNDFQM= sha512-xFPCiUPegZDDm6haV4l8y7jqh0IHkyKk5xUaIHaTr9ReIcpaxkqHtYszaZKlomSLn1BWDcb9TeAezv9wllZbUg==",
1818
"path": "dist/raven.min.js"
1919
}
2020
}

docs/sentry-doc-config.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,6 @@
6666
}
6767
},
6868
"vars": {
69-
"RAVEN_VERSION": "3.14.0"
69+
"RAVEN_VERSION": "3.14.1"
7070
}
7171
}

package.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.14.0",
3+
"version": "3.14.1",
44
"license": "BSD-2-Clause",
55
"homepage": "https://github.com/getsentry/raven-js",
66
"scripts": {

src/raven.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ Raven.prototype = {
9090
// webpack (using a build step causes webpack #1617). Grunt verifies that
9191
// this value matches package.json during build.
9292
// See: https://github.com/getsentry/raven-js/issues/465
93-
VERSION: '3.14.0',
93+
VERSION: '3.14.1',
9494

9595
debug: false,
9696

test/raven.test.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1092,7 +1092,7 @@ describe('globals', function() {
10921092
extra: {'session:duration': 100},
10931093
});
10941094
assert.deepEqual(opts.auth, {
1095-
sentry_client: 'raven-js/3.14.0',
1095+
sentry_client: 'raven-js/3.14.1',
10961096
sentry_key: 'abc',
10971097
sentry_version: '7'
10981098
});
@@ -1139,7 +1139,7 @@ describe('globals', function() {
11391139
extra: {'session:duration': 100},
11401140
});
11411141
assert.deepEqual(opts.auth, {
1142-
sentry_client: 'raven-js/3.14.0',
1142+
sentry_client: 'raven-js/3.14.1',
11431143
sentry_key: 'abc',
11441144
sentry_secret: 'def',
11451145
sentry_version: '7'

0 commit comments

Comments
 (0)