Skip to content

Commit

Permalink
fix(replay): Stop exporting EventType from @sentry-internal/rrweb (
Browse files Browse the repository at this point in the history
  • Loading branch information
mydea committed Jun 14, 2023
1 parent e176c57 commit d04488e
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 4 deletions.
1 change: 1 addition & 0 deletions packages/replay/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
export { Replay } from './integration';
export type {
EventType,
eventWithTime,
BreadcrumbFrame,
BreadcrumbFrameEvent,
Expand Down
2 changes: 1 addition & 1 deletion packages/replay/src/types/replayFrame.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import type { EventType } from '@sentry-internal/rrweb';
import type { Breadcrumb } from '@sentry/types';

import type {
Expand All @@ -10,6 +9,7 @@ import type {
PaintData,
ResourceData,
} from './performance';
import type { EventType } from './rrweb';

interface BaseBreadcrumbFrame {
timestamp: number;
Expand Down
13 changes: 11 additions & 2 deletions packages/replay/src/types/rrweb.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,19 @@
/* eslint-disable @typescript-eslint/naming-convention */

import type { EventType } from '@sentry-internal/rrweb';

type blockClass = string | RegExp;
type maskTextClass = string | RegExp;

/** Duplicate this from @sentry-internal/rrweb so we can export this as well. */
export enum EventType {
DomContentLoaded = 0,
Load = 1,
FullSnapshot = 2,
IncrementalSnapshot = 3,
Meta = 4,
Custom = 5,
Plugin = 6,
}

/**
* This is a partial copy of rrweb's eventWithTime type which only contains the properties
* we specifcally need in the SDK.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import type { EventType } from '@sentry-internal/rrweb';
import * as SentryCore from '@sentry/core';
import type { Transport } from '@sentry/types';
import * as SentryUtils from '@sentry/utils';

import type { Replay } from '../../src';
import type { ReplayContainer } from '../../src/replay';
import { clearSession } from '../../src/session/clearSession';
import type { EventType } from '../../src/types';
import * as SendReplayRequest from '../../src/util/sendReplayRequest';
import { BASE_TIMESTAMP, mockRrweb, mockSdk } from '../index';
import { useFakeTimers } from '../utils/use-fake-timers';
Expand Down

0 comments on commit d04488e

Please sign in to comment.