Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@sentry/core

Package Overview
Dependencies
Maintainers
9
Versions
533
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@sentry/core - npm Package Compare versions

Comparing version 0.5.0-beta.5 to 0.5.0

15

dist/base.js

@@ -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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc