From 6eeec5ff7cb29b9db16bb3b4b98adbdf45027591 Mon Sep 17 00:00:00 2001 From: Krystof Woldrich Date: Thu, 12 Sep 2024 21:48:29 +0200 Subject: [PATCH] misc: Remove deprecated Spotlight options --- CHANGELOG.md | 1 + packages/core/src/js/integrations/default.ts | 4 ++-- packages/core/src/js/options.ts | 25 -------------------- packages/core/test/sdk.test.ts | 8 ------- 4 files changed, 3 insertions(+), 35 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 831ca8df1..fdd016e3c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -21,6 +21,7 @@ ### Changes +- Remove deprecated `enableSpotlight` and `spotlightSidecarUrl` ([#4086](https://github.com/getsentry/sentry-react-native/pull/4086)) - `tracePropagationTargets` defaults to all targets on mobile and same origin on the web ([#4083](https://github.com/getsentry/sentry-react-native/pull/4083)) - Move `_experiments.profilesSampleRate` to `profilesSampleRate` root options object [#3851](https://github.com/getsentry/sentry-react-native/pull/3851)) - Add Android Logger when new frame event is not emitted ([#4081](https://github.com/getsentry/sentry-react-native/pull/4081)) diff --git a/packages/core/src/js/integrations/default.ts b/packages/core/src/js/integrations/default.ts index 7cf8511cc..d60d8fe3b 100644 --- a/packages/core/src/js/integrations/default.ts +++ b/packages/core/src/js/integrations/default.ts @@ -127,8 +127,8 @@ export function getDefaultIntegrations(options: ReactNativeClientOptions): Integ integrations.push(expoContextIntegration()); } - if (options.spotlight || options.enableSpotlight) { - const sidecarUrl = (typeof options.spotlight === 'string' && options.spotlight) || options.spotlightSidecarUrl; + if (options.spotlight) { + const sidecarUrl = typeof options.spotlight === 'string' ? options.spotlight : undefined; integrations.push(spotlightIntegration({ sidecarUrl })); } diff --git a/packages/core/src/js/options.ts b/packages/core/src/js/options.ts index 4d8f96f3b..4d7f46a92 100644 --- a/packages/core/src/js/options.ts +++ b/packages/core/src/js/options.ts @@ -164,31 +164,6 @@ export interface BaseReactNativeOptions { */ enableCaptureFailedRequests?: boolean; - /** - * This option will enable forwarding captured Sentry events to Spotlight. - * - * More details: https://spotlightjs.com/ - * - * IMPORTANT: Only set this option to `true` while developing, not in production! - * - * @deprecated Use `spotlight` instead. - */ - enableSpotlight?: boolean; - - /** - * This option changes the default Spotlight Sidecar URL. - * - * By default, the SDK expects the Sidecar to be running - * on the same host as React Native Metro Dev Server. - * - * More details: https://spotlightjs.com/ - * - * @default "http://localhost:8969/stream" - * - * @deprecated Use `spotlight` instead. - */ - spotlightSidecarUrl?: string; - /** * If you use Spotlight by Sentry during development, use * this option to forward captured Sentry events to Spotlight. diff --git a/packages/core/test/sdk.test.ts b/packages/core/test/sdk.test.ts index 806e66bb0..b5487340c 100644 --- a/packages/core/test/sdk.test.ts +++ b/packages/core/test/sdk.test.ts @@ -404,14 +404,6 @@ describe('Tests the SDK functionality', () => { expectNotIntegration('Spotlight'); }); - it('adds spotlight integration with enableSpotlight', () => { - init({ - enableSpotlight: true, - }); - - expectIntegration('Spotlight'); - }); - it('no app start integration by default', () => { init({});