Skip to content
Merged
Show file tree
Hide file tree
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
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@

## Unreleased

### Major Changes

- `Sentry.captureUserFeedback` removed, use `Sentry.captureFeedback` instead ([#4855](https://github.com/getsentry/sentry-react-native/pull/4855))

### Changes

- Use `Replay` interface for `browserReplayIntegration` return type ([#4858](https://github.com/getsentry/sentry-react-native/pull/4858))
Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/js/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ export { SDK_NAME, SDK_VERSION } from './version';
export type { ReactNativeOptions } from './options';
export { ReactNativeClient } from './client';

export { init, wrap, nativeCrash, flush, close, captureUserFeedback, withScope, crashedLastRun } from './sdk';
export { init, wrap, nativeCrash, flush, close, withScope, crashedLastRun } from './sdk';
export { TouchEventBoundary, withTouchEventBoundary } from './touchevents';

export {
Expand Down
28 changes: 12 additions & 16 deletions packages/core/src/js/sdk.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,16 @@
/* eslint-disable complexity */
import type { Breadcrumb, BreadcrumbHint, Integration, Scope, SendFeedbackParams, UserFeedback } from '@sentry/core';
import { captureFeedback, getClient, getGlobalScope, getIntegrationsToSetup, getIsolationScope, initAndBind, logger, makeDsn, stackParserFromStackParserOptions, withScope as coreWithScope } from '@sentry/core';
import type { Breadcrumb, BreadcrumbHint, Integration, Scope } from '@sentry/core';
import {
getClient,
getGlobalScope,
getIntegrationsToSetup,
getIsolationScope,
initAndBind,
logger,
makeDsn,
stackParserFromStackParserOptions,
withScope as coreWithScope,
} from '@sentry/core';
import {
defaultStackParser,
makeFetchTransport,
Expand Down Expand Up @@ -219,20 +229,6 @@ export async function close(): Promise<void> {
}
}

/**
* Captures user feedback and sends it to Sentry.
* @deprecated Use `Sentry.captureFeedback` instead.
*/
export function captureUserFeedback(feedback: UserFeedback): void {
const feedbackParams: SendFeedbackParams = {
name: feedback.name,
email: feedback.email,
message: feedback.comments,
associatedEventId: feedback.event_id,
};
captureFeedback(feedbackParams);
}
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

We should also remove the SendFeedbackParams, UserFeedback and captureFeedback from the imports.
Apart from that and the changelog LGTM.
Thank you for removing the deprecated call 🙇


/**
* Creates a new scope with and executes the given operation within.
* The scope is automatically removed once the operation
Expand Down
Loading