Skip to content

Commit c2b80eb

Browse files
committed
use internal imports
1 parent 2745add commit c2b80eb

File tree

5 files changed

+22
-19
lines changed

5 files changed

+22
-19
lines changed

dev-packages/browser-integration-tests/suites/replay/bufferMode/test.ts

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { expect } from '@playwright/test';
2-
import type { Replay } from '@sentry/replay';
2+
import type { InternalReplay } from '@sentry/replay';
33
import type { ReplayContainer } from '@sentry/replay/build/npm/types/types';
44

55
import { sentryTest } from '../../../utils/fixtures';
@@ -68,7 +68,8 @@ sentryTest(
6868
expect(
6969
await page.evaluate(() => {
7070
// eslint-disable-next-line deprecation/deprecation
71-
const replayIntegration = (window as unknown as Window & { Replay: InstanceType<typeof Replay> }).Replay;
71+
const replayIntegration = (window as unknown as Window & { Replay: InstanceType<typeof InternalReplay> })
72+
.Replay;
7273
// @ts-expect-error private
7374
const replay = replayIntegration._replay;
7475
replayIntegration.startBuffering();
@@ -89,7 +90,7 @@ sentryTest(
8990
reqPromise0,
9091
page.evaluate(async () => {
9192
// eslint-disable-next-line deprecation/deprecation
92-
const replayIntegration = (window as unknown as Window & { Replay: Replay }).Replay;
93+
const replayIntegration = (window as unknown as Window & { Replay: InternalReplay }).Replay;
9394
await replayIntegration.flush();
9495
}),
9596
]);
@@ -213,7 +214,8 @@ sentryTest(
213214
expect(
214215
await page.evaluate(() => {
215216
// eslint-disable-next-line deprecation/deprecation
216-
const replayIntegration = (window as unknown as Window & { Replay: InstanceType<typeof Replay> }).Replay;
217+
const replayIntegration = (window as unknown as Window & { Replay: InstanceType<typeof InternalReplay> })
218+
.Replay;
217219
// @ts-expect-error private
218220
const replay = replayIntegration._replay;
219221
replayIntegration.startBuffering();
@@ -234,7 +236,7 @@ sentryTest(
234236
reqPromise0,
235237
page.evaluate(async () => {
236238
// eslint-disable-next-line deprecation/deprecation
237-
const replayIntegration = (window as unknown as Window & { Replay: Replay }).Replay;
239+
const replayIntegration = (window as unknown as Window & { Replay: InternalReplay }).Replay;
238240
await replayIntegration.flush({ continueRecording: false });
239241
}),
240242
]);
@@ -329,7 +331,8 @@ sentryTest(
329331
expect(
330332
await page.evaluate(() => {
331333
// eslint-disable-next-line deprecation/deprecation
332-
const replayIntegration = (window as unknown as Window & { Replay: InstanceType<typeof Replay> }).Replay;
334+
const replayIntegration = (window as unknown as Window & { Replay: InstanceType<typeof InternalReplay> })
335+
.Replay;
333336
const replay = replayIntegration['_replay'];
334337
replayIntegration.startBuffering();
335338
return replay.isEnabled();
@@ -348,7 +351,7 @@ sentryTest(
348351

349352
await page.evaluate(async () => {
350353
// eslint-disable-next-line deprecation/deprecation
351-
const replayIntegration = (window as unknown as Window & { Replay: Replay }).Replay;
354+
const replayIntegration = (window as unknown as Window & { Replay: InternalReplay }).Replay;
352355
replayIntegration['_replay'].getOptions().errorSampleRate = 1.0;
353356
});
354357

packages/browser/src/index.bundle.replay.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import {
66
browserTracingIntegration,
77
feedbackIntegration,
88
} from '@sentry-internal/integration-shims';
9-
import { Replay, replayIntegration } from '@sentry/replay';
9+
import { InternalReplay, internalReplayIntegration } from '@sentry/replay';
1010

1111
import * as Sentry from './index.bundle.base';
1212

@@ -24,8 +24,8 @@ export {
2424
browserTracingIntegration,
2525
addTracingExtensions,
2626
// eslint-disable-next-line deprecation/deprecation
27-
Replay,
28-
replayIntegration,
27+
InternalReplay as Replay,
28+
internalReplayIntegration as replayIntegration,
2929
// eslint-disable-next-line deprecation/deprecation
3030
Feedback,
3131
feedbackIntegration,

packages/browser/src/index.bundle.tracing.replay.feedback.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { Feedback, feedbackIntegration } from '@sentry-internal/feedback';
22
import { BrowserTracing, Span, addExtensionMethods } from '@sentry-internal/tracing';
3-
import { Replay, replayIntegration } from '@sentry/replay';
3+
import { InternalReplay, internalReplayIntegration } from '@sentry/replay';
44
import { bundleBrowserTracingIntegration as browserTracingIntegration } from './helpers';
55

66
import * as Sentry from './index.bundle.base';
@@ -21,9 +21,9 @@ export {
2121
// eslint-disable-next-line deprecation/deprecation
2222
Feedback,
2323
// eslint-disable-next-line deprecation/deprecation
24-
Replay,
24+
InternalReplay as Replay,
2525
feedbackIntegration,
26-
replayIntegration,
26+
internalReplayIntegration as replayIntegration,
2727
// eslint-disable-next-line deprecation/deprecation
2828
BrowserTracing,
2929
browserTracingIntegration,

packages/browser/src/index.bundle.tracing.replay.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { Feedback, feedbackIntegration } from '@sentry-internal/integration-shims';
22
import { BrowserTracing, Span, addExtensionMethods } from '@sentry-internal/tracing';
3-
import { Replay, replayIntegration } from '@sentry/replay';
3+
import { InternalReplay, internalReplayIntegration } from '@sentry/replay';
44
import { bundleBrowserTracingIntegration as browserTracingIntegration } from './helpers';
55

66
import * as Sentry from './index.bundle.base';
@@ -21,8 +21,8 @@ export {
2121
// eslint-disable-next-line deprecation/deprecation
2222
Feedback,
2323
// eslint-disable-next-line deprecation/deprecation
24-
Replay,
25-
replayIntegration,
24+
InternalReplay as Replay,
25+
internalReplayIntegration as replayIntegration,
2626
feedbackIntegration,
2727
// eslint-disable-next-line deprecation/deprecation
2828
BrowserTracing,

packages/replay-canvas/src/canvas.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
import { CanvasManager } from '@sentry-internal/rrweb';
22
import { convertIntegrationFnToClass, defineIntegration } from '@sentry/core';
3-
import type { CanvasManagerInterface, CanvasManagerOptions } from '@sentry/replay';
3+
import type { InternalCanvasManagerInterface, InternalCanvasManagerOptions } from '@sentry/replay';
44
import type { Integration, IntegrationClass, IntegrationFn } from '@sentry/types';
55

66
interface ReplayCanvasOptions {
77
enableManualSnapshot?: boolean;
88
quality: 'low' | 'medium' | 'high';
99
}
1010

11-
type GetCanvasManager = (options: CanvasManagerOptions) => CanvasManagerInterface;
11+
type GetCanvasManager = (options: InternalCanvasManagerOptions) => InternalCanvasManagerInterface;
1212
export interface ReplayCanvasIntegrationOptions {
1313
enableManualSnapshot?: boolean;
1414
recordCanvas: true;
@@ -74,7 +74,7 @@ export const _replayCanvasIntegration = ((options: Partial<ReplayCanvasOptions>
7474
return {
7575
enableManualSnapshot,
7676
recordCanvas: true,
77-
getCanvasManager: (options: CanvasManagerOptions) => {
77+
getCanvasManager: (options: InternalCanvasManagerOptions) => {
7878
const manager = new CanvasManager({
7979
...options,
8080
enableManualSnapshot,

0 commit comments

Comments
 (0)