diff --git a/package.json b/package.json index 17e2980c1..589235fae 100644 --- a/package.json +++ b/package.json @@ -58,7 +58,8 @@ "@rollup/plugin-node-resolve": "^15.3.0", "@rollup/plugin-terser": "^0.4.4", "@rollup/plugin-typescript": "^12.1.1", - "@rrweb/types": "2.0.0-alpha.16", + "@rrweb/rrweb-plugin-console-record": "2.0.0-alpha.17", + "@rrweb/types": "2.0.0-alpha.17", "@sentry/types": "8.7.0", "@testing-library/dom": "^9.3.0", "@testing-library/jest-dom": "^6.5.0", @@ -103,9 +104,8 @@ "rollup": "^4.24.0", "rollup-plugin-dts": "^6.1.1", "rollup-plugin-visualizer": "^5.12.0", - "rrweb": "2.0.0-alpha.16", - "@rrweb/rrweb-plugin-console-record": "2.0.0-alpha.15", - "rrweb-snapshot": "2.0.0-alpha.16", + "rrweb": "2.0.0-alpha.17", + "rrweb-snapshot": "2.0.0-alpha.17", "sinon": "9.0.2", "testcafe": "1.19.0", "testcafe-browser-provider-browserstack": "1.14.0", @@ -127,7 +127,7 @@ ], "pnpm": { "patchedDependencies": { - "rrweb@2.0.0-alpha.16": "patches/rrweb@2.0.0-alpha.16.patch" + "rrweb@2.0.0-alpha.17": "patches/rrweb@2.0.0-alpha.17.patch" } } } diff --git a/patches/rrweb@2.0.0-alpha.16.patch b/patches/rrweb@2.0.0-alpha.17.patch similarity index 81% rename from patches/rrweb@2.0.0-alpha.16.patch rename to patches/rrweb@2.0.0-alpha.17.patch index 5a76bf4d6..1101b681e 100644 --- a/patches/rrweb@2.0.0-alpha.16.patch +++ b/patches/rrweb@2.0.0-alpha.17.patch @@ -1,10 +1,10 @@ diff --git a/dist/rrweb.js b/dist/rrweb.js -index 1db2d08b2fe9a73521001c3aa88b1a64d1b3e71a..5a3ea8410b0f1dfa7248b9cb9752c04eea7b3ad3 100644 +index 12f4ad3c7f897fe8a9ee2f4595dcf37f302d17c5..2fb78e052ab4daf9f8d2435d74035564b8f1ef13 100644 --- a/dist/rrweb.js +++ b/dist/rrweb.js -@@ -85,6 +85,9 @@ function isCSSImportRule(rule) { - function isCSSStyleRule(rule) { - return "selectorText" in rule; +@@ -246,6 +246,9 @@ function isCSSImportRule(rule2) { + function isCSSStyleRule(rule2) { + return "selectorText" in rule2; } +function findStylesheet(doc, href) { + return Array.from(doc.styleSheets).find((s) => s.href === href); @@ -12,7 +12,7 @@ index 1db2d08b2fe9a73521001c3aa88b1a64d1b3e71a..5a3ea8410b0f1dfa7248b9cb9752c04e class Mirror { constructor() { __publicField$1(this, "idNodeMap", /* @__PURE__ */ new Map()); -@@ -661,9 +664,14 @@ function serializeElementNode(n2, options) { +@@ -821,9 +824,14 @@ function serializeElementNode(n2, options) { } } if (tagName === "link" && inlineStylesheet) { @@ -22,15 +22,15 @@ index 1db2d08b2fe9a73521001c3aa88b1a64d1b3e71a..5a3ea8410b0f1dfa7248b9cb9752c04e + const href = n2.href; + let stylesheet = findStylesheet(doc, href); + if (!stylesheet && href.includes('.css')) { -+ const rootDomain = window.location.origin -+ const stylesheetPath = href.replace(window.location.href, '') -+ const potentialStylesheetHref = rootDomain + '/' + stylesheetPath ++ const rootDomain = window.location.origin; ++ const stylesheetPath = href.replace(window.location.href, ''); ++ const potentialStylesheetHref = rootDomain + '/' + stylesheetPath; + stylesheet = findStylesheet(doc, potentialStylesheetHref); + } let cssText = null; if (stylesheet) { cssText = stringifyStylesheet(stylesheet); -@@ -5016,11 +5024,19 @@ class CanvasManager { +@@ -13276,11 +13284,19 @@ class CanvasManager { let rafId; const getCanvas = () => { const matchedCanvas = []; @@ -55,7 +55,7 @@ index 1db2d08b2fe9a73521001c3aa88b1a64d1b3e71a..5a3ea8410b0f1dfa7248b9cb9752c04e return matchedCanvas; }; const takeCanvasSnapshots = (timestamp) => { -@@ -5041,13 +5057,20 @@ class CanvasManager { +@@ -13301,13 +13317,20 @@ class CanvasManager { context.clear(context.COLOR_BUFFER_BIT); } } @@ -79,20 +79,20 @@ index 1db2d08b2fe9a73521001c3aa88b1a64d1b3e71a..5a3ea8410b0f1dfa7248b9cb9752c04e dataURLOptions: options.dataURLOptions }, [bitmap] -@@ -9805,6 +9828,7 @@ class Replayer { - } +@@ -16841,6 +16864,7 @@ class Replayer { const { addCustomEvent } = record; const { freezePage } = record; -+const version = "2.0.0-alpha.16" + const { takeFullSnapshot } = record; ++const version = "2.0.0-alpha.17"; export { EventType, IncrementalSource, -@@ -9816,6 +9840,7 @@ export { - freezePage, +@@ -16853,6 +16877,7 @@ export { _mirror as mirror, record, + takeFullSnapshot, - utils + utils, -+ version, ++ version }; //# sourceMappingURL=rrweb.js.map diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index bdee9346f..3520100a8 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -5,9 +5,9 @@ settings: excludeLinksFromLockfile: false patchedDependencies: - rrweb@2.0.0-alpha.16: - hash: x52pllmg6k5suqkcoa7bdybazq - path: patches/rrweb@2.0.0-alpha.16.patch + rrweb@2.0.0-alpha.17: + hash: ovqfbi26faqgvd4dbhm6fm7hwm + path: patches/rrweb@2.0.0-alpha.17.patch dependencies: core-js: @@ -67,11 +67,11 @@ devDependencies: specifier: ^12.1.1 version: 12.1.1(rollup@4.24.0)(tslib@2.5.0)(typescript@5.5.4) '@rrweb/rrweb-plugin-console-record': - specifier: 2.0.0-alpha.15 - version: 2.0.0-alpha.15(rrweb@2.0.0-alpha.16) + specifier: 2.0.0-alpha.17 + version: 2.0.0-alpha.17(rrweb@2.0.0-alpha.17) '@rrweb/types': - specifier: 2.0.0-alpha.16 - version: 2.0.0-alpha.16 + specifier: 2.0.0-alpha.17 + version: 2.0.0-alpha.17 '@sentry/types': specifier: 8.7.0 version: 8.7.0 @@ -205,11 +205,11 @@ devDependencies: specifier: ^5.12.0 version: 5.12.0(rollup@4.24.0) rrweb: - specifier: 2.0.0-alpha.16 - version: 2.0.0-alpha.16(patch_hash=x52pllmg6k5suqkcoa7bdybazq) + specifier: 2.0.0-alpha.17 + version: 2.0.0-alpha.17(patch_hash=ovqfbi26faqgvd4dbhm6fm7hwm) rrweb-snapshot: - specifier: 2.0.0-alpha.16 - version: 2.0.0-alpha.16 + specifier: 2.0.0-alpha.17 + version: 2.0.0-alpha.17 sinon: specifier: 9.0.2 version: 9.0.2 @@ -2802,18 +2802,22 @@ packages: dev: true optional: true - /@rrweb/rrweb-plugin-console-record@2.0.0-alpha.15(rrweb@2.0.0-alpha.16): - resolution: {integrity: sha512-66iOkD99AS8WqQNAnDtkJsQnSD8E+tZx3tWMJltpRDovXs4GoBE9eYxQeTWSigz6iaqbrxYPIqQIRck+zqnheg==} + /@rrweb/rrweb-plugin-console-record@2.0.0-alpha.17(rrweb@2.0.0-alpha.17): + resolution: {integrity: sha512-tjNJ3wWUDMMf275xr4Rb5tVYF2UR+wXvSxnyS9tRKnRa574PQQvx7sGbqM/O9AytYjnbiTrAMqNR7OFysGCMwQ==} peerDependencies: - rrweb: ^2.0.0-alpha.15 + rrweb: ^2.0.0-alpha.17 dependencies: - rrweb: 2.0.0-alpha.16(patch_hash=x52pllmg6k5suqkcoa7bdybazq) + rrweb: 2.0.0-alpha.17(patch_hash=ovqfbi26faqgvd4dbhm6fm7hwm) dev: true - /@rrweb/types@2.0.0-alpha.16: - resolution: {integrity: sha512-E6cACNVsm+NUhn7dzocQoKyXI7BHrHRRm5Ab23yrAzEQ2caWocCEYJhqDlc4KRVJBkQfXZfyWm8+2d0uggFuZg==} + /@rrweb/types@2.0.0-alpha.17: + resolution: {integrity: sha512-AfDTVUuCyCaIG0lTSqYtrZqJX39ZEYzs4fYKnexhQ+id+kbZIpIJtaut5cto6dWZbB3SEe4fW0o90Po3LvTmfg==} dependencies: - rrweb-snapshot: 2.0.0-alpha.16 + rrweb-snapshot: 2.0.0-alpha.17 + dev: true + + /@rrweb/utils@2.0.0-alpha.17: + resolution: {integrity: sha512-HCsasPERBwOS9/LQeOytO2ETKTCqRj1wORBuxiy3t41hKhmi225DdrUPiWnyDdTQm1GdVbOymMRknJVPnZaSXw==} dev: true /@sentry/types@8.7.0: @@ -9402,26 +9406,23 @@ packages: rrweb-snapshot: 2.0.0-alpha.17 dev: true - /rrweb-snapshot@2.0.0-alpha.16: - resolution: {integrity: sha512-p81OrzUiCmUMZzJu4fGHeLB00PIbVIqsV/zhqzr2pitHTUXpMYcyOvDWt0vHdla0vnowEPaHq3Wsu6cUc732/w==} - dev: true - /rrweb-snapshot@2.0.0-alpha.17: resolution: {integrity: sha512-GBg5pV8LHOTbeVmH2VHLEFR0mc2QpQMzAvcoxEGfPNWgWHc8UvKCyq7pqN1vA+fDZ+yXXbixeO0kB2pzVvFCBw==} dependencies: postcss: 8.4.47 dev: true - /rrweb@2.0.0-alpha.16(patch_hash=x52pllmg6k5suqkcoa7bdybazq): - resolution: {integrity: sha512-Uxl7quZc8gm9RqrUR+10prZBoAfKWvM5lqlWDe7zd2wAkMiBQawDHUrmt8dByx96aiLonvm4oLsbBK14A0A0Tg==} + /rrweb@2.0.0-alpha.17(patch_hash=ovqfbi26faqgvd4dbhm6fm7hwm): + resolution: {integrity: sha512-GQxBkCC4r9XL2bwSdv7iIS49M3cEA8OtObVq0rrQ4GUT4+h7omucGQ4x7m5YN5Vq1oalStBaBlYqF7yRnfG3JA==} dependencies: - '@rrweb/types': 2.0.0-alpha.16 + '@rrweb/types': 2.0.0-alpha.17 + '@rrweb/utils': 2.0.0-alpha.17 '@types/css-font-loading-module': 0.0.7 '@xstate/fsm': 1.5.2 base64-arraybuffer: 1.0.2 mitt: 3.0.0 rrdom: 2.0.0-alpha.17 - rrweb-snapshot: 2.0.0-alpha.16 + rrweb-snapshot: 2.0.0-alpha.17 dev: true patched: true