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

@sentry/core

Package Overview
Dependencies
Maintainers
12
Versions
553
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 5.11.2 to 5.12.0

11

dist/baseclient.d.ts

@@ -121,2 +121,13 @@ import { Scope } from '@sentry/hub';

/**
* Applies `normalize` function on necessary `Event` attributes to make them safe for serialization.
* Normalized keys:
* - `breadcrumbs.data`
* - `user`
* - `contexts`
* - `extra`
* @param event Event
* @returns Normalized event
*/
protected _normalizeEvent(event: Event | null, depth: number): Event | null;
/**
* This function adds all used integrations to the SDK info in the event.

@@ -123,0 +134,0 @@ * @param sdkInfo The sdkInfo of the event that will be filled with all integrations.

38

dist/baseclient.js

@@ -224,3 +224,4 @@ Object.defineProperty(exports, "__esModule", { value: true });

BaseClient.prototype._prepareEvent = function (event, scope, hint) {
var _a = this.getOptions(), environment = _a.environment, release = _a.release, dist = _a.dist, _b = _a.maxValueLength, maxValueLength = _b === void 0 ? 250 : _b;
var _this = this;
var _a = this.getOptions(), environment = _a.environment, release = _a.release, dist = _a.dist, _b = _a.maxValueLength, maxValueLength = _b === void 0 ? 250 : _b, _c = _a.normalizeDepth, normalizeDepth = _c === void 0 ? 3 : _c;
var prepared = tslib_1.__assign({}, event);

@@ -259,5 +260,38 @@ if (prepared.environment === undefined && environment !== undefined) {

}
return result;
return result.then(function (evt) {
// tslint:disable-next-line:strict-type-predicates
if (typeof normalizeDepth === 'number' && normalizeDepth > 0) {
return _this._normalizeEvent(evt, normalizeDepth);
}
return evt;
});
};
/**
* Applies `normalize` function on necessary `Event` attributes to make them safe for serialization.
* Normalized keys:
* - `breadcrumbs.data`
* - `user`
* - `contexts`
* - `extra`
* @param event Event
* @returns Normalized event
*/
BaseClient.prototype._normalizeEvent = function (event, depth) {
if (!event) {
return null;
}
// tslint:disable:no-unsafe-any
return tslib_1.__assign({}, event, (event.breadcrumbs && {
breadcrumbs: event.breadcrumbs.map(function (b) { return (tslib_1.__assign({}, b, (b.data && {
data: utils_1.normalize(b.data, depth),
}))); }),
}), (event.user && {
user: utils_1.normalize(event.user, depth),
}), (event.contexts && {
contexts: utils_1.normalize(event.contexts, depth),
}), (event.extra && {
extra: utils_1.normalize(event.extra, depth),
}));
};
/**
* This function adds all used integrations to the SDK info in the event.

@@ -264,0 +298,0 @@ * @param sdkInfo The sdkInfo of the event that will be filled with all integrations.

@@ -121,2 +121,13 @@ import { Scope } from '@sentry/hub';

/**
* Applies `normalize` function on necessary `Event` attributes to make them safe for serialization.
* Normalized keys:
* - `breadcrumbs.data`
* - `user`
* - `contexts`
* - `extra`
* @param event Event
* @returns Normalized event
*/
protected _normalizeEvent(event: Event | null, depth: number): Event | null;
/**
* This function adds all used integrations to the SDK info in the event.

@@ -123,0 +134,0 @@ * @param sdkInfo The sdkInfo of the event that will be filled with all integrations.

import * as tslib_1 from "tslib";
import { Dsn, isPrimitive, isThenable, logger, SyncPromise, truncate, uuid4 } from '@sentry/utils';
import { Dsn, isPrimitive, isThenable, logger, normalize, SyncPromise, truncate, uuid4 } from '@sentry/utils';
import { setupIntegrations } from './integration';

@@ -223,3 +223,4 @@ /**

BaseClient.prototype._prepareEvent = function (event, scope, hint) {
var _a = this.getOptions(), environment = _a.environment, release = _a.release, dist = _a.dist, _b = _a.maxValueLength, maxValueLength = _b === void 0 ? 250 : _b;
var _this = this;
var _a = this.getOptions(), environment = _a.environment, release = _a.release, dist = _a.dist, _b = _a.maxValueLength, maxValueLength = _b === void 0 ? 250 : _b, _c = _a.normalizeDepth, normalizeDepth = _c === void 0 ? 3 : _c;
var prepared = tslib_1.__assign({}, event);

@@ -258,5 +259,38 @@ if (prepared.environment === undefined && environment !== undefined) {

}
return result;
return result.then(function (evt) {
// tslint:disable-next-line:strict-type-predicates
if (typeof normalizeDepth === 'number' && normalizeDepth > 0) {
return _this._normalizeEvent(evt, normalizeDepth);
}
return evt;
});
};
/**
* Applies `normalize` function on necessary `Event` attributes to make them safe for serialization.
* Normalized keys:
* - `breadcrumbs.data`
* - `user`
* - `contexts`
* - `extra`
* @param event Event
* @returns Normalized event
*/
BaseClient.prototype._normalizeEvent = function (event, depth) {
if (!event) {
return null;
}
// tslint:disable:no-unsafe-any
return tslib_1.__assign({}, event, (event.breadcrumbs && {
breadcrumbs: event.breadcrumbs.map(function (b) { return (tslib_1.__assign({}, b, (b.data && {
data: normalize(b.data, depth),
}))); }),
}), (event.user && {
user: normalize(event.user, depth),
}), (event.contexts && {
contexts: normalize(event.contexts, depth),
}), (event.extra && {
extra: normalize(event.extra, depth),
}));
};
/**
* This function adds all used integrations to the SDK info in the event.

@@ -263,0 +297,0 @@ * @param sdkInfo The sdkInfo of the event that will be filled with all integrations.

10

package.json
{
"name": "@sentry/core",
"version": "5.11.2",
"version": "5.12.0",
"description": "Base implementation for all Sentry JavaScript SDKs",

@@ -19,6 +19,6 @@ "repository": "git://github.com/getsentry/sentry-javascript.git",

"dependencies": {
"@sentry/hub": "5.11.2",
"@sentry/minimal": "5.11.2",
"@sentry/types": "5.11.0",
"@sentry/utils": "5.11.1",
"@sentry/hub": "5.12.0",
"@sentry/minimal": "5.12.0",
"@sentry/types": "5.12.0",
"@sentry/utils": "5.12.0",
"tslib": "^1.9.3"

@@ -25,0 +25,0 @@ },

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

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