From 4909e0ec2a7291f63d76eea2e796c7a23417f1b2 Mon Sep 17 00:00:00 2001 From: Tim Fish Date: Thu, 13 Oct 2022 12:06:27 +0200 Subject: [PATCH 1/2] Remove getGlobalObject as it's no longer used --- packages/utils/src/global.ts | 9 --------- 1 file changed, 9 deletions(-) diff --git a/packages/utils/src/global.ts b/packages/utils/src/global.ts index d32860fc75be..031075d9572e 100644 --- a/packages/utils/src/global.ts +++ b/packages/utils/src/global.ts @@ -72,15 +72,6 @@ export const GLOBAL_OBJ: InternalGlobal = })() || {}; -/** - * Safely get global scope object - * - * @returns Global scope object - */ -export function getGlobalObject(): T & InternalGlobal { - return GLOBAL_OBJ as T & InternalGlobal; -} - /** * Returns a global singleton contained in the global `__SENTRY__` object. * From 4be168b4211c933d57788c3cfbe409889fe76419 Mon Sep 17 00:00:00 2001 From: Tim Fish Date: Thu, 13 Oct 2022 13:33:46 +0200 Subject: [PATCH 2/2] Deprecate instead! --- packages/utils/src/global.ts | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/packages/utils/src/global.ts b/packages/utils/src/global.ts index 031075d9572e..72163749214a 100644 --- a/packages/utils/src/global.ts +++ b/packages/utils/src/global.ts @@ -72,6 +72,13 @@ export const GLOBAL_OBJ: InternalGlobal = })() || {}; +/** + * @deprecated Use GLOBAL_OBJ instead. This will be removed in v8 + */ +export function getGlobalObject(): T & InternalGlobal { + return GLOBAL_OBJ as T & InternalGlobal; +} + /** * Returns a global singleton contained in the global `__SENTRY__` object. *