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

@sentry/core

Package Overview
Dependencies
Maintainers
11
Versions
555
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 7.84.0 to 7.85.0

16

cjs/baseclient.js

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

const envelope = require('./envelope.js');
const hub = require('./hub.js');
const integration = require('./integration.js');

@@ -712,3 +713,18 @@ const session = require('./session.js');

/**
* Add an event processor to the current client.
* This event processor will run for all events processed by this client.
*/
function addEventProcessor(callback) {
const client = hub.getCurrentHub().getClient();
if (!client || !client.addEventProcessor) {
return;
}
client.addEventProcessor(callback);
}
exports.BaseClient = BaseClient;
exports.addEventProcessor = addEventProcessor;
//# sourceMappingURL=baseclient.js.map

4

cjs/eventProcessors.js

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

* Returns the global event processors.
* @deprecated Global event processors will be removed in v8.
*/

@@ -16,5 +17,6 @@ function getGlobalEventProcessors() {

* Add a EventProcessor to be kept globally.
* @param callback EventProcessor to add
* @deprecated Use `addEventProcessor` instead. Global event processors will be removed in v8.
*/
function addGlobalEventProcessor(callback) {
// eslint-disable-next-line deprecation/deprecation
getGlobalEventProcessors().push(callback);

@@ -21,0 +23,0 @@ }

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

exports.BaseClient = baseclient.BaseClient;
exports.addEventProcessor = baseclient.addEventProcessor;
exports.ServerRuntimeClient = serverRuntimeClient.ServerRuntimeClient;

@@ -104,0 +105,0 @@ exports.initAndBind = sdk.initAndBind;

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

if (installedIntegrations.indexOf(integration.name) === -1) {
// eslint-disable-next-line deprecation/deprecation
integration.setupOnce(eventProcessors.addGlobalEventProcessor, hub.getCurrentHub);

@@ -101,0 +102,0 @@ installedIntegrations.push(integration.name);

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

*/
setupOnce(_addGlobaleventProcessor, _getCurrentHub) {
setupOnce(_addGlobalEventProcessor, _getCurrentHub) {
// noop

@@ -44,0 +44,0 @@ }

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

return eventProcessors.notifyEventProcessors(
[...(additionalEventProcessors || []), ...eventProcessors.getGlobalEventProcessors(), ...this._eventProcessors],
[
...(additionalEventProcessors || []),
// eslint-disable-next-line deprecation/deprecation
...eventProcessors.getGlobalEventProcessors(),
...this._eventProcessors,
],
event,

@@ -489,0 +494,0 @@ hint,

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

captureCheckIn(checkIn, monitorConfig, scope) {
const id = checkIn.status !== 'in_progress' && checkIn.checkInId ? checkIn.checkInId : utils.uuid4();
const id = 'checkInId' in checkIn && checkIn.checkInId ? checkIn.checkInId : utils.uuid4();
if (!this._isEnabled()) {

@@ -150,3 +150,3 @@ debugBuild.DEBUG_BUILD && utils.logger.warn('SDK not enabled, will not capture checkin.');

if (checkIn.status !== 'in_progress') {
if ('duration' in checkIn) {
serializedCheckIn.duration = checkIn.duration;

@@ -153,0 +153,0 @@ }

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

*
* It also takes an optional `request` option, which if provided will also be added to the scope & transaction metadata.
* The callback receives a transactionContext that may be used for `startTransaction` or `startSpan`.

@@ -213,0 +212,0 @@ */

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

// TODO (v8): Update the order to be Global > Client
result = eventProcessors.notifyEventProcessors([...clientEventProcessors, ...eventProcessors.getGlobalEventProcessors()], prepared, hint);
result = eventProcessors.notifyEventProcessors(
[
...clientEventProcessors,
// eslint-disable-next-line deprecation/deprecation
...eventProcessors.getGlobalEventProcessors(),
],
prepared,
hint,
);
}

@@ -95,0 +103,0 @@

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

@@ -5,2 +5,3 @@ import { makeDsn, logger, checkOrSetAlreadyCaught, isPrimitive, resolvedSyncPromise, addItemToEnvelope, createAttachmentEnvelopeItem, SyncPromise, rejectedSyncPromise, SentryError, isThenable, isPlainObject } from '@sentry/utils';

import { createEventEnvelope, createSessionEnvelope } from './envelope.js';
import { getCurrentHub } from './hub.js';
import { setupIntegrations, setupIntegration } from './integration.js';

@@ -710,3 +711,17 @@ import { updateSession } from './session.js';

export { BaseClient };
/**
* Add an event processor to the current client.
* This event processor will run for all events processed by this client.
*/
function addEventProcessor(callback) {
const client = getCurrentHub().getClient();
if (!client || !client.addEventProcessor) {
return;
}
client.addEventProcessor(callback);
}
export { BaseClient, addEventProcessor };
//# sourceMappingURL=baseclient.js.map

@@ -6,2 +6,3 @@ import { getGlobalSingleton, SyncPromise, logger, isThenable } from '@sentry/utils';

* Returns the global event processors.
* @deprecated Global event processors will be removed in v8.
*/

@@ -14,5 +15,6 @@ function getGlobalEventProcessors() {

* Add a EventProcessor to be kept globally.
* @param callback EventProcessor to add
* @deprecated Use `addEventProcessor` instead. Global event processors will be removed in v8.
*/
function addGlobalEventProcessor(callback) {
// eslint-disable-next-line deprecation/deprecation
getGlobalEventProcessors().push(callback);

@@ -19,0 +21,0 @@ }

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

export { getEnvelopeEndpointWithUrlEncodedAuth, getReportDialogEndpoint } from './api.js';
export { BaseClient } from './baseclient.js';
export { BaseClient, addEventProcessor } from './baseclient.js';
export { ServerRuntimeClient } from './server-runtime-client.js';

@@ -21,0 +21,0 @@ export { initAndBind } from './sdk.js';

@@ -97,2 +97,3 @@ import { arrayify, logger } from '@sentry/utils';

if (installedIntegrations.indexOf(integration.name) === -1) {
// eslint-disable-next-line deprecation/deprecation
integration.setupOnce(addGlobalEventProcessor, getCurrentHub);

@@ -99,0 +100,0 @@ installedIntegrations.push(integration.name);

@@ -39,3 +39,3 @@ import { logger, getEventDescription, stringMatchesSomePattern } from '@sentry/utils';

*/
setupOnce(_addGlobaleventProcessor, _getCurrentHub) {
setupOnce(_addGlobalEventProcessor, _getCurrentHub) {
// noop

@@ -42,0 +42,0 @@ }

@@ -484,3 +484,8 @@ import { isPlainObject, dateTimestampInSeconds, arrayify, uuid4 } from '@sentry/utils';

return notifyEventProcessors(
[...(additionalEventProcessors || []), ...getGlobalEventProcessors(), ...this._eventProcessors],
[
...(additionalEventProcessors || []),
// eslint-disable-next-line deprecation/deprecation
...getGlobalEventProcessors(),
...this._eventProcessors,
],
event,

@@ -487,0 +492,0 @@ hint,

@@ -130,3 +130,3 @@ import { resolvedSyncPromise, eventFromUnknownInput, eventFromMessage, logger, uuid4 } from '@sentry/utils';

captureCheckIn(checkIn, monitorConfig, scope) {
const id = checkIn.status !== 'in_progress' && checkIn.checkInId ? checkIn.checkInId : uuid4();
const id = 'checkInId' in checkIn && checkIn.checkInId ? checkIn.checkInId : uuid4();
if (!this._isEnabled()) {

@@ -148,3 +148,3 @@ DEBUG_BUILD && logger.warn('SDK not enabled, will not capture checkin.');

if (checkIn.status !== 'in_progress') {
if ('duration' in checkIn) {
serializedCheckIn.duration = checkIn.duration;

@@ -151,0 +151,0 @@ }

@@ -208,3 +208,2 @@ import { isThenable, tracingContextFromHeaders, logger, dropUndefinedKeys } from '@sentry/utils';

*
* It also takes an optional `request` option, which if provided will also be added to the scope & transaction metadata.
* The callback receives a transactionContext that may be used for `startTransaction` or `startSpan`.

@@ -211,0 +210,0 @@ */

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

// TODO (v8): Update the order to be Global > Client
result = notifyEventProcessors([...clientEventProcessors, ...getGlobalEventProcessors()], prepared, hint);
result = notifyEventProcessors(
[
...clientEventProcessors,
// eslint-disable-next-line deprecation/deprecation
...getGlobalEventProcessors(),
],
prepared,
hint,
);
}

@@ -93,0 +101,0 @@

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

const SDK_VERSION = '7.84.0';
const SDK_VERSION = '7.85.0';
export { SDK_VERSION };
//# sourceMappingURL=version.js.map
{
"name": "@sentry/core",
"version": "7.84.0",
"version": "7.85.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.84.0",
"@sentry/utils": "7.84.0"
"@sentry/types": "7.85.0",
"@sentry/utils": "7.85.0"
},
"sideEffects": false
}

@@ -253,2 +253,7 @@ import { Breadcrumb, BreadcrumbHint, Client, ClientOptions, DataCategory, DsnComponents, DynamicSamplingContext, Envelope, Event, EventDropReason, EventHint, EventProcessor, FeedbackEvent, Integration, IntegrationClass, Outcome, SdkMetadata, Session, SessionAggregates, Severity, SeverityLevel, Transaction, Transport, TransportMakeRequestResponse } from '@sentry/types';

}
/**
* Add an event processor to the current client.
* This event processor will run for all events processed by this client.
*/
export declare function addEventProcessor(callback: EventProcessor): void;
//# sourceMappingURL=baseclient.d.ts.map
import { Event, EventHint, EventProcessor } from '@sentry/types';
/**
* Returns the global event processors.
* @deprecated Global event processors will be removed in v8.
*/

@@ -8,3 +9,3 @@ export declare function getGlobalEventProcessors(): EventProcessor[];

* Add a EventProcessor to be kept globally.
* @param callback EventProcessor to add
* @deprecated Use `addEventProcessor` instead. Global event processors will be removed in v8.
*/

@@ -11,0 +12,0 @@ export declare function addGlobalEventProcessor(callback: EventProcessor): void;

@@ -13,5 +13,5 @@ export { ClientClass } from './sdk';

export { Scope } from './scope';
export { addGlobalEventProcessor } from './eventProcessors';
export { addGlobalEventProcessor, } from './eventProcessors';
export { getEnvelopeEndpointWithUrlEncodedAuth, getReportDialogEndpoint } from './api';
export { BaseClient } from './baseclient';
export { BaseClient, addEventProcessor } from './baseclient';
export { ServerRuntimeClient } from './server-runtime-client';

@@ -18,0 +18,0 @@ export { initAndBind } from './sdk';

@@ -27,3 +27,3 @@ import { Client, Event, EventHint, Integration } from '@sentry/types';

*/
setupOnce(_addGlobaleventProcessor: unknown, _getCurrentHub: unknown): void;
setupOnce(_addGlobalEventProcessor: unknown, _getCurrentHub: unknown): void;
/** @inheritDoc */

@@ -30,0 +30,0 @@ processEvent(event: Event, _eventHint: EventHint, client: Client): Event | null;

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

export declare const SDK_VERSION = "7.84.0";
export declare const SDK_VERSION = "7.85.0";
//# sourceMappingURL=version.d.ts.map

@@ -253,2 +253,7 @@ import type { Breadcrumb, BreadcrumbHint, Client, ClientOptions, DataCategory, DsnComponents, DynamicSamplingContext, Envelope, Event, EventDropReason, EventHint, EventProcessor, FeedbackEvent, Integration, IntegrationClass, Outcome, SdkMetadata, Session, SessionAggregates, Severity, SeverityLevel, Transaction, Transport, TransportMakeRequestResponse } from '@sentry/types';

}
/**
* Add an event processor to the current client.
* This event processor will run for all events processed by this client.
*/
export declare function addEventProcessor(callback: EventProcessor): void;
//# sourceMappingURL=baseclient.d.ts.map
import type { Event, EventHint, EventProcessor } from '@sentry/types';
/**
* Returns the global event processors.
* @deprecated Global event processors will be removed in v8.
*/

@@ -8,3 +9,3 @@ export declare function getGlobalEventProcessors(): EventProcessor[];

* Add a EventProcessor to be kept globally.
* @param callback EventProcessor to add
* @deprecated Use `addEventProcessor` instead. Global event processors will be removed in v8.
*/

@@ -11,0 +12,0 @@ export declare function addGlobalEventProcessor(callback: EventProcessor): void;

@@ -13,5 +13,5 @@ export type { ClientClass } from './sdk';

export { Scope } from './scope';
export { addGlobalEventProcessor } from './eventProcessors';
export { addGlobalEventProcessor, } from './eventProcessors';
export { getEnvelopeEndpointWithUrlEncodedAuth, getReportDialogEndpoint } from './api';
export { BaseClient } from './baseclient';
export { BaseClient, addEventProcessor } from './baseclient';
export { ServerRuntimeClient } from './server-runtime-client';

@@ -18,0 +18,0 @@ export { initAndBind } from './sdk';

@@ -27,3 +27,3 @@ import type { Client, Event, EventHint, Integration } from '@sentry/types';

*/
setupOnce(_addGlobaleventProcessor: unknown, _getCurrentHub: unknown): void;
setupOnce(_addGlobalEventProcessor: unknown, _getCurrentHub: unknown): void;
/** @inheritDoc */

@@ -30,0 +30,0 @@ processEvent(event: Event, _eventHint: EventHint, client: Client): Event | null;

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

export declare const SDK_VERSION = "7.84.0";
export declare const SDK_VERSION = "7.85.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

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
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc