From f1e9da28e9c8dbd9e6ecf1bd446437f8cd04700e Mon Sep 17 00:00:00 2001 From: Abhijeet Prasad Date: Wed, 6 Apr 2022 21:15:35 -0400 Subject: [PATCH] feat(hub): Remove getActiveDomain (#4858) Removes `getActiveDomain` function and corresponding type. --- packages/hub/src/hub.ts | 23 ----------------------- packages/hub/src/index.ts | 4 ---- 2 files changed, 27 deletions(-) diff --git a/packages/hub/src/hub.ts b/packages/hub/src/hub.ts index b6ebffc74866..94c8e3ea91fe 100644 --- a/packages/hub/src/hub.ts +++ b/packages/hub/src/hub.ts @@ -80,15 +80,6 @@ export interface Carrier { }; } -/** - * @hidden - * @deprecated Can be removed once `Hub.getActiveDomain` is removed. - */ -export interface DomainAsCarrier extends Carrier { - // eslint-disable-next-line @typescript-eslint/no-explicit-any - members: { [key: string]: any }[]; -} - /** * @inheritDoc */ @@ -559,20 +550,6 @@ export function getCurrentHub(): Hub { return getHubFromCarrier(registry); } -/** - * Returns the active domain, if one exists - * @deprecated No longer used; remove in v7 - * @returns The domain, or undefined if there is no active domain - */ -// eslint-disable-next-line deprecation/deprecation -export function getActiveDomain(): DomainAsCarrier | undefined { - IS_DEBUG_BUILD && logger.warn('Function `getActiveDomain` is deprecated and will be removed in a future version.'); - - const sentry = getMainCarrier().__SENTRY__; - - return sentry && sentry.extensions && sentry.extensions.domain && sentry.extensions.domain.active; -} - /** * Try to read the hub from an active domain, and fallback to the registry if one doesn't exist * @returns discovered hub diff --git a/packages/hub/src/index.ts b/packages/hub/src/index.ts index 9c0a77625dc2..3d3b97fa239b 100644 --- a/packages/hub/src/index.ts +++ b/packages/hub/src/index.ts @@ -2,8 +2,6 @@ export { addGlobalEventProcessor, Scope } from './scope'; export { Session } from './session'; export { SessionFlusher } from './sessionflusher'; export { - // eslint-disable-next-line deprecation/deprecation - getActiveDomain, getCurrentHub, getHubFromCarrier, getMainCarrier, @@ -11,7 +9,5 @@ export { makeMain, setHubOnCarrier, Carrier, - // eslint-disable-next-line deprecation/deprecation - DomainAsCarrier, Layer, } from './hub';