@sentry/core
Advanced tools
Comparing version 0.5.0-beta.5 to 0.5.0
@@ -72,2 +72,7 @@ "use strict"; | ||
*/ | ||
var DEFAULT_BREADCRUMBS = 30; | ||
/** | ||
* Absolute maximum number of breadcrumbs added to an event. The | ||
* `maxBreadcrumbs` option cannot be higher than this value. | ||
*/ | ||
var MAX_BREADCRUMBS = 100; | ||
@@ -203,4 +208,4 @@ /** | ||
case 0: | ||
_a = this.getOptions(), shouldAddBreadcrumb = _a.shouldAddBreadcrumb, beforeBreadcrumb = _a.beforeBreadcrumb, afterBreadcrumb = _a.afterBreadcrumb, _b = _a.maxBreadcrumbs, maxBreadcrumbs = _b === void 0 ? MAX_BREADCRUMBS : _b; | ||
if (maxBreadcrumbs === 0) { | ||
_a = this.getOptions(), shouldAddBreadcrumb = _a.shouldAddBreadcrumb, beforeBreadcrumb = _a.beforeBreadcrumb, afterBreadcrumb = _a.afterBreadcrumb, _b = _a.maxBreadcrumbs, maxBreadcrumbs = _b === void 0 ? DEFAULT_BREADCRUMBS : _b; | ||
if (maxBreadcrumbs <= 0) { | ||
return [2 /*return*/]; | ||
@@ -219,3 +224,3 @@ } | ||
if (_c.sent()) { | ||
scope.breadcrumbs = __spread(scope.breadcrumbs, [finalBreadcrumb]).slice(-maxBreadcrumbs); | ||
scope.breadcrumbs = __spread(scope.breadcrumbs, [finalBreadcrumb]).slice(-Math.max(0, Math.min(maxBreadcrumbs, MAX_BREADCRUMBS))); | ||
} | ||
@@ -309,3 +314,3 @@ if (afterBreadcrumb) { | ||
return __generator(this, function (_c) { | ||
_a = this.getOptions(), environment = _a.environment, _b = _a.maxBreadcrumbs, maxBreadcrumbs = _b === void 0 ? MAX_BREADCRUMBS : _b, release = _a.release; | ||
_a = this.getOptions(), environment = _a.environment, _b = _a.maxBreadcrumbs, maxBreadcrumbs = _b === void 0 ? DEFAULT_BREADCRUMBS : _b, release = _a.release; | ||
prepared = __assign({ sdk: this.getSdkInfo() }, event); | ||
@@ -320,3 +325,3 @@ if (prepared.environment === undefined && environment !== undefined) { | ||
if (breadcrumbs.length > 0 && maxBreadcrumbs > 0) { | ||
prepared.breadcrumbs = breadcrumbs.slice(-maxBreadcrumbs); | ||
prepared.breadcrumbs = breadcrumbs.slice(-Math.max(0, Math.min(maxBreadcrumbs, MAX_BREADCRUMBS))); | ||
} | ||
@@ -323,0 +328,0 @@ context = scope.context; |
{ | ||
"name": "@sentry/core", | ||
"version": "0.5.0-beta.5", | ||
"version": "0.5.0", | ||
"description": "Base implementation for all Sentry JavaScript SDKs", | ||
@@ -17,3 +17,3 @@ "repository": "https://github.com/getsentry/raven-js/tree/next", | ||
"dependencies": { | ||
"@sentry/shim": "0.5.0-beta.5" | ||
"@sentry/shim": "0.5.0" | ||
}, | ||
@@ -27,3 +27,3 @@ "devDependencies": { | ||
"rimraf": "^2.6.2", | ||
"sinon": "^4.4.9", | ||
"sinon": "^4.5.0", | ||
"tslint": "^5.9.1", | ||
@@ -30,0 +30,0 @@ "typescript": "^2.8.1" |
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
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
88930
1129
+ Added@sentry/shim@0.5.0(transitive)
- Removed@sentry/shim@0.5.0-beta.5(transitive)
Updated@sentry/shim@0.5.0