🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Book a DemoInstallSign in
Socket

@sentry/utils

Package Overview
Dependencies
Maintainers
11
Versions
545
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@sentry/utils - npm Package Compare versions

Comparing version

to
8.6.0

cjs/version.js

2

cjs/index.js

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

const propagationContext = require('./propagationContext.js');
const version = require('./version.js');
const escapeStringForRegex = require('./vendor/escapeStringForRegex.js');

@@ -214,4 +215,5 @@ const supportsHistory = require('./vendor/supportsHistory.js');

exports.generatePropagationContext = propagationContext.generatePropagationContext;
exports.SDK_VERSION = version.SDK_VERSION;
exports.escapeStringForRegex = escapeStringForRegex.escapeStringForRegex;
exports.supportsHistory = supportsHistory.supportsHistory;
//# sourceMappingURL=index.js.map

8

cjs/worldwide.js
Object.defineProperty(exports, '__esModule', { value: true });
/** Internal global with common properties and Sentry extensions */
const version = require('./version.js');

@@ -9,3 +9,3 @@ /** Get's the global object for the current JavaScript runtime */

/**
* Returns a global singleton contained in the global `__SENTRY__` object.
* Returns a global singleton contained in the global `__SENTRY__[]` object.
*

@@ -23,4 +23,4 @@ * If the singleton doesn't already exist in `__SENTRY__`, it will be created using the given factory

const __SENTRY__ = (gbl.__SENTRY__ = gbl.__SENTRY__ || {});
const singleton = __SENTRY__[name] || (__SENTRY__[name] = creator());
return singleton;
const versionedCarrier = (__SENTRY__[version.SDK_VERSION] = __SENTRY__[version.SDK_VERSION] || {});
return versionedCarrier[name] || (versionedCarrier[name] = creator());
}

@@ -27,0 +27,0 @@

@@ -47,4 +47,5 @@ export { applyAggregateErrorsToEvent } from './aggregate-errors.js';

export { generatePropagationContext } from './propagationContext.js';
export { SDK_VERSION } from './version.js';
export { escapeStringForRegex } from './vendor/escapeStringForRegex.js';
export { supportsHistory } from './vendor/supportsHistory.js';
//# sourceMappingURL=index.js.map

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

/** Internal global with common properties and Sentry extensions */
import { SDK_VERSION } from './version.js';

@@ -7,3 +7,3 @@ /** Get's the global object for the current JavaScript runtime */

/**
* Returns a global singleton contained in the global `__SENTRY__` object.
* Returns a global singleton contained in the global `__SENTRY__[]` object.
*

@@ -21,4 +21,4 @@ * If the singleton doesn't already exist in `__SENTRY__`, it will be created using the given factory

const __SENTRY__ = (gbl.__SENTRY__ = gbl.__SENTRY__ || {});
const singleton = __SENTRY__[name] || (__SENTRY__[name] = creator());
return singleton;
const versionedCarrier = (__SENTRY__[SDK_VERSION] = __SENTRY__[SDK_VERSION] || {});
return versionedCarrier[name] || (versionedCarrier[name] = creator());
}

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

{
"name": "@sentry/utils",
"version": "8.5.0",
"version": "8.6.0",
"description": "Utilities for all Sentry JavaScript SDKs",

@@ -45,3 +45,3 @@ "repository": "git://github.com/getsentry/sentry-javascript.git",

"dependencies": {
"@sentry/types": "8.5.0"
"@sentry/types": "8.6.0"
},

@@ -48,0 +48,0 @@ "devDependencies": {

@@ -38,2 +38,3 @@ export * from './aggregate-errors';

export * from './propagationContext';
export * from './version';
//# sourceMappingURL=index.d.ts.map

@@ -14,4 +14,25 @@ /**

import { SdkSource } from './env';
interface SentryCarrier {
acs?: any;
stack?: any;
globalScope?: Scope;
defaultIsolationScope?: Scope;
defaultCurrentScope?: Scope;
globalMetricsAggregators: WeakMap<Client, MetricsAggregator> | undefined;
/** Overwrites TextEncoder used in `@sentry/utils`, need for `react-native@0.73` and older */
encodePolyfill?: (input: string) => Uint8Array;
/** Overwrites TextDecoder used in `@sentry/utils`, need for `react-native@0.73` and older */
decodePolyfill?: (input: Uint8Array) => string;
}
type BackwardsCompatibleSentryCarrier = SentryCarrier & {
hub: any;
integrations?: any[];
logger: any;
extensions?: {
/** Extension methods for the hub, which are bound to the current Hub instance */
[key: string]: Function;
};
};
/** Internal global with common properties and Sentry extensions */
export interface InternalGlobal {
export type InternalGlobal = {
navigator?: {

@@ -44,18 +65,5 @@ userAgent?: string;

_sentryDebugIds?: Record<string, string>;
__SENTRY__: {
hub: any;
logger: any;
extensions?: {
/** Extension methods for the hub, which are bound to the current Hub instance */
[key: string]: Function;
};
globalScope: Scope | undefined;
defaultCurrentScope: Scope | undefined;
defaultIsolationScope: Scope | undefined;
globalMetricsAggregators: WeakMap<Client, MetricsAggregator> | undefined;
/** Overwrites TextEncoder used in `@sentry/utils`, need for `react-native@0.73` and older */
encodePolyfill?: (input: string) => Uint8Array;
/** Overwrites TextDecoder used in `@sentry/utils`, need for `react-native@0.73` and older */
decodePolyfill?: (input: Uint8Array) => string;
};
__SENTRY__: Record<Exclude<string, 'version'>, SentryCarrier> & {
version?: string;
} & BackwardsCompatibleSentryCarrier;
/**

@@ -68,7 +76,7 @@ * Raw module metadata that is injected by bundler plugins.

_sentryEsmLoaderHookRegistered?: boolean;
}
};
/** Get's the global object for the current JavaScript runtime */
export declare const GLOBAL_OBJ: InternalGlobal;
/**
* Returns a global singleton contained in the global `__SENTRY__` object.
* Returns a global singleton contained in the global `__SENTRY__[]` object.
*

@@ -83,3 +91,4 @@ * If the singleton doesn't already exist in `__SENTRY__`, it will be created using the given factory

*/
export declare function getGlobalSingleton<T>(name: keyof InternalGlobal['__SENTRY__'], creator: () => T, obj?: unknown): T;
export declare function getGlobalSingleton<T>(name: keyof SentryCarrier, creator: () => T, obj?: unknown): T;
export {};
//# sourceMappingURL=worldwide.d.ts.map

@@ -38,2 +38,3 @@ export * from './aggregate-errors';

export * from './propagationContext';
export * from './version';
//# sourceMappingURL=index.d.ts.map

@@ -14,4 +14,25 @@ /**

import type { SdkSource } from './env';
interface SentryCarrier {
acs?: any;
stack?: any;
globalScope?: Scope;
defaultIsolationScope?: Scope;
defaultCurrentScope?: Scope;
globalMetricsAggregators: WeakMap<Client, MetricsAggregator> | undefined;
/** Overwrites TextEncoder used in `@sentry/utils`, need for `react-native@0.73` and older */
encodePolyfill?: (input: string) => Uint8Array;
/** Overwrites TextDecoder used in `@sentry/utils`, need for `react-native@0.73` and older */
decodePolyfill?: (input: Uint8Array) => string;
}
type BackwardsCompatibleSentryCarrier = SentryCarrier & {
hub: any;
integrations?: any[];
logger: any;
extensions?: {
/** Extension methods for the hub, which are bound to the current Hub instance */
[key: string]: Function;
};
};
/** Internal global with common properties and Sentry extensions */
export interface InternalGlobal {
export type InternalGlobal = {
navigator?: {

@@ -44,18 +65,5 @@ userAgent?: string;

_sentryDebugIds?: Record<string, string>;
__SENTRY__: {
hub: any;
logger: any;
extensions?: {
/** Extension methods for the hub, which are bound to the current Hub instance */
[key: string]: Function;
};
globalScope: Scope | undefined;
defaultCurrentScope: Scope | undefined;
defaultIsolationScope: Scope | undefined;
globalMetricsAggregators: WeakMap<Client, MetricsAggregator> | undefined;
/** Overwrites TextEncoder used in `@sentry/utils`, need for `react-native@0.73` and older */
encodePolyfill?: (input: string) => Uint8Array;
/** Overwrites TextDecoder used in `@sentry/utils`, need for `react-native@0.73` and older */
decodePolyfill?: (input: Uint8Array) => string;
};
__SENTRY__: Record<Exclude<string, 'version'>, SentryCarrier> & {
version?: string;
} & BackwardsCompatibleSentryCarrier;
/**

@@ -68,7 +76,7 @@ * Raw module metadata that is injected by bundler plugins.

_sentryEsmLoaderHookRegistered?: boolean;
}
};
/** Get's the global object for the current JavaScript runtime */
export declare const GLOBAL_OBJ: InternalGlobal;
/**
* Returns a global singleton contained in the global `__SENTRY__` object.
* Returns a global singleton contained in the global `__SENTRY__[]` object.
*

@@ -83,3 +91,4 @@ * If the singleton doesn't already exist in `__SENTRY__`, it will be created using the given factory

*/
export declare function getGlobalSingleton<T>(name: keyof InternalGlobal['__SENTRY__'], creator: () => T, obj?: unknown): T;
export declare function getGlobalSingleton<T>(name: keyof SentryCarrier, creator: () => T, obj?: unknown): T;
export {};
//# sourceMappingURL=worldwide.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