-
Notifications
You must be signed in to change notification settings - Fork 206
chore: upgrade rrweb to alpha.17 #1488
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
Closed
Closed
Changes from 2 commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -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.15", | ||
| "@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": { | ||
| "[email protected].16": "patches/[email protected].16.patch" | ||
| "[email protected].17": "patches/[email protected].17.patch" | ||
| } | ||
| } | ||
| } | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,18 +1,18 @@ | ||
| diff --git a/dist/rrweb.js b/dist/rrweb.js | ||
| index 1db2d08b2fe9a73521001c3aa88b1a64d1b3e71a..5a3ea8410b0f1dfa7248b9cb9752c04eea7b3ad3 100644 | ||
| index 12f4ad3c7f897fe8a9ee2f4595dcf37f302d17c5..43f6bd95676c456e187b7bd68ba7af56e7b09f29 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); | ||
| +} | ||
| 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; | ||
|
Comment on lines
-25
to
+27
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. No real difference here, just added |
||
| + 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,3 @@ index 1db2d08b2fe9a73521001c3aa88b1a64d1b3e71a..5a3ea8410b0f1dfa7248b9cb9752c04e | |
| dataURLOptions: options.dataURLOptions | ||
| }, | ||
| [bitmap] | ||
| @@ -9805,6 +9828,7 @@ class Replayer { | ||
| } | ||
| const { addCustomEvent } = record; | ||
| const { freezePage } = record; | ||
| +const version = "2.0.0-alpha.16" | ||
| export { | ||
| EventType, | ||
| IncrementalSource, | ||
| @@ -9816,6 +9840,7 @@ export { | ||
| freezePage, | ||
| _mirror as mirror, | ||
| record, | ||
| - utils | ||
| + utils, | ||
| + version, | ||
| }; | ||
| //# sourceMappingURL=rrweb.js.map | ||
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.