From cd7c1efc8829ae45f8ba7359668d2c7a39cdd751 Mon Sep 17 00:00:00 2001 From: Luca Forstner Date: Mon, 11 Mar 2024 12:42:56 +0000 Subject: [PATCH] ref(nextjs): Remove last internal deprecations --- packages/nextjs/src/edge/rewriteFramesIntegration.ts | 4 ---- packages/nextjs/src/server/rewriteFramesIntegration.ts | 4 ---- packages/nextjs/test/clientSdk.test.ts | 7 +++---- 3 files changed, 3 insertions(+), 12 deletions(-) diff --git a/packages/nextjs/src/edge/rewriteFramesIntegration.ts b/packages/nextjs/src/edge/rewriteFramesIntegration.ts index f19a3c79a4c5..84d5a41b0922 100644 --- a/packages/nextjs/src/edge/rewriteFramesIntegration.ts +++ b/packages/nextjs/src/edge/rewriteFramesIntegration.ts @@ -37,11 +37,7 @@ export const customRewriteFramesIntegration = ((options?: RewriteFramesOptions) // Do nothing if we can't find a distDirName return { - // eslint-disable-next-line deprecation/deprecation name: 'RewriteFrames', - // eslint-disable-next-line @typescript-eslint/no-empty-function - setupOnce: () => {}, - processEvent: event => event, }; }) satisfies IntegrationFn; diff --git a/packages/nextjs/src/server/rewriteFramesIntegration.ts b/packages/nextjs/src/server/rewriteFramesIntegration.ts index 5b7c64d81b7a..6438ccb0d922 100644 --- a/packages/nextjs/src/server/rewriteFramesIntegration.ts +++ b/packages/nextjs/src/server/rewriteFramesIntegration.ts @@ -37,11 +37,7 @@ export const customRewriteFramesIntegration = ((options?: RewriteFramesOptions) // Do nothing if we can't find a distDirName return { - // eslint-disable-next-line deprecation/deprecation name: 'RewriteFrames', - // eslint-disable-next-line @typescript-eslint/no-empty-function - setupOnce: () => {}, - processEvent: event => event, }; }) satisfies IntegrationFn; diff --git a/packages/nextjs/test/clientSdk.test.ts b/packages/nextjs/test/clientSdk.test.ts index 2a19b74d5fcd..dc5fe5c109f5 100644 --- a/packages/nextjs/test/clientSdk.test.ts +++ b/packages/nextjs/test/clientSdk.test.ts @@ -91,10 +91,9 @@ describe('Client init()', () => { const transportSend = jest.spyOn(getClient()!.getTransport()!, 'send'); // Ensure we have no current span, so our next span is a transaction - // eslint-disable-next-line deprecation/deprecation - getCurrentScope().setSpan(undefined); - - SentryReact.startInactiveSpan({ name: '/404' })?.end(); + SentryReact.withActiveSpan(null, () => { + SentryReact.startInactiveSpan({ name: '/404' })?.end(); + }); expect(transportSend).not.toHaveBeenCalled(); expect(captureEvent.mock.results[0].value).toBeUndefined();