From b5eb3239fe02117f68359e03a85466af00ab9c53 Mon Sep 17 00:00:00 2001 From: Shay Malchi Date: Mon, 16 Sep 2024 13:18:19 +0300 Subject: [PATCH] Fix player destroy function to not affect the DOM --- .changeset/config.json | 9 +++++++-- packages/rrdom-nodejs/CHANGELOG.md | 8 ++++++++ packages/rrdom-nodejs/package.json | 6 +++--- packages/rrdom/CHANGELOG.md | 7 +++++++ packages/rrdom/package.json | 6 +++--- packages/rrvideo/CHANGELOG.md | 7 +++++++ packages/rrvideo/package.json | 6 +++--- packages/rrweb-player/CHANGELOG.md | 2 ++ packages/rrweb-player/package.json | 4 ++-- packages/rrweb-snapshot/CHANGELOG.md | 2 ++ packages/rrweb-snapshot/package.json | 2 +- packages/rrweb/CHANGELOG.md | 11 +++++++++++ packages/rrweb/package.json | 8 ++++---- packages/rrweb/src/replay/index.ts | 2 +- packages/types/CHANGELOG.md | 7 +++++++ packages/types/package.json | 4 ++-- packages/web-extension/CHANGELOG.md | 8 ++++++++ packages/web-extension/package.json | 8 ++++---- 18 files changed, 82 insertions(+), 25 deletions(-) diff --git a/.changeset/config.json b/.changeset/config.json index e61e8ead06..9dea67bc61 100644 --- a/.changeset/config.json +++ b/.changeset/config.json @@ -1,6 +1,11 @@ { "$schema": "https://unpkg.com/@changesets/config@2.3.0/schema.json", - "changelog": ["@changesets/changelog-github", { "repo": "rrweb-io/rrweb" }], + "changelog": [ + "@changesets/changelog-github", + { + "repo": "rrweb-io/rrweb" + } + ], "commit": false, "fixed": [ [ @@ -16,7 +21,7 @@ ], "linked": [], "access": "public", - "baseBranch": "master", + "baseBranch": "main", "updateInternalDependencies": "patch", "ignore": [] } diff --git a/packages/rrdom-nodejs/CHANGELOG.md b/packages/rrdom-nodejs/CHANGELOG.md index e3db5195f5..05291913b1 100644 --- a/packages/rrdom-nodejs/CHANGELOG.md +++ b/packages/rrdom-nodejs/CHANGELOG.md @@ -1,5 +1,13 @@ # rrdom-nodejs +## 2.0.11 + +### Patch Changes + +- Updated dependencies []: + - @saola.ai/rrweb-snapshot@2.0.11 + - @saola.ai/rrdom@2.0.11 + ## 2.0.10 ### Patch Changes diff --git a/packages/rrdom-nodejs/package.json b/packages/rrdom-nodejs/package.json index 8cdc3b355c..3b92d66f32 100644 --- a/packages/rrdom-nodejs/package.json +++ b/packages/rrdom-nodejs/package.json @@ -1,6 +1,6 @@ { "name": "@saola.ai/rrdom-nodejs", - "version": "2.0.10", + "version": "2.0.11", "scripts": { "dev": "vite build --watch", "build": "tsc -noEmit && vite build", @@ -55,8 +55,8 @@ "cssom": "^0.5.0", "cssstyle": "^2.3.0", "nwsapi": "^2.2.0", - "@saola.ai/rrdom": "^2.0.10", - "@saola.ai/rrweb-snapshot": "^2.0.10" + "@saola.ai/rrdom": "^2.0.11", + "@saola.ai/rrweb-snapshot": "^2.0.11" }, "browserslist": [ "supports es6-class" diff --git a/packages/rrdom/CHANGELOG.md b/packages/rrdom/CHANGELOG.md index debebd9a65..6f69c3a435 100644 --- a/packages/rrdom/CHANGELOG.md +++ b/packages/rrdom/CHANGELOG.md @@ -1,5 +1,12 @@ # rrdom +## 2.0.11 + +### Patch Changes + +- Updated dependencies []: + - @saola.ai/rrweb-snapshot@2.0.11 + ## 2.0.10 ### Patch Changes diff --git a/packages/rrdom/package.json b/packages/rrdom/package.json index f3939c7b0e..0331d22492 100644 --- a/packages/rrdom/package.json +++ b/packages/rrdom/package.json @@ -1,6 +1,6 @@ { "name": "@saola.ai/rrdom", - "version": "2.0.10", + "version": "2.0.11", "homepage": "https://github.com/rrweb-io/rrweb/tree/main/packages/rrdom#readme", "license": "MIT", "type": "module", @@ -41,7 +41,7 @@ "url": "https://github.com/rrweb-io/rrweb/issues" }, "devDependencies": { - "@saola.ai/rrweb-types": "^2.0.10", + "@saola.ai/rrweb-types": "^2.0.11", "@types/puppeteer": "^5.4.4", "@typescript-eslint/eslint-plugin": "^5.23.0", "@typescript-eslint/parser": "^5.23.0", @@ -52,6 +52,6 @@ "vite-plugin-dts": "^3.8.1" }, "dependencies": { - "@saola.ai/rrweb-snapshot": "^2.0.10" + "@saola.ai/rrweb-snapshot": "^2.0.11" } } diff --git a/packages/rrvideo/CHANGELOG.md b/packages/rrvideo/CHANGELOG.md index 22e90cd2b2..5da7ad347f 100644 --- a/packages/rrvideo/CHANGELOG.md +++ b/packages/rrvideo/CHANGELOG.md @@ -1,5 +1,12 @@ # rrvideo +## 2.0.11 + +### Patch Changes + +- Updated dependencies []: + - @saola.ai/rrweb-player@2.0.11 + ## 2.0.10 ### Patch Changes diff --git a/packages/rrvideo/package.json b/packages/rrvideo/package.json index 1d3fc29acd..d9a03e80da 100644 --- a/packages/rrvideo/package.json +++ b/packages/rrvideo/package.json @@ -1,6 +1,6 @@ { "name": "@saola.ai/rrvideo", - "version": "2.0.10", + "version": "2.0.11", "description": "transform rrweb session into video", "main": "build/index.js", "bin": { @@ -27,13 +27,13 @@ "@types/node": "^18.15.11", "jest": "^27.5.1", "ts-jest": "^27.1.3", - "@saola.ai/rrweb-types": "^2.0.10" + "@saola.ai/rrweb-types": "^2.0.11" }, "dependencies": { "@open-tech-world/cli-progress-bar": "^2.0.2", "fs-extra": "^11.1.1", "minimist": "^1.2.5", "playwright": "^1.32.1", - "@saola.ai/rrweb-player": "^2.0.10" + "@saola.ai/rrweb-player": "^2.0.11" } } diff --git a/packages/rrweb-player/CHANGELOG.md b/packages/rrweb-player/CHANGELOG.md index 1b7a0d3f79..acf6ff7b20 100644 --- a/packages/rrweb-player/CHANGELOG.md +++ b/packages/rrweb-player/CHANGELOG.md @@ -1,5 +1,7 @@ # rrweb-player +## 2.0.11 + ## 2.0.10 ### Patch Changes diff --git a/packages/rrweb-player/package.json b/packages/rrweb-player/package.json index e4eea64534..34621f15ee 100644 --- a/packages/rrweb-player/package.json +++ b/packages/rrweb-player/package.json @@ -1,8 +1,8 @@ { "name": "@saola.ai/rrweb-player", - "version": "2.0.10", + "version": "2.0.11", "devDependencies": { - "@saola.ai/rrweb-types": "^2.0.10", + "@saola.ai/rrweb-types": "^2.0.11", "@sveltejs/adapter-auto": "^3.0.0", "@sveltejs/kit": "^2.0.0", "@sveltejs/package": "^2.0.0", diff --git a/packages/rrweb-snapshot/CHANGELOG.md b/packages/rrweb-snapshot/CHANGELOG.md index c8feec0824..eeaf174cf8 100644 --- a/packages/rrweb-snapshot/CHANGELOG.md +++ b/packages/rrweb-snapshot/CHANGELOG.md @@ -1,5 +1,7 @@ # rrweb-snapshot +## 2.0.11 + ## 2.0.10 ## 2.0.9 diff --git a/packages/rrweb-snapshot/package.json b/packages/rrweb-snapshot/package.json index b4694aac44..ea540a4de8 100644 --- a/packages/rrweb-snapshot/package.json +++ b/packages/rrweb-snapshot/package.json @@ -1,6 +1,6 @@ { "name": "@saola.ai/rrweb-snapshot", - "version": "2.0.10", + "version": "2.0.11", "description": "rrweb's component to take a snapshot of DOM, aka DOM serializer", "scripts": { "prepare": "npm run prepack", diff --git a/packages/rrweb/CHANGELOG.md b/packages/rrweb/CHANGELOG.md index d118b572f7..8ab9885c7e 100644 --- a/packages/rrweb/CHANGELOG.md +++ b/packages/rrweb/CHANGELOG.md @@ -1,5 +1,16 @@ # rrweb +## 2.0.11 + +### Patch Changes + +- Fix player destroy function to not affect the DOM + +- Updated dependencies []: + - @saola.ai/rrweb-snapshot@2.0.11 + - @saola.ai/rrdom@2.0.11 + - @saola.ai/rrweb-types@2.0.11 + ## 2.0.10 ### Patch Changes diff --git a/packages/rrweb/package.json b/packages/rrweb/package.json index c87c730052..64be7e8d90 100644 --- a/packages/rrweb/package.json +++ b/packages/rrweb/package.json @@ -1,6 +1,6 @@ { "name": "@saola.ai/rrweb", - "version": "2.0.10", + "version": "2.0.11", "description": "record and replay the web", "scripts": { "prepare": "npm run prepack", @@ -83,12 +83,12 @@ "vite-plugin-dts": "^3.8.1" }, "dependencies": { - "@saola.ai/rrweb-types": "^2.0.10", + "@saola.ai/rrweb-types": "^2.0.11", "@types/css-font-loading-module": "0.0.7", "@xstate/fsm": "^1.4.0", "base64-arraybuffer": "^1.0.1", "mitt": "^3.0.0", - "@saola.ai/rrdom": "^2.0.10", - "@saola.ai/rrweb-snapshot": "^2.0.10" + "@saola.ai/rrdom": "^2.0.11", + "@saola.ai/rrweb-snapshot": "^2.0.11" } } diff --git a/packages/rrweb/src/replay/index.ts b/packages/rrweb/src/replay/index.ts index ae07f8293d..2d9593bf72 100644 --- a/packages/rrweb/src/replay/index.ts +++ b/packages/rrweb/src/replay/index.ts @@ -582,7 +582,7 @@ export class Replayer { this.mirror.reset(); this.styleMirror.reset(); this.mediaManager.reset(); - this.config.root.removeChild(this.wrapper); + // this.config.root.removeChild(this.wrapper); - Leaving the DOM handling to React, causes issues with Vite's hot reloading this.emitter.emit(ReplayerEvents.Destroy); } diff --git a/packages/types/CHANGELOG.md b/packages/types/CHANGELOG.md index 81258aa43c..44b59642b9 100644 --- a/packages/types/CHANGELOG.md +++ b/packages/types/CHANGELOG.md @@ -1,5 +1,12 @@ # @rrweb/types +## 2.0.11 + +### Patch Changes + +- Updated dependencies []: + - @saola.ai/rrweb-snapshot@2.0.11 + ## 2.0.10 ### Patch Changes diff --git a/packages/types/package.json b/packages/types/package.json index 0f453f7e70..995ab42aff 100644 --- a/packages/types/package.json +++ b/packages/types/package.json @@ -1,6 +1,6 @@ { "name": "@saola.ai/rrweb-types", - "version": "2.0.10", + "version": "2.0.11", "publishConfig": { "access": "public" }, @@ -52,7 +52,7 @@ "dependencies": { "@changesets/cli": "^2.27.1", "@monorepo-utils/workspaces-to-typescript-project-references": "^2.8.2", - "@saola.ai/rrweb-snapshot": "^2.0.10", + "@saola.ai/rrweb-snapshot": "^2.0.11", "browserslist": "^4.22.1", "concurrently": "^7.1.0", "cssom": "https://registry.npmjs.org/rrweb-cssom/-/rrweb-cssom-0.6.0.tgz", diff --git a/packages/web-extension/CHANGELOG.md b/packages/web-extension/CHANGELOG.md index d3c19d7dce..e8a0d9c6dc 100644 --- a/packages/web-extension/CHANGELOG.md +++ b/packages/web-extension/CHANGELOG.md @@ -1,5 +1,13 @@ # @rrweb/web-extension +## 2.0.11 + +### Patch Changes + +- Updated dependencies []: + - @saola.ai/rrweb@2.0.11 + - @saola.ai/rrweb-player@2.0.11 + ## 2.0.10 ### Patch Changes diff --git a/packages/web-extension/package.json b/packages/web-extension/package.json index 272d0f953a..660bbfc5b2 100644 --- a/packages/web-extension/package.json +++ b/packages/web-extension/package.json @@ -1,7 +1,7 @@ { "name": "@saola.ai/rrweb-web-extension", "private": true, - "version": "2.0.10", + "version": "2.0.11", "description": "The web extension of rrweb which helps to run rrweb on any website out of box", "author": "rrweb-io", "license": "MIT", @@ -18,7 +18,7 @@ "prepublish": "yarn build" }, "devDependencies": { - "@saola.ai/rrweb-types": "^2.0.10", + "@saola.ai/rrweb-types": "^2.0.11", "@types/react-dom": "^18.0.6", "@types/webextension-polyfill": "^0.9.1", "@vitejs/plugin-react": "^4.2.1", @@ -42,7 +42,7 @@ "react-dom": "^18.2.0", "react-icons": "^4.4.0", "react-router-dom": "^6.4.1", - "@saola.ai/rrweb": "^2.0.10", - "@saola.ai/rrweb-player": "^2.0.10" + "@saola.ai/rrweb": "^2.0.11", + "@saola.ai/rrweb-player": "^2.0.11" } }