Skip to content

Commit b2a56bc

Browse files
authored
feat(replay): Update rrweb to 2.2.0 (#9414)
- feat: Export getCanvasManager & allow passing it to record() [#122](getsentry/rrweb#122) - feat: Remove hooks related code, which is not used [#126](getsentry/rrweb#126) - feat: Remove plugins related code, which is not used [#123](getsentry/rrweb#123) - feat: Refactor module scope vars & export mirror & `takeFullSnapshot` directly [#113](getsentry/rrweb#113) - fix(rrweb): Fix rule.style being undefined [#121](getsentry/rrweb#121) - ref: Avoid unnecessary cloning of objects or arrays [#125](getsentry/rrweb#125) - ref: Avoid cloning events to add timestamp [#124](getsentry/rrweb#124) Note: With this update, canvas is _always_ excluded, unless we opt in by passing a `getCanvasManager` function to `record()`. We'll provide a way to do this once we have a fully formed canvas story. For now, this will reduce bundle size considerably for all SDK users.
1 parent f78c1d4 commit b2a56bc

File tree

6 files changed

+25
-32
lines changed

6 files changed

+25
-32
lines changed

.size-limit.js

-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ module.exports = [
1818
config.plugins.push(
1919
new webpack.DefinePlugin({
2020
__SENTRY_DEBUG__: false,
21-
__RRWEB_EXCLUDE_CANVAS__: true,
2221
__RRWEB_EXCLUDE_SHADOW_DOM__: true,
2322
__RRWEB_EXCLUDE_IFRAME__: true,
2423
__SENTRY_EXCLUDE_REPLAY_WORKER__: true,

packages/replay/package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,8 @@
5252
"devDependencies": {
5353
"@babel/core": "^7.17.5",
5454
"@sentry-internal/replay-worker": "7.77.0",
55-
"@sentry-internal/rrweb": "2.1.0",
56-
"@sentry-internal/rrweb-snapshot": "2.1.0",
55+
"@sentry-internal/rrweb": "2.2.0",
56+
"@sentry-internal/rrweb-snapshot": "2.2.0",
5757
"jsdom-worker": "^0.2.1"
5858
},
5959
"dependencies": {

rollup/bundleHelpers.js

-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@ export function makeBaseBundleConfig(options) {
3636
const licensePlugin = makeLicensePlugin(licenseTitle);
3737
const tsPlugin = makeTSPlugin('es5');
3838
const rrwebBuildPlugin = makeRrwebBuildPlugin({
39-
excludeCanvas: true,
4039
excludeIframe: false,
4140
excludeShadowDom: false,
4241
});

rollup/npmHelpers.js

-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@ export function makeBaseNPMConfig(options = {}) {
3636
const extractPolyfillsPlugin = makeExtractPolyfillsPlugin();
3737
const setSdkSourcePlugin = makeSetSDKSourcePlugin('npm');
3838
const rrwebBuildPlugin = makeRrwebBuildPlugin({
39-
excludeCanvas: undefined,
4039
excludeShadowDom: undefined,
4140
excludeIframe: undefined,
4241
});

rollup/plugins/npmPlugins.js

+2-6
Original file line numberDiff line numberDiff line change
@@ -111,15 +111,11 @@ export function makeDebugBuildStatementReplacePlugin() {
111111
* b) can easily be modified by our users' bundlers to evaluate to false, facilitating the treeshaking of logger code.
112112
*
113113
* When `undefined` is passed,
114-
* end users can define e.g. `__SENTRY_EXCLUDE_CANVAS__` in their bundler to shake out canvas specific rrweb code.
114+
* end users can define e.g. `__RRWEB_EXCLUDE_SHADOW_DOM__` in their bundler to shake out shadow dom specific rrweb code.
115115
*/
116-
export function makeRrwebBuildPlugin({ excludeCanvas, excludeShadowDom, excludeIframe } = {}) {
116+
export function makeRrwebBuildPlugin({ excludeShadowDom, excludeIframe } = {}) {
117117
const values = {};
118118

119-
if (typeof excludeCanvas === 'boolean') {
120-
values['__RRWEB_EXCLUDE_CANVAS__'] = excludeCanvas;
121-
}
122-
123119
if (typeof excludeShadowDom === 'boolean') {
124120
values['__RRWEB_EXCLUDE_SHADOW_DOM__'] = excludeShadowDom;
125121
}

yarn.lock

+21-21
Original file line numberDiff line numberDiff line change
@@ -4925,33 +4925,33 @@
49254925
semver "7.3.2"
49264926
semver-intersect "1.4.0"
49274927

4928-
"@sentry-internal/rrdom@2.1.0":
4929-
version "2.1.0"
4930-
resolved "https://registry.yarnpkg.com/@sentry-internal/rrdom/-/rrdom-2.1.0.tgz#3e8822cd8f748de5c5a3c58121fac1eebbb767d5"
4931-
integrity sha512-99paancC1dkU9O1oUP9zAxfXupX+ha9Cglf9oINUsY/Ey8a6fOhFf5Z3wTzDne28OZ0KeivhBHc8yxeGzdCfGw==
4928+
"@sentry-internal/rrdom@2.2.0":
4929+
version "2.2.0"
4930+
resolved "https://registry.yarnpkg.com/@sentry-internal/rrdom/-/rrdom-2.2.0.tgz#edc292e55263e1e2541a9ed282ff998aae272a0a"
4931+
integrity sha512-pX2YxpZfKxfbeEKG+sc0WzlSMUsG9mgwK3IioeVulNovUmus6UhLLQHYeZEsQg0WehClCgBRZakk8qEFXbmwdg==
49324932
dependencies:
4933-
"@sentry-internal/rrweb-snapshot" "2.1.0"
4933+
"@sentry-internal/rrweb-snapshot" "2.2.0"
49344934

4935-
"@sentry-internal/rrweb-snapshot@2.1.0":
4936-
version "2.1.0"
4937-
resolved "https://registry.yarnpkg.com/@sentry-internal/rrweb-snapshot/-/rrweb-snapshot-2.1.0.tgz#7ed2d51bc8f580496676460bcccf37e1f6da5902"
4938-
integrity sha512-nqzSIO25We6XIGDwmZ66zRZ7QHGZApck4gbgFYXA/lcCB/zcY0aPD0DTv85oIVUfEo2RCjLeNoWWKwlrrRWtUQ==
4935+
"@sentry-internal/rrweb-snapshot@2.2.0":
4936+
version "2.2.0"
4937+
resolved "https://registry.yarnpkg.com/@sentry-internal/rrweb-snapshot/-/rrweb-snapshot-2.2.0.tgz#23a231ffd8ef734c2665690e8040a4ffc2faaf9f"
4938+
integrity sha512-txHynfjaJHLJvS+Kf9DOJyL7ur/nIBSJsF7OVKoJYJr43uRJzOyJ/SdliIrGz71IpVOCkuBa/ufRRVEVneRDDg==
49394939

4940-
"@sentry-internal/rrweb-types@2.1.0":
4941-
version "2.1.0"
4942-
resolved "https://registry.yarnpkg.com/@sentry-internal/rrweb-types/-/rrweb-types-2.1.0.tgz#2888915faec726937db86b4bb9f56e958fdef5e9"
4943-
integrity sha512-h9pCw59SJYormxY/R2O/olcynp6xAMzhzZ6lnQy6ezzDfsjjf4G83oqXnAhs6hmqBmDn1QbdODFewMHK6uVxYw==
4940+
"@sentry-internal/rrweb-types@2.2.0":
4941+
version "2.2.0"
4942+
resolved "https://registry.yarnpkg.com/@sentry-internal/rrweb-types/-/rrweb-types-2.2.0.tgz#79a76a8d5c436cf18cdee604ab95a9e3049d1949"
4943+
integrity sha512-0x7gL9cEF/rrdx1feIORD8+pHihJVA2t1wMRnT+PyiEJZToNJO08Mpbe2rlWgovfK3kGDj5GVFVXsPKGTj8c3A==
49444944
dependencies:
4945-
"@sentry-internal/rrweb-snapshot" "2.1.0"
4945+
"@sentry-internal/rrweb-snapshot" "2.2.0"
49464946

4947-
"@sentry-internal/rrweb@2.1.0":
4948-
version "2.1.0"
4949-
resolved "https://registry.yarnpkg.com/@sentry-internal/rrweb/-/rrweb-2.1.0.tgz#cc8166e9be4cdd2869d81bd65b4ba818063a491f"
4950-
integrity sha512-CXBZjl+TtRfPYjLtj5SX/ipqBtZLw5Z3MRIppODi/H7l7oQekOadUHu0+23lm82fl3CXK4jn9gMWcRRulUkn4Q==
4947+
"@sentry-internal/rrweb@2.2.0":
4948+
version "2.2.0"
4949+
resolved "https://registry.yarnpkg.com/@sentry-internal/rrweb/-/rrweb-2.2.0.tgz#f9b538f16718b88f6ca99b3393c5fbebc274bc06"
4950+
integrity sha512-gcdC9uuw6b5WZp1wsqC8p8yBN8bmiZN7X7UaxMrhBwH9TifbYxK1gNbgeKOI/GzZF9OVbduXYm3UDt9ZS1njGg==
49514951
dependencies:
4952-
"@sentry-internal/rrdom" "2.1.0"
4953-
"@sentry-internal/rrweb-snapshot" "2.1.0"
4954-
"@sentry-internal/rrweb-types" "2.1.0"
4952+
"@sentry-internal/rrdom" "2.2.0"
4953+
"@sentry-internal/rrweb-snapshot" "2.2.0"
4954+
"@sentry-internal/rrweb-types" "2.2.0"
49554955
"@types/css-font-loading-module" "0.0.7"
49564956
"@xstate/fsm" "^1.4.0"
49574957
base64-arraybuffer "^1.0.1"

0 commit comments

Comments
 (0)