Skip to content

ref(v8/replay): Deprecate @sentry/replay exports #11243

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
53 changes: 38 additions & 15 deletions packages/replay/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,18 +1,41 @@
/** @deprecated Use the export from `@sentry/replay` or from framework-specific SDKs like `@sentry/react` or `@sentry/vue` */
export { 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';
Comment on lines +10 to +11
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do JSDoc comments work like this? I think we need to add the comments to the actual declarations of the exported items.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's true! I fixed it in #11242 by exporting an internal variable that can be re-exported from @sentry/browser and also exporting the deprecated value.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This made me think. We don't have to deprecate anything in v8. We can just remove it.


/** @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';