From 2777c68bb0753e37055124f8a07a35f54ceef6fe Mon Sep 17 00:00:00 2001 From: s1gr1d Date: Fri, 22 Mar 2024 09:59:34 +0100 Subject: [PATCH 1/6] deprecate replay exports --- packages/replay/src/index.ts | 57 ++++++++++++++++++++++++++---------- 1 file changed, 41 insertions(+), 16 deletions(-) diff --git a/packages/replay/src/index.ts b/packages/replay/src/index.ts index d16fd7733c20..dc2ab4be21b7 100644 --- a/packages/replay/src/index.ts +++ b/packages/replay/src/index.ts @@ -1,25 +1,50 @@ +/** @deprecated Use the export from `@sentry/replay` or from framework-specific SDKs like `@sentry/react` or `@sentry/vue` */ +export { replayIntegration } from './integration'; + +/** @deprecated Use the export from `@sentry/replay` or from framework-specific SDKs like `@sentry/react` or `@sentry/vue` */ export { // eslint-disable-next-line deprecation/deprecation Replay, - replayIntegration, } from './integration'; -export type { - ReplayConfiguration, - ReplayEventType, - ReplayEventWithTime, - ReplayBreadcrumbFrame, - ReplayBreadcrumbFrameEvent, - ReplayOptionFrameEvent, - ReplayFrame, - ReplayFrameEvent, - ReplaySpanFrame, - ReplaySpanFrameEvent, - CanvasManagerInterface, - CanvasManagerOptions, -} from './types'; - +/** @deprecated Use the export from `@sentry/replay` or from framework-specific SDKs like `@sentry/react` or `@sentry/vue` */ export { getReplay } from './util/getReplay'; +/** @deprecated Use the export from `@sentry/replay` or from framework-specific SDKs like `@sentry/react` or `@sentry/vue` */ +export type { ReplayConfiguration } from './types'; + +/** @deprecated Use the export from `@sentry/replay` or from framework-specific SDKs like `@sentry/react` or `@sentry/vue` */ +export type { ReplayEventType } from './types'; + +/** @deprecated Use the export from `@sentry/replay` or from framework-specific SDKs like `@sentry/react` or `@sentry/vue` */ +export type { ReplayEventWithTime } from './types'; + +/** @deprecated Use the export from `@sentry/replay` or from framework-specific SDKs like `@sentry/react` or `@sentry/vue` */ +export type { ReplayBreadcrumbFrame } from './types'; + +/** @deprecated Use the export from `@sentry/replay` or from framework-specific SDKs like `@sentry/react` or `@sentry/vue` */ +export type { ReplayBreadcrumbFrameEvent } from './types'; + +/** @deprecated Use the export from `@sentry/replay` or from framework-specific SDKs like `@sentry/react` or `@sentry/vue` */ +export type { ReplayOptionFrameEvent } from './types'; + +/** @deprecated Use the export from `@sentry/replay` or from framework-specific SDKs like `@sentry/react` or `@sentry/vue` */ +export type { ReplayFrame } from './types'; + +/** @deprecated Use the export from `@sentry/replay` or from framework-specific SDKs like `@sentry/react` or `@sentry/vue` */ +export type { ReplayFrameEvent } from './types'; + +/** @deprecated Use the export from `@sentry/replay` or from framework-specific SDKs like `@sentry/react` or `@sentry/vue` */ +export type { ReplaySpanFrame } from './types'; + +/** @deprecated Use the export from `@sentry/replay` or from framework-specific SDKs like `@sentry/react` or `@sentry/vue` */ +export type { ReplaySpanFrameEvent } from './types'; + +/** @deprecated Use the export from `@sentry/replay` or from framework-specific SDKs like `@sentry/react` or `@sentry/vue` */ +export type { CanvasManagerInterface } from './types'; + +/** @deprecated Use the export from `@sentry/replay` or from framework-specific SDKs like `@sentry/react` or `@sentry/vue` */ +export type { CanvasManagerOptions } from './types'; + // TODO (v8): Remove deprecated types export * from './types/deprecated'; From 88919b514884cec364a12af0306a312a8335ee0e Mon Sep 17 00:00:00 2001 From: s1gr1d Date: Fri, 22 Mar 2024 09:59:34 +0100 Subject: [PATCH 2/6] deprecate replay exports --- packages/replay/src/index.ts | 94 +++++++++++++++++++++++++++++------- 1 file changed, 76 insertions(+), 18 deletions(-) diff --git a/packages/replay/src/index.ts b/packages/replay/src/index.ts index dc2ab4be21b7..0f8767e894e9 100644 --- a/packages/replay/src/index.ts +++ b/packages/replay/src/index.ts @@ -1,50 +1,108 @@ +// eslint-disable-next-line deprecation/deprecation +import { Replay as InternalReplay, replayIntegration as internalReplayIntegration } from './integration'; +import type { + CanvasManagerInterface as InternalCanvasManagerInterface, + CanvasManagerOptions as InternalCanvasManagerOptions, + ReplayBreadcrumbFrame as InternalReplayBreadcrumbFrame, + ReplayBreadcrumbFrameEvent as InternalReplayBreadcrumbFrameEvent, + ReplayConfiguration as InternalReplayConfiguration, + ReplayEventType as InternalReplayEventType, + ReplayEventWithTime as InternalReplayEventWithTime, + ReplayFrame as InternalReplayFrame, + ReplayFrameEvent as InternalReplayFrameEvent, + ReplayOptionFrameEvent as InternalReplayOptionFrameEvent, + ReplaySpanFrame as InternalReplaySpanFrame, + ReplaySpanFrameEvent as InternalReplaySpanFrameEvent, +} from './types'; +import { getReplay as internalGetReplay } from './util/getReplay'; + /** @deprecated Use the export from `@sentry/replay` or from framework-specific SDKs like `@sentry/react` or `@sentry/vue` */ -export { replayIntegration } from './integration'; +const getReplay = internalGetReplay; /** @deprecated Use the export from `@sentry/replay` or from framework-specific SDKs like `@sentry/react` or `@sentry/vue` */ -export { - // eslint-disable-next-line deprecation/deprecation - Replay, -} from './integration'; +const replayIntegration = internalReplayIntegration; /** @deprecated Use the export from `@sentry/replay` or from framework-specific SDKs like `@sentry/react` or `@sentry/vue` */ -export { getReplay } from './util/getReplay'; +// eslint-disable-next-line deprecation/deprecation +const Replay = InternalReplay; + +// eslint-disable-next-line deprecation/deprecation +export { replayIntegration, getReplay, Replay, internalReplayIntegration, internalGetReplay, InternalReplay }; /** @deprecated Use the export from `@sentry/replay` or from framework-specific SDKs like `@sentry/react` or `@sentry/vue` */ -export type { ReplayConfiguration } from './types'; +type ReplayConfiguration = InternalReplayConfiguration; /** @deprecated Use the export from `@sentry/replay` or from framework-specific SDKs like `@sentry/react` or `@sentry/vue` */ -export type { ReplayEventType } from './types'; +type ReplayEventType = InternalReplayEventType; /** @deprecated Use the export from `@sentry/replay` or from framework-specific SDKs like `@sentry/react` or `@sentry/vue` */ -export type { ReplayEventWithTime } from './types'; +type ReplayEventWithTime = InternalReplayEventWithTime; /** @deprecated Use the export from `@sentry/replay` or from framework-specific SDKs like `@sentry/react` or `@sentry/vue` */ -export type { ReplayBreadcrumbFrame } from './types'; +type ReplayBreadcrumbFrame = InternalReplayBreadcrumbFrame; /** @deprecated Use the export from `@sentry/replay` or from framework-specific SDKs like `@sentry/react` or `@sentry/vue` */ -export type { ReplayBreadcrumbFrameEvent } from './types'; +type ReplayBreadcrumbFrameEvent = InternalReplayBreadcrumbFrameEvent; /** @deprecated Use the export from `@sentry/replay` or from framework-specific SDKs like `@sentry/react` or `@sentry/vue` */ -export type { ReplayOptionFrameEvent } from './types'; +type ReplayOptionFrameEvent = InternalReplayOptionFrameEvent; /** @deprecated Use the export from `@sentry/replay` or from framework-specific SDKs like `@sentry/react` or `@sentry/vue` */ -export type { ReplayFrame } from './types'; +type ReplayFrame = InternalReplayFrame; /** @deprecated Use the export from `@sentry/replay` or from framework-specific SDKs like `@sentry/react` or `@sentry/vue` */ -export type { ReplayFrameEvent } from './types'; +type ReplayFrameEvent = InternalReplayFrameEvent; /** @deprecated Use the export from `@sentry/replay` or from framework-specific SDKs like `@sentry/react` or `@sentry/vue` */ -export type { ReplaySpanFrame } from './types'; +type ReplaySpanFrame = InternalReplaySpanFrame; /** @deprecated Use the export from `@sentry/replay` or from framework-specific SDKs like `@sentry/react` or `@sentry/vue` */ -export type { ReplaySpanFrameEvent } from './types'; +type ReplaySpanFrameEvent = InternalReplaySpanFrameEvent; /** @deprecated Use the export from `@sentry/replay` or from framework-specific SDKs like `@sentry/react` or `@sentry/vue` */ -export type { CanvasManagerInterface } from './types'; +type CanvasManagerInterface = InternalCanvasManagerInterface; /** @deprecated Use the export from `@sentry/replay` or from framework-specific SDKs like `@sentry/react` or `@sentry/vue` */ -export type { CanvasManagerOptions } from './types'; +type CanvasManagerOptions = InternalCanvasManagerOptions; + +export type { + // eslint-disable-next-line deprecation/deprecation + CanvasManagerInterface, + // eslint-disable-next-line deprecation/deprecation + CanvasManagerOptions, + // eslint-disable-next-line deprecation/deprecation + ReplayBreadcrumbFrame, + // eslint-disable-next-line deprecation/deprecation + ReplayBreadcrumbFrameEvent, + // eslint-disable-next-line deprecation/deprecation + ReplayConfiguration, + // eslint-disable-next-line deprecation/deprecation + ReplayEventType, + // eslint-disable-next-line deprecation/deprecation + ReplayEventWithTime, + // eslint-disable-next-line deprecation/deprecation + ReplayFrame, + // eslint-disable-next-line deprecation/deprecation + ReplayFrameEvent, + // eslint-disable-next-line deprecation/deprecation + ReplayOptionFrameEvent, + // eslint-disable-next-line deprecation/deprecation + ReplaySpanFrame, + // eslint-disable-next-line deprecation/deprecation + ReplaySpanFrameEvent, + InternalCanvasManagerInterface, + InternalCanvasManagerOptions, + InternalReplayBreadcrumbFrame, + InternalReplayBreadcrumbFrameEvent, + InternalReplayConfiguration, + InternalReplayEventType, + InternalReplayEventWithTime, + InternalReplayFrame, + InternalReplayFrameEvent, + InternalReplayOptionFrameEvent, + InternalReplaySpanFrame, + InternalReplaySpanFrameEvent, +}; // TODO (v8): Remove deprecated types export * from './types/deprecated'; From 95062794454fd96b37977e4386a593701bd18670 Mon Sep 17 00:00:00 2001 From: s1gr1d Date: Fri, 22 Mar 2024 12:47:04 +0100 Subject: [PATCH 3/6] add internal exports for browser --- packages/browser/src/index.ts | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/packages/browser/src/index.ts b/packages/browser/src/index.ts index 59ef74cdbfb5..969176bf1559 100644 --- a/packages/browser/src/index.ts +++ b/packages/browser/src/index.ts @@ -25,20 +25,20 @@ export { INTEGRATIONS as Integrations }; export { // eslint-disable-next-line deprecation/deprecation - Replay, - replayIntegration, - getReplay, + InternalReplay as Replay, + internalReplayIntegration as replayIntegration, + internalGetReplay as getReplay, } from '@sentry/replay'; export type { - ReplayEventType, - ReplayEventWithTime, - ReplayBreadcrumbFrame, - ReplayBreadcrumbFrameEvent, - ReplayOptionFrameEvent, - ReplayFrame, - ReplayFrameEvent, - ReplaySpanFrame, - ReplaySpanFrameEvent, + InternalReplayEventType as ReplayEventType, + InternalReplayEventWithTime as ReplayEventWithTime, + InternalReplayBreadcrumbFrame as ReplayBreadcrumbFrame, + InternalReplayBreadcrumbFrameEvent as ReplayBreadcrumbFrameEvent, + InternalReplayOptionFrameEvent as ReplayOptionFrameEvent, + InternalReplayFrame as ReplayFrame, + InternalReplayFrameEvent as ReplayFrameEvent, + InternalReplaySpanFrame as ReplaySpanFrame, + InternalReplaySpanFrameEvent as ReplaySpanFrameEvent, } from '@sentry/replay'; export { From 6030a2f0b382c06a2f7e375f9718bb3a8bf69113 Mon Sep 17 00:00:00 2001 From: s1gr1d Date: Fri, 22 Mar 2024 13:36:13 +0100 Subject: [PATCH 4/6] add eslint-disable --- packages/replay/test/utils/getTestEvent.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/packages/replay/test/utils/getTestEvent.ts b/packages/replay/test/utils/getTestEvent.ts index c62983b4c60d..da61d9102d14 100644 --- a/packages/replay/test/utils/getTestEvent.ts +++ b/packages/replay/test/utils/getTestEvent.ts @@ -1,3 +1,4 @@ +// eslint-disable-next-line deprecation/deprecation import type { ReplayEventType, ReplayEventWithTime } from '../../src'; import { ReplayEventTypeFullSnapshot, ReplayEventTypeIncrementalSnapshot } from '../../src/types'; @@ -8,7 +9,9 @@ export function getTestEvent({ }: { timestamp: number; data?: any; + // eslint-disable-next-line deprecation/deprecation type: ReplayEventType; + // eslint-disable-next-line deprecation/deprecation }): ReplayEventWithTime { return { data: data || {}, @@ -17,10 +20,12 @@ export function getTestEvent({ }; } +// eslint-disable-next-line deprecation/deprecation export function getTestEventCheckout({ timestamp, data }: { timestamp: number; data?: any }): ReplayEventWithTime { return getTestEvent({ timestamp, data, type: ReplayEventTypeFullSnapshot }); } +// eslint-disable-next-line deprecation/deprecation export function getTestEventIncremental({ timestamp, data }: { timestamp: number; data?: any }): ReplayEventWithTime { return getTestEvent({ timestamp, data, type: ReplayEventTypeIncrementalSnapshot }); } From 2745add76673535dbea01a4c661656956b5cacf0 Mon Sep 17 00:00:00 2001 From: s1gr1d Date: Fri, 22 Mar 2024 14:18:56 +0100 Subject: [PATCH 5/6] export Replay as Class --- packages/replay/src/index.ts | 2 +- .../replay/test/integration/beforeAddRecordingEvent.test.ts | 1 + packages/replay/test/integration/stop.test.ts | 1 + packages/replay/test/mocks/mockSdk.ts | 1 + 4 files changed, 4 insertions(+), 1 deletion(-) diff --git a/packages/replay/src/index.ts b/packages/replay/src/index.ts index 0f8767e894e9..338514b10669 100644 --- a/packages/replay/src/index.ts +++ b/packages/replay/src/index.ts @@ -24,7 +24,7 @@ const replayIntegration = internalReplayIntegration; /** @deprecated Use the export from `@sentry/replay` or from framework-specific SDKs like `@sentry/react` or `@sentry/vue` */ // eslint-disable-next-line deprecation/deprecation -const Replay = InternalReplay; +class Replay extends InternalReplay {} // eslint-disable-next-line deprecation/deprecation export { replayIntegration, getReplay, Replay, internalReplayIntegration, internalGetReplay, InternalReplay }; diff --git a/packages/replay/test/integration/beforeAddRecordingEvent.test.ts b/packages/replay/test/integration/beforeAddRecordingEvent.test.ts index e8076875386b..e6800f4e53d0 100644 --- a/packages/replay/test/integration/beforeAddRecordingEvent.test.ts +++ b/packages/replay/test/integration/beforeAddRecordingEvent.test.ts @@ -2,6 +2,7 @@ import * as SentryCore from '@sentry/core'; import type { Transport } from '@sentry/types'; import * as SentryUtils from '@sentry/utils'; +// eslint-disable-next-line deprecation/deprecation import type { Replay } from '../../src'; import type { ReplayContainer } from '../../src/replay'; import { clearSession } from '../../src/session/clearSession'; diff --git a/packages/replay/test/integration/stop.test.ts b/packages/replay/test/integration/stop.test.ts index 75faef8f0d04..35bc44f0c80f 100644 --- a/packages/replay/test/integration/stop.test.ts +++ b/packages/replay/test/integration/stop.test.ts @@ -1,5 +1,6 @@ import * as SentryUtils from '@sentry/utils'; +// eslint-disable-next-line deprecation/deprecation import type { Replay } from '../../src'; import { WINDOW } from '../../src/constants'; import type { ReplayContainer } from '../../src/replay'; diff --git a/packages/replay/test/mocks/mockSdk.ts b/packages/replay/test/mocks/mockSdk.ts index ccf11dabb6ad..92b296ec7631 100644 --- a/packages/replay/test/mocks/mockSdk.ts +++ b/packages/replay/test/mocks/mockSdk.ts @@ -1,5 +1,6 @@ import type { Envelope, Transport, TransportMakeRequestResponse } from '@sentry/types'; +// eslint-disable-next-line deprecation/deprecation import type { Replay as ReplayIntegration } from '../../src'; import type { ReplayContainer } from '../../src/replay'; import type { ReplayConfiguration } from '../../src/types'; From d993582b079aa18e712c2877eeb13395438a1fa7 Mon Sep 17 00:00:00 2001 From: s1gr1d Date: Fri, 22 Mar 2024 14:56:00 +0100 Subject: [PATCH 6/6] use internal imports --- .../suites/replay/bufferMode/test.ts | 17 ++++++++++------- packages/browser/src/index.bundle.replay.ts | 8 ++++---- .../src/index.bundle.tracing.replay.feedback.ts | 8 ++++---- .../browser/src/index.bundle.tracing.replay.ts | 8 ++++---- packages/replay-canvas/src/canvas.ts | 6 +++--- 5 files changed, 25 insertions(+), 22 deletions(-) diff --git a/dev-packages/browser-integration-tests/suites/replay/bufferMode/test.ts b/dev-packages/browser-integration-tests/suites/replay/bufferMode/test.ts index 1ed90b81b37a..964505d77a44 100644 --- a/dev-packages/browser-integration-tests/suites/replay/bufferMode/test.ts +++ b/dev-packages/browser-integration-tests/suites/replay/bufferMode/test.ts @@ -1,5 +1,5 @@ import { expect } from '@playwright/test'; -import type { Replay } from '@sentry/replay'; +import type { InternalReplay } from '@sentry/replay'; import type { ReplayContainer } from '@sentry/replay/build/npm/types/types'; import { sentryTest } from '../../../utils/fixtures'; @@ -68,7 +68,8 @@ sentryTest( expect( await page.evaluate(() => { // eslint-disable-next-line deprecation/deprecation - const replayIntegration = (window as unknown as Window & { Replay: InstanceType }).Replay; + const replayIntegration = (window as unknown as Window & { Replay: InstanceType }) + .Replay; // @ts-expect-error private const replay = replayIntegration._replay; replayIntegration.startBuffering(); @@ -89,7 +90,7 @@ sentryTest( reqPromise0, page.evaluate(async () => { // eslint-disable-next-line deprecation/deprecation - const replayIntegration = (window as unknown as Window & { Replay: Replay }).Replay; + const replayIntegration = (window as unknown as Window & { Replay: InternalReplay }).Replay; await replayIntegration.flush(); }), ]); @@ -213,7 +214,8 @@ sentryTest( expect( await page.evaluate(() => { // eslint-disable-next-line deprecation/deprecation - const replayIntegration = (window as unknown as Window & { Replay: InstanceType }).Replay; + const replayIntegration = (window as unknown as Window & { Replay: InstanceType }) + .Replay; // @ts-expect-error private const replay = replayIntegration._replay; replayIntegration.startBuffering(); @@ -234,7 +236,7 @@ sentryTest( reqPromise0, page.evaluate(async () => { // eslint-disable-next-line deprecation/deprecation - const replayIntegration = (window as unknown as Window & { Replay: Replay }).Replay; + const replayIntegration = (window as unknown as Window & { Replay: InternalReplay }).Replay; await replayIntegration.flush({ continueRecording: false }); }), ]); @@ -329,7 +331,8 @@ sentryTest( expect( await page.evaluate(() => { // eslint-disable-next-line deprecation/deprecation - const replayIntegration = (window as unknown as Window & { Replay: InstanceType }).Replay; + const replayIntegration = (window as unknown as Window & { Replay: InstanceType }) + .Replay; const replay = replayIntegration['_replay']; replayIntegration.startBuffering(); return replay.isEnabled(); @@ -348,7 +351,7 @@ sentryTest( await page.evaluate(async () => { // eslint-disable-next-line deprecation/deprecation - const replayIntegration = (window as unknown as Window & { Replay: Replay }).Replay; + const replayIntegration = (window as unknown as Window & { Replay: InternalReplay }).Replay; replayIntegration['_replay'].getOptions().errorSampleRate = 1.0; }); diff --git a/packages/browser/src/index.bundle.replay.ts b/packages/browser/src/index.bundle.replay.ts index 2e4619ab49ea..0ab1f040df4c 100644 --- a/packages/browser/src/index.bundle.replay.ts +++ b/packages/browser/src/index.bundle.replay.ts @@ -6,13 +6,13 @@ import { browserTracingIntegration, feedbackIntegration, } from '@sentry-internal/integration-shims'; -import { Replay, replayIntegration } from '@sentry/replay'; +import { InternalReplay, internalReplayIntegration } from '@sentry/replay'; import * as Sentry from './index.bundle.base'; // TODO (v8): Remove this as it was only needed for backwards compatibility // eslint-disable-next-line deprecation/deprecation -Sentry.Integrations.Replay = Replay; +Sentry.Integrations.Replay = InternalReplay; // eslint-disable-next-line deprecation/deprecation Sentry.Integrations.BrowserTracing = BrowserTracing; @@ -24,8 +24,8 @@ export { browserTracingIntegration, addTracingExtensions, // eslint-disable-next-line deprecation/deprecation - Replay, - replayIntegration, + InternalReplay as Replay, + internalReplayIntegration as replayIntegration, // eslint-disable-next-line deprecation/deprecation Feedback, feedbackIntegration, diff --git a/packages/browser/src/index.bundle.tracing.replay.feedback.ts b/packages/browser/src/index.bundle.tracing.replay.feedback.ts index 4a015f0dd9fe..5e0f3f7d799c 100644 --- a/packages/browser/src/index.bundle.tracing.replay.feedback.ts +++ b/packages/browser/src/index.bundle.tracing.replay.feedback.ts @@ -1,6 +1,6 @@ import { Feedback, feedbackIntegration } from '@sentry-internal/feedback'; import { BrowserTracing, Span, addExtensionMethods } from '@sentry-internal/tracing'; -import { Replay, replayIntegration } from '@sentry/replay'; +import { InternalReplay, internalReplayIntegration } from '@sentry/replay'; import { bundleBrowserTracingIntegration as browserTracingIntegration } from './helpers'; import * as Sentry from './index.bundle.base'; @@ -9,7 +9,7 @@ import * as Sentry from './index.bundle.base'; // We want replay to be available under Sentry.Replay, to be consistent // with the NPM package version. // eslint-disable-next-line deprecation/deprecation -Sentry.Integrations.Replay = Replay; +Sentry.Integrations.Replay = InternalReplay; // eslint-disable-next-line deprecation/deprecation Sentry.Integrations.BrowserTracing = BrowserTracing; @@ -21,9 +21,9 @@ export { // eslint-disable-next-line deprecation/deprecation Feedback, // eslint-disable-next-line deprecation/deprecation - Replay, + InternalReplay as Replay, feedbackIntegration, - replayIntegration, + internalReplayIntegration as replayIntegration, // eslint-disable-next-line deprecation/deprecation BrowserTracing, browserTracingIntegration, diff --git a/packages/browser/src/index.bundle.tracing.replay.ts b/packages/browser/src/index.bundle.tracing.replay.ts index c880f97bd84f..2704f634cab5 100644 --- a/packages/browser/src/index.bundle.tracing.replay.ts +++ b/packages/browser/src/index.bundle.tracing.replay.ts @@ -1,6 +1,6 @@ import { Feedback, feedbackIntegration } from '@sentry-internal/integration-shims'; import { BrowserTracing, Span, addExtensionMethods } from '@sentry-internal/tracing'; -import { Replay, replayIntegration } from '@sentry/replay'; +import { InternalReplay, internalReplayIntegration } from '@sentry/replay'; import { bundleBrowserTracingIntegration as browserTracingIntegration } from './helpers'; import * as Sentry from './index.bundle.base'; @@ -9,7 +9,7 @@ import * as Sentry from './index.bundle.base'; // We want replay to be available under Sentry.Replay, to be consistent // with the NPM package version. // eslint-disable-next-line deprecation/deprecation -Sentry.Integrations.Replay = Replay; +Sentry.Integrations.Replay = InternalReplay; // eslint-disable-next-line deprecation/deprecation Sentry.Integrations.BrowserTracing = BrowserTracing; @@ -21,8 +21,8 @@ export { // eslint-disable-next-line deprecation/deprecation Feedback, // eslint-disable-next-line deprecation/deprecation - Replay, - replayIntegration, + InternalReplay as Replay, + internalReplayIntegration as replayIntegration, feedbackIntegration, // eslint-disable-next-line deprecation/deprecation BrowserTracing, diff --git a/packages/replay-canvas/src/canvas.ts b/packages/replay-canvas/src/canvas.ts index b2b7b52a792a..c6884f023d55 100644 --- a/packages/replay-canvas/src/canvas.ts +++ b/packages/replay-canvas/src/canvas.ts @@ -1,6 +1,6 @@ import { CanvasManager } from '@sentry-internal/rrweb'; import { convertIntegrationFnToClass, defineIntegration } from '@sentry/core'; -import type { CanvasManagerInterface, CanvasManagerOptions } from '@sentry/replay'; +import type { InternalCanvasManagerInterface, InternalCanvasManagerOptions } from '@sentry/replay'; import type { Integration, IntegrationClass, IntegrationFn } from '@sentry/types'; interface ReplayCanvasOptions { @@ -8,7 +8,7 @@ interface ReplayCanvasOptions { quality: 'low' | 'medium' | 'high'; } -type GetCanvasManager = (options: CanvasManagerOptions) => CanvasManagerInterface; +type GetCanvasManager = (options: InternalCanvasManagerOptions) => InternalCanvasManagerInterface; export interface ReplayCanvasIntegrationOptions { enableManualSnapshot?: boolean; recordCanvas: true; @@ -74,7 +74,7 @@ export const _replayCanvasIntegration = ((options: Partial return { enableManualSnapshot, recordCanvas: true, - getCanvasManager: (options: CanvasManagerOptions) => { + getCanvasManager: (options: InternalCanvasManagerOptions) => { const manager = new CanvasManager({ ...options, enableManualSnapshot,