Skip to content

Commit d04488e

Browse files
authored
fix(replay): Stop exporting EventType from @sentry-internal/rrweb (#8334)
1 parent e176c57 commit d04488e

File tree

4 files changed

+14
-4
lines changed

4 files changed

+14
-4
lines changed

packages/replay/src/index.ts

+1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
export { Replay } from './integration';
22
export type {
3+
EventType,
34
eventWithTime,
45
BreadcrumbFrame,
56
BreadcrumbFrameEvent,

packages/replay/src/types/replayFrame.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import type { EventType } from '@sentry-internal/rrweb';
21
import type { Breadcrumb } from '@sentry/types';
32

43
import type {
@@ -10,6 +9,7 @@ import type {
109
PaintData,
1110
ResourceData,
1211
} from './performance';
12+
import type { EventType } from './rrweb';
1313

1414
interface BaseBreadcrumbFrame {
1515
timestamp: number;

packages/replay/src/types/rrweb.ts

+11-2
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,19 @@
11
/* eslint-disable @typescript-eslint/naming-convention */
22

3-
import type { EventType } from '@sentry-internal/rrweb';
4-
53
type blockClass = string | RegExp;
64
type maskTextClass = string | RegExp;
75

6+
/** Duplicate this from @sentry-internal/rrweb so we can export this as well. */
7+
export enum EventType {
8+
DomContentLoaded = 0,
9+
Load = 1,
10+
FullSnapshot = 2,
11+
IncrementalSnapshot = 3,
12+
Meta = 4,
13+
Custom = 5,
14+
Plugin = 6,
15+
}
16+
817
/**
918
* This is a partial copy of rrweb's eventWithTime type which only contains the properties
1019
* we specifcally need in the SDK.

packages/replay/test/integration/beforeAddRecordingEvent.test.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
import type { EventType } from '@sentry-internal/rrweb';
21
import * as SentryCore from '@sentry/core';
32
import type { Transport } from '@sentry/types';
43
import * as SentryUtils from '@sentry/utils';
54

65
import type { Replay } from '../../src';
76
import type { ReplayContainer } from '../../src/replay';
87
import { clearSession } from '../../src/session/clearSession';
8+
import type { EventType } from '../../src/types';
99
import * as SendReplayRequest from '../../src/util/sendReplayRequest';
1010
import { BASE_TIMESTAMP, mockRrweb, mockSdk } from '../index';
1111
import { useFakeTimers } from '../utils/use-fake-timers';

0 commit comments

Comments
 (0)