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

ref(replay): Use Sentry's forked rrweb packages #6935

Merged
merged 1 commit into from
Jan 26, 2023
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: 1 addition & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,7 @@
"postpublish": "lerna run --stream --concurrency 1 postpublish",
"test": "lerna run --ignore @sentry-internal/* test",
"test-ci-browser": "lerna run test --ignore \"@sentry/{node,opentelemetry-node,serverless,nextjs,remix,gatsby}\" --ignore @sentry-internal/*",
"test-ci-node": "ts-node ./scripts/node-unit-tests.ts",
"postinstall": "patch-package"
"test-ci-node": "ts-node ./scripts/node-unit-tests.ts"
},
"volta": {
"node": "16.18.1",
Expand Down Expand Up @@ -91,7 +90,6 @@
"mocha": "^6.1.4",
"nodemon": "^2.0.16",
"npm-run-all": "^4.1.5",
"patch-package": "^6.5.0",
"prettier": "2.7.1",
"recast": "^0.20.5",
"replace-in-file": "^4.0.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/replay/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
"@types/pako": "^2.0.0",
"jsdom-worker": "^0.2.1",
"pako": "^2.0.4",
"rrweb": "1.1.3",
"@sentry-internal/rrweb": "1.100.1",
"tslib": "^1.9.3"
},
"dependencies": {
Expand Down
2 changes: 1 addition & 1 deletion packages/replay/src/coreHandlers/addBreadcrumbEvent.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { EventType } from '@sentry-internal/rrweb';
import type { Breadcrumb } from '@sentry/types';
import { EventType } from 'rrweb';

import type { ReplayContainer } from '../types';
import { addEvent } from '../util/addEvent';
Expand Down
2 changes: 1 addition & 1 deletion packages/replay/src/coreHandlers/handleDom.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { record } from '@sentry-internal/rrweb';
import type { Breadcrumb } from '@sentry/types';
import { htmlTreeAsString } from '@sentry/utils';
import { record } from 'rrweb';

import type { ReplayContainer } from '../types';
import { createBreadcrumb } from '../util/createBreadcrumb';
Expand Down
2 changes: 1 addition & 1 deletion packages/replay/src/replay.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
/* eslint-disable max-lines */ // TODO: We might want to split this file up
import { EventType, record } from '@sentry-internal/rrweb';
import { captureException } from '@sentry/core';
import type { Breadcrumb, ReplayRecordingMode } from '@sentry/types';
import type { RateLimits } from '@sentry/utils';
import { disabledUntil, logger } from '@sentry/utils';
import { EventType, record } from 'rrweb';

import { MAX_SESSION_LIFE, SESSION_IDLE_DURATION, VISIBILITY_CHANGE_TIMEOUT, WINDOW } from './constants';
import { setupPerformanceObserver } from './coreHandlers/performanceObserver';
Expand Down
2 changes: 1 addition & 1 deletion packages/replay/src/util/createPerformanceEntries.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { record } from '@sentry-internal/rrweb';
import { browserPerformanceTimeOrigin } from '@sentry/utils';
import { record } from 'rrweb';

import { WINDOW } from '../constants';
import type {
Expand Down
2 changes: 1 addition & 1 deletion packages/replay/src/util/createPerformanceSpans.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { EventType } from 'rrweb';
import { EventType } from '@sentry-internal/rrweb';

import type { AddEventResult, ReplayContainer, ReplayPerformanceEntry } from '../types';
import { addEvent } from './addEvent';
Expand Down
2 changes: 1 addition & 1 deletion packages/replay/test/integration/autoSaveSession.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { EventType } from 'rrweb';
import { EventType } from '@sentry-internal/rrweb';

import type { RecordingEvent } from '../../src/types';
import { addEvent } from '../../src/util/addEvent';
Expand Down
6 changes: 3 additions & 3 deletions packages/replay/test/mocks/mockRrweb.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { record as rrwebRecord } from 'rrweb';
import type { record as rrwebRecord } from '@sentry-internal/rrweb';

import type { RecordingEvent } from '../../src/types';

Expand Down Expand Up @@ -41,8 +41,8 @@ export function mockRrweb(): { record: RecordMock } {
mockRecordFn._emitter(createCheckoutPayload(isCheckout), isCheckout);
});

jest.mock('rrweb', () => {
const ActualRrweb = jest.requireActual('rrweb');
jest.mock('@sentry-internal/rrweb', () => {
const ActualRrweb = jest.requireActual('@sentry-internal/rrweb');

return {
...ActualRrweb,
Expand Down
Loading