@sentry/core
Advanced tools
Comparing version 5.1.2 to 5.2.0-beta.0
@@ -38,4 +38,2 @@ import { Integration } from '@sentry/types'; | ||
/** JSDoc */ | ||
private _isMatchingPattern; | ||
/** JSDoc */ | ||
private _getPossibleEventMessages; | ||
@@ -42,0 +40,0 @@ /** JSDoc */ |
@@ -76,3 +76,2 @@ "use strict"; | ||
InboundFilters.prototype._isIgnoredError = function (event, options) { | ||
var _this = this; | ||
if (options === void 0) { options = {}; } | ||
@@ -84,3 +83,3 @@ if (!options.ignoreErrors || !options.ignoreErrors.length) { | ||
// Not sure why TypeScript complains here... | ||
return options.ignoreErrors.some(function (pattern) { return _this._isMatchingPattern(message, pattern); }); | ||
return options.ignoreErrors.some(function (pattern) { return utils_1.isMatchingPattern(message, pattern); }); | ||
}); | ||
@@ -90,3 +89,2 @@ }; | ||
InboundFilters.prototype._isBlacklistedUrl = function (event, options) { | ||
var _this = this; | ||
if (options === void 0) { options = {}; } | ||
@@ -98,7 +96,6 @@ // TODO: Use Glob instead? | ||
var url = this._getEventFilterUrl(event); | ||
return !url ? false : options.blacklistUrls.some(function (pattern) { return _this._isMatchingPattern(url, pattern); }); | ||
return !url ? false : options.blacklistUrls.some(function (pattern) { return utils_1.isMatchingPattern(url, pattern); }); | ||
}; | ||
/** JSDoc */ | ||
InboundFilters.prototype._isWhitelistedUrl = function (event, options) { | ||
var _this = this; | ||
if (options === void 0) { options = {}; } | ||
@@ -110,3 +107,3 @@ // TODO: Use Glob instead? | ||
var url = this._getEventFilterUrl(event); | ||
return !url ? true : options.whitelistUrls.some(function (pattern) { return _this._isMatchingPattern(url, pattern); }); | ||
return !url ? true : options.whitelistUrls.some(function (pattern) { return utils_1.isMatchingPattern(url, pattern); }); | ||
}; | ||
@@ -124,12 +121,2 @@ /** JSDoc */ | ||
/** JSDoc */ | ||
InboundFilters.prototype._isMatchingPattern = function (value, pattern) { | ||
if (utils_1.isRegExp(pattern)) { | ||
return pattern.test(value); | ||
} | ||
if (typeof pattern === 'string') { | ||
return value.includes(pattern); | ||
} | ||
return false; | ||
}; | ||
/** JSDoc */ | ||
InboundFilters.prototype._getPossibleEventMessages = function (event) { | ||
@@ -136,0 +123,0 @@ if (event.message) { |
@@ -38,4 +38,2 @@ import { Integration } from '@sentry/types'; | ||
/** JSDoc */ | ||
private _isMatchingPattern; | ||
/** JSDoc */ | ||
private _getPossibleEventMessages; | ||
@@ -42,0 +40,0 @@ /** JSDoc */ |
import * as tslib_1 from "tslib"; | ||
import { addGlobalEventProcessor, getCurrentHub } from '@sentry/hub'; | ||
import { getEventDescription, isRegExp, logger } from '@sentry/utils'; | ||
import { getEventDescription, isMatchingPattern, logger } from '@sentry/utils'; | ||
// "Script error." is hard coded into browsers for errors that it can't read. | ||
@@ -74,3 +74,2 @@ // this is the result of a script being pulled in from an external domain and CORS. | ||
InboundFilters.prototype._isIgnoredError = function (event, options) { | ||
var _this = this; | ||
if (options === void 0) { options = {}; } | ||
@@ -82,3 +81,3 @@ if (!options.ignoreErrors || !options.ignoreErrors.length) { | ||
// Not sure why TypeScript complains here... | ||
return options.ignoreErrors.some(function (pattern) { return _this._isMatchingPattern(message, pattern); }); | ||
return options.ignoreErrors.some(function (pattern) { return isMatchingPattern(message, pattern); }); | ||
}); | ||
@@ -88,3 +87,2 @@ }; | ||
InboundFilters.prototype._isBlacklistedUrl = function (event, options) { | ||
var _this = this; | ||
if (options === void 0) { options = {}; } | ||
@@ -96,7 +94,6 @@ // TODO: Use Glob instead? | ||
var url = this._getEventFilterUrl(event); | ||
return !url ? false : options.blacklistUrls.some(function (pattern) { return _this._isMatchingPattern(url, pattern); }); | ||
return !url ? false : options.blacklistUrls.some(function (pattern) { return isMatchingPattern(url, pattern); }); | ||
}; | ||
/** JSDoc */ | ||
InboundFilters.prototype._isWhitelistedUrl = function (event, options) { | ||
var _this = this; | ||
if (options === void 0) { options = {}; } | ||
@@ -108,3 +105,3 @@ // TODO: Use Glob instead? | ||
var url = this._getEventFilterUrl(event); | ||
return !url ? true : options.whitelistUrls.some(function (pattern) { return _this._isMatchingPattern(url, pattern); }); | ||
return !url ? true : options.whitelistUrls.some(function (pattern) { return isMatchingPattern(url, pattern); }); | ||
}; | ||
@@ -122,12 +119,2 @@ /** JSDoc */ | ||
/** JSDoc */ | ||
InboundFilters.prototype._isMatchingPattern = function (value, pattern) { | ||
if (isRegExp(pattern)) { | ||
return pattern.test(value); | ||
} | ||
if (typeof pattern === 'string') { | ||
return value.includes(pattern); | ||
} | ||
return false; | ||
}; | ||
/** JSDoc */ | ||
InboundFilters.prototype._getPossibleEventMessages = function (event) { | ||
@@ -134,0 +121,0 @@ if (event.message) { |
{ | ||
"name": "@sentry/core", | ||
"version": "5.1.2", | ||
"version": "5.2.0-beta.0", | ||
"description": "Base implementation for all Sentry JavaScript SDKs", | ||
@@ -19,16 +19,16 @@ "repository": "git://github.com/getsentry/sentry-javascript.git", | ||
"dependencies": { | ||
"@sentry/hub": "5.1.2", | ||
"@sentry/minimal": "5.1.2", | ||
"@sentry/types": "5.1.0", | ||
"@sentry/utils": "5.1.2", | ||
"@sentry/hub": "5.2.0-beta.0", | ||
"@sentry/minimal": "5.2.0-beta.0", | ||
"@sentry/types": "5.2.0-beta.0", | ||
"@sentry/utils": "5.2.0-beta.0", | ||
"tslib": "^1.9.3" | ||
}, | ||
"devDependencies": { | ||
"jest": "^24.5.0", | ||
"jest": "^24.7.1", | ||
"npm-run-all": "^4.1.2", | ||
"prettier": "^1.16.4", | ||
"prettier": "^1.17.0", | ||
"prettier-check": "^2.0.0", | ||
"rimraf": "^2.6.3", | ||
"tslint": "^5.14.0", | ||
"typescript": "^3.3.3333" | ||
"tslint": "^5.16.0", | ||
"typescript": "^3.4.5" | ||
}, | ||
@@ -35,0 +35,0 @@ "scripts": { |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
244944
2625
1
+ Added@sentry/hub@5.2.0-beta.0(transitive)
+ Added@sentry/minimal@5.2.0-beta.0(transitive)
+ Added@sentry/types@5.2.0-beta.0(transitive)
+ Added@sentry/utils@5.2.0-beta.0(transitive)
- Removed@sentry/hub@5.1.2(transitive)
- Removed@sentry/minimal@5.1.2(transitive)
- Removed@sentry/types@5.1.0(transitive)
- Removed@sentry/utils@5.1.2(transitive)
Updated@sentry/hub@5.2.0-beta.0
Updated@sentry/minimal@5.2.0-beta.0
Updated@sentry/types@5.2.0-beta.0
Updated@sentry/utils@5.2.0-beta.0