Socket
Socket
Sign inDemoInstall

@sentry/core

Package Overview
Dependencies
2
Maintainers
11
Versions
476
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 7.86.0 to 7.87.0

8

cjs/exports.js

@@ -292,2 +292,9 @@ Object.defineProperty(exports, '__esModule', { value: true });

/**
* Get the currently active scope.
*/
function getCurrentScope() {
return hub.getCurrentHub().getScope();
}
exports.addBreadcrumb = addBreadcrumb;

@@ -302,2 +309,3 @@ exports.captureCheckIn = captureCheckIn;

exports.getClient = getClient;
exports.getCurrentScope = getCurrentScope;
exports.lastEventId = lastEventId;

@@ -304,0 +312,0 @@ exports.setContext = setContext;

8

cjs/hub.js

@@ -72,8 +72,8 @@ Object.defineProperty(exports, '__esModule', { value: true });

// We want to clone the content of prev scope
const scope$1 = scope.Scope.clone(this.getScope());
const scope = this.getScope().clone();
this.getStack().push({
client: this.getClient(),
scope: scope$1,
scope,
});
return scope$1;
return scope;
}

@@ -509,3 +509,3 @@

const globalHubTopStack = parent.getStackTop();
setHubOnCarrier(carrier, new Hub(globalHubTopStack.client, scope.Scope.clone(globalHubTopStack.scope)));
setHubOnCarrier(carrier, new Hub(globalHubTopStack.client, globalHubTopStack.scope.clone()));
}

@@ -512,0 +512,0 @@ }

@@ -74,2 +74,3 @@ Object.defineProperty(exports, '__esModule', { value: true });

exports.getClient = exports$1.getClient;
exports.getCurrentScope = exports$1.getCurrentScope;
exports.lastEventId = exports$1.lastEventId;

@@ -76,0 +77,0 @@ exports.setContext = exports$1.setContext;

@@ -73,23 +73,29 @@ Object.defineProperty(exports, '__esModule', { value: true });

* Inherit values from the parent scope.
* @param scope to clone.
* @deprecated Use `scope.clone()` and `new Scope()` instead.
*/
static clone(scope) {
return scope ? scope.clone() : new Scope();
}
/**
* Clone this scope instance.
*/
clone() {
const newScope = new Scope();
if (scope) {
newScope._breadcrumbs = [...scope._breadcrumbs];
newScope._tags = { ...scope._tags };
newScope._extra = { ...scope._extra };
newScope._contexts = { ...scope._contexts };
newScope._user = scope._user;
newScope._level = scope._level;
newScope._span = scope._span;
newScope._session = scope._session;
newScope._transactionName = scope._transactionName;
newScope._fingerprint = scope._fingerprint;
newScope._eventProcessors = [...scope._eventProcessors];
newScope._requestSession = scope._requestSession;
newScope._attachments = [...scope._attachments];
newScope._sdkProcessingMetadata = { ...scope._sdkProcessingMetadata };
newScope._propagationContext = { ...scope._propagationContext };
}
newScope._breadcrumbs = [...this._breadcrumbs];
newScope._tags = { ...this._tags };
newScope._extra = { ...this._extra };
newScope._contexts = { ...this._contexts };
newScope._user = this._user;
newScope._level = this._level;
newScope._span = this._span;
newScope._session = this._session;
newScope._transactionName = this._transactionName;
newScope._fingerprint = this._fingerprint;
newScope._eventProcessors = [...this._eventProcessors];
newScope._requestSession = this._requestSession;
newScope._attachments = [...this._attachments];
newScope._sdkProcessingMetadata = { ...this._sdkProcessingMetadata };
newScope._propagationContext = { ...this._propagationContext };
return newScope;

@@ -96,0 +102,0 @@ }

@@ -35,3 +35,3 @@ Object.defineProperty(exports, '__esModule', { value: true });

hint,
scope$1,
scope,
client,

@@ -57,6 +57,3 @@ ) {

// This allows us to prevent unnecessary copying of data if `captureContext` is not provided.
let finalScope = scope$1;
if (hint.captureContext) {
finalScope = scope.Scope.clone(finalScope).update(hint.captureContext);
}
const finalScope = getFinalScope(scope, hint.captureContext);

@@ -333,2 +330,12 @@ if (hint.mechanism) {

function getFinalScope(scope$1, captureContext) {
if (!captureContext) {
return scope$1;
}
const finalScope = scope$1 ? scope$1.clone() : new scope.Scope();
finalScope.update(captureContext);
return finalScope;
}
/**

@@ -335,0 +342,0 @@ * Parse either an `EventHint` directly, or convert a `CaptureContext` to an `EventHint`.

Object.defineProperty(exports, '__esModule', { value: true });
const SDK_VERSION = '7.86.0';
const SDK_VERSION = '7.87.0';
exports.SDK_VERSION = SDK_VERSION;
//# sourceMappingURL=version.js.map

@@ -290,3 +290,10 @@ import { logger, uuid4, timestampInSeconds, isThenable } from '@sentry/utils';

export { addBreadcrumb, captureCheckIn, captureEvent, captureException, captureMessage, close, configureScope, flush, getClient, lastEventId, setContext, setExtra, setExtras, setTag, setTags, setUser, startTransaction, withMonitor, withScope };
/**
* Get the currently active scope.
*/
function getCurrentScope() {
return getCurrentHub().getScope();
}
export { addBreadcrumb, captureCheckIn, captureEvent, captureException, captureMessage, close, configureScope, flush, getClient, getCurrentScope, lastEventId, setContext, setExtra, setExtras, setTag, setTags, setUser, startTransaction, withMonitor, withScope };
//# sourceMappingURL=exports.js.map

@@ -70,3 +70,3 @@ import { uuid4, dateTimestampInSeconds, consoleSandbox, logger, GLOBAL_OBJ, getGlobalSingleton } from '@sentry/utils';

// We want to clone the content of prev scope
const scope = Scope.clone(this.getScope());
const scope = this.getScope().clone();
this.getStack().push({

@@ -507,3 +507,3 @@ client: this.getClient(),

const globalHubTopStack = parent.getStackTop();
setHubOnCarrier(carrier, new Hub(globalHubTopStack.client, Scope.clone(globalHubTopStack.scope)));
setHubOnCarrier(carrier, new Hub(globalHubTopStack.client, globalHubTopStack.scope.clone()));
}

@@ -510,0 +510,0 @@ }

@@ -11,3 +11,3 @@ export { addTracingExtensions, startIdleTransaction } from './tracing/hubextensions.js';

export { createEventEnvelope } from './envelope.js';
export { addBreadcrumb, captureCheckIn, captureEvent, captureException, captureMessage, close, configureScope, flush, getClient, lastEventId, setContext, setExtra, setExtras, setTag, setTags, setUser, startTransaction, withMonitor, withScope } from './exports.js';
export { addBreadcrumb, captureCheckIn, captureEvent, captureException, captureMessage, close, configureScope, flush, getClient, getCurrentScope, lastEventId, setContext, setExtra, setExtras, setTag, setTags, setUser, startTransaction, withMonitor, withScope } from './exports.js';
export { Hub, ensureHubOnCarrier, getCurrentHub, getHubFromCarrier, getMainCarrier, makeMain, runWithAsyncContext, setAsyncContextStrategy, setHubOnCarrier } from './hub.js';

@@ -14,0 +14,0 @@ export { closeSession, makeSession, updateSession } from './session.js';

@@ -71,23 +71,29 @@ import { isPlainObject, dateTimestampInSeconds, arrayify, uuid4 } from '@sentry/utils';

* Inherit values from the parent scope.
* @param scope to clone.
* @deprecated Use `scope.clone()` and `new Scope()` instead.
*/
static clone(scope) {
return scope ? scope.clone() : new Scope();
}
/**
* Clone this scope instance.
*/
clone() {
const newScope = new Scope();
if (scope) {
newScope._breadcrumbs = [...scope._breadcrumbs];
newScope._tags = { ...scope._tags };
newScope._extra = { ...scope._extra };
newScope._contexts = { ...scope._contexts };
newScope._user = scope._user;
newScope._level = scope._level;
newScope._span = scope._span;
newScope._session = scope._session;
newScope._transactionName = scope._transactionName;
newScope._fingerprint = scope._fingerprint;
newScope._eventProcessors = [...scope._eventProcessors];
newScope._requestSession = scope._requestSession;
newScope._attachments = [...scope._attachments];
newScope._sdkProcessingMetadata = { ...scope._sdkProcessingMetadata };
newScope._propagationContext = { ...scope._propagationContext };
}
newScope._breadcrumbs = [...this._breadcrumbs];
newScope._tags = { ...this._tags };
newScope._extra = { ...this._extra };
newScope._contexts = { ...this._contexts };
newScope._user = this._user;
newScope._level = this._level;
newScope._span = this._span;
newScope._session = this._session;
newScope._transactionName = this._transactionName;
newScope._fingerprint = this._fingerprint;
newScope._eventProcessors = [...this._eventProcessors];
newScope._requestSession = this._requestSession;
newScope._attachments = [...this._attachments];
newScope._sdkProcessingMetadata = { ...this._sdkProcessingMetadata };
newScope._propagationContext = { ...this._propagationContext };
return newScope;

@@ -94,0 +100,0 @@ }

@@ -54,6 +54,3 @@ import { uuid4, dateTimestampInSeconds, addExceptionMechanism, resolvedSyncPromise, truncate, GLOBAL_OBJ, normalize } from '@sentry/utils';

// This allows us to prevent unnecessary copying of data if `captureContext` is not provided.
let finalScope = scope;
if (hint.captureContext) {
finalScope = Scope.clone(finalScope).update(hint.captureContext);
}
const finalScope = getFinalScope(scope, hint.captureContext);

@@ -330,2 +327,12 @@ if (hint.mechanism) {

function getFinalScope(scope, captureContext) {
if (!captureContext) {
return scope;
}
const finalScope = scope ? scope.clone() : new Scope();
finalScope.update(captureContext);
return finalScope;
}
/**

@@ -332,0 +339,0 @@ * Parse either an `EventHint` directly, or convert a `CaptureContext` to an `EventHint`.

@@ -1,4 +0,4 @@

const SDK_VERSION = '7.86.0';
const SDK_VERSION = '7.87.0';
export { SDK_VERSION };
//# sourceMappingURL=version.js.map
{
"name": "@sentry/core",
"version": "7.86.0",
"version": "7.87.0",
"description": "Base implementation for all Sentry JavaScript SDKs",

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

"dependencies": {
"@sentry/types": "7.86.0",
"@sentry/utils": "7.86.0"
"@sentry/types": "7.87.0",
"@sentry/utils": "7.87.0"
},
"sideEffects": false
}

@@ -160,2 +160,6 @@ import { Breadcrumb, CaptureContext, CheckIn, Client, CustomSamplingContext, Event, EventHint, Extra, Extras, MonitorConfig, Primitive, Severity, SeverityLevel, TransactionContext, User } from '@sentry/types';

export declare function getClient<C extends Client>(): C | undefined;
/**
* Get the currently active scope.
*/
export declare function getCurrentScope(): Scope;
//# sourceMappingURL=exports.d.ts.map

@@ -8,3 +8,3 @@ export { ClientClass } from './sdk';

export { createEventEnvelope } from './envelope';
export { addBreadcrumb, captureCheckIn, withMonitor, captureException, captureEvent, captureMessage, close, configureScope, flush, lastEventId, startTransaction, setContext, setExtra, setExtras, setTag, setTags, setUser, withScope, getClient, } from './exports';
export { addBreadcrumb, captureCheckIn, withMonitor, captureException, captureEvent, captureMessage, close, configureScope, flush, lastEventId, startTransaction, setContext, setExtra, setExtras, setTag, setTags, setUser, withScope, getClient, getCurrentScope, } from './exports';
export { getCurrentHub, getHubFromCarrier, Hub, makeMain, getMainCarrier, runWithAsyncContext, setHubOnCarrier, ensureHubOnCarrier, setAsyncContextStrategy, } from './hub';

@@ -11,0 +11,0 @@ export { makeSession, closeSession, updateSession } from './session';

@@ -51,6 +51,10 @@ import { Attachment, Breadcrumb, CaptureContext, Context, Contexts, Event, EventHint, EventProcessor, Extra, Extras, Primitive, PropagationContext, RequestSession, Scope as ScopeInterface, Session, Severity, SeverityLevel, Span, Transaction, User } from '@sentry/types';

* Inherit values from the parent scope.
* @param scope to clone.
* @deprecated Use `scope.clone()` and `new Scope()` instead.
*/
static clone(scope?: Scope): Scope;
/**
* Clone this scope instance.
*/
clone(): Scope;
/**
* Add internal on change listener. Used for sub SDKs that need to store the scope.

@@ -57,0 +61,0 @@ * @hidden

@@ -1,2 +0,2 @@

export declare const SDK_VERSION = "7.86.0";
export declare const SDK_VERSION = "7.87.0";
//# sourceMappingURL=version.d.ts.map

@@ -160,2 +160,6 @@ import type { Breadcrumb, CaptureContext, CheckIn, Client, CustomSamplingContext, Event, EventHint, Extra, Extras, MonitorConfig, Primitive, Severity, SeverityLevel, TransactionContext, User } from '@sentry/types';

export declare function getClient<C extends Client>(): C | undefined;
/**
* Get the currently active scope.
*/
export declare function getCurrentScope(): Scope;
//# sourceMappingURL=exports.d.ts.map

@@ -8,3 +8,3 @@ export type { ClientClass } from './sdk';

export { createEventEnvelope } from './envelope';
export { addBreadcrumb, captureCheckIn, withMonitor, captureException, captureEvent, captureMessage, close, configureScope, flush, lastEventId, startTransaction, setContext, setExtra, setExtras, setTag, setTags, setUser, withScope, getClient, } from './exports';
export { addBreadcrumb, captureCheckIn, withMonitor, captureException, captureEvent, captureMessage, close, configureScope, flush, lastEventId, startTransaction, setContext, setExtra, setExtras, setTag, setTags, setUser, withScope, getClient, getCurrentScope, } from './exports';
export { getCurrentHub, getHubFromCarrier, Hub, makeMain, getMainCarrier, runWithAsyncContext, setHubOnCarrier, ensureHubOnCarrier, setAsyncContextStrategy, } from './hub';

@@ -11,0 +11,0 @@ export { makeSession, closeSession, updateSession } from './session';

@@ -51,6 +51,10 @@ import type { Attachment, Breadcrumb, CaptureContext, Context, Contexts, Event, EventHint, EventProcessor, Extra, Extras, Primitive, PropagationContext, RequestSession, Scope as ScopeInterface, Session, Severity, SeverityLevel, Span, Transaction, User } from '@sentry/types';

* Inherit values from the parent scope.
* @param scope to clone.
* @deprecated Use `scope.clone()` and `new Scope()` instead.
*/
static clone(scope?: Scope): Scope;
/**
* Clone this scope instance.
*/
clone(): Scope;
/**
* Add internal on change listener. Used for sub SDKs that need to store the scope.

@@ -57,0 +61,0 @@ * @hidden

@@ -1,2 +0,2 @@

export declare const SDK_VERSION = "7.86.0";
export declare const SDK_VERSION = "7.87.0";
//# sourceMappingURL=version.d.ts.map

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

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

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

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc