Skip to content
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

feat(replay): Add back deprecated maskInputOptions #6981

Merged
merged 10 commits into from
Feb 1, 2023
Merged
Show file tree
Hide file tree
Changes from 6 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
3 changes: 3 additions & 0 deletions packages/replay/src/integration.ts
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,8 @@ export class Replay implements Integration {
// eslint-disable-next-line deprecation/deprecation
blockSelector,
// eslint-disable-next-line deprecation/deprecation
maskInputOptions,
// eslint-disable-next-line deprecation/deprecation
maskTextClass,
// eslint-disable-next-line deprecation/deprecation
maskTextSelector,
Expand All @@ -77,6 +79,7 @@ export class Replay implements Integration {
}: ReplayConfiguration = {}) {
this._recordingOptions = {
maskAllInputs,
{...maskInputOptions, password: true},
maskTextFn: maskFn,
maskInputFn: maskFn,

Expand Down
12 changes: 8 additions & 4 deletions packages/replay/src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,14 @@ export interface DeprecatedPrivacyOptions {
* @deprecated Use `block` which accepts an array of CSS selectors
*/
blockClass?: RecordingOptions['blockClass'];
/**
* @deprecated Use `ignore` which accepts an array of CSS selectors
*/
ignoreClass?: RecordingOptions['ignoreClass'];
/**
* @deprecated Use `mask` which accepts an array of CSS selectors
*/
maskInputOptions?: RecordingOptions['maskInputOptions'];
/**
* @deprecated Use `mask` which accepts an array of CSS selectors
*/
Expand All @@ -166,10 +174,6 @@ export interface DeprecatedPrivacyOptions {
* @deprecated Use `mask` which accepts an array of CSS selectors
*/
maskTextSelector?: RecordingOptions['maskTextSelector'];
/**
* @deprecated Use `ignore` which accepts an array of CSS selectors
*/
ignoreClass?: RecordingOptions['ignoreClass'];
}

export interface ReplayConfiguration
Expand Down
3 changes: 2 additions & 1 deletion packages/replay/src/util/getPrivacyOptions.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import type { DeprecatedPrivacyOptions, ReplayIntegrationPrivacyOptions } from '../types';

type GetPrivacyOptions = Required<Omit<ReplayIntegrationPrivacyOptions, 'maskFn'>> & DeprecatedPrivacyOptions;
type GetPrivacyOptions = Required<Omit<ReplayIntegrationPrivacyOptions, 'maskFn'>> &
Omit<DeprecatedPrivacyOptions, 'maskInputOptions'>;
interface GetPrivacyReturn {
maskTextSelector: string;
unmaskTextSelector: string;
Expand Down
1 change: 1 addition & 0 deletions packages/replay/test/integration/rrweb.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ describe('Integration | rrweb', () => {
"inlineStylesheet": true,
"maskAllInputs": true,
"maskInputFn": undefined,
"maskInputOptions": undefined,
"maskInputSelector": ".sentry-mask,[data-sentry-mask]",
"maskTextFn": undefined,
"maskTextSelector": "body *:not(style), body *:not(script)",
Expand Down