Skip to content

Commit

Permalink
feat(hub): Remove getActiveDomain (#4858)
Browse files Browse the repository at this point in the history
Removes `getActiveDomain` function and corresponding type.
  • Loading branch information
AbhiPrasad authored and Lms24 committed Apr 7, 2022
1 parent f855260 commit f1e9da2
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 27 deletions.
23 changes: 0 additions & 23 deletions packages/hub/src/hub.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
*/
Expand Down Expand Up @@ -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
Expand Down
4 changes: 0 additions & 4 deletions packages/hub/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,12 @@ export { addGlobalEventProcessor, Scope } from './scope';
export { Session } from './session';
export { SessionFlusher } from './sessionflusher';
export {
// eslint-disable-next-line deprecation/deprecation
getActiveDomain,
getCurrentHub,
getHubFromCarrier,
getMainCarrier,
Hub,
makeMain,
setHubOnCarrier,
Carrier,
// eslint-disable-next-line deprecation/deprecation
DomainAsCarrier,
Layer,
} from './hub';

0 comments on commit f1e9da2

Please sign in to comment.