some minor changes for releasing the extension and revert failed publish PR #1123 (#1132)

* improve extension bundle

* Revert "Version Packages (alpha) (#1123)"

This reverts commit 39f8c24f1d.
This commit is contained in:
Yun Feng
2026-04-01 12:00:00 +08:00
committed by GitHub
parent 6c9ff8183a
commit 617e63c483
20 changed files with 56 additions and 199 deletions

View File

@@ -7,17 +7,7 @@
"rrweb": "2.0.0-alpha.4", "rrweb": "2.0.0-alpha.4",
"rrweb-player": "1.0.0-alpha.4", "rrweb-player": "1.0.0-alpha.4",
"rrweb-snapshot": "2.0.0-alpha.4", "rrweb-snapshot": "2.0.0-alpha.4",
"@rrweb/types": "2.0.0-alpha.4", "@rrweb/types": "2.0.0-alpha.4"
"@rrweb/web-extension": "2.0.0-alpha.4"
}, },
"changesets": [ "changesets": []
"five-peas-lay",
"loud-seals-raise",
"lovely-pears-cross",
"nervous-poets-grin",
"real-trains-switch",
"serious-ants-juggle",
"tidy-yaks-joke",
"twenty-lies-switch"
]
} }

View File

@@ -1,18 +0,0 @@
# rrdom-nodejs
## 2.0.0-alpha.5
### Major Changes
- [#1127](https://github.com/rrweb-io/rrweb/pull/1127) [`3cc4323`](https://github.com/rrweb-io/rrweb/commit/3cc4323094065a12f8b65afecd45061d604e245f) Thanks [@YunFeng0817](https://github.com/YunFeng0817)! - Refactor: Improve performance by 80% in a super large benchmark case.
1. Refactor: change the data structure of childNodes from array to linked list
2. Improve the performance of the "contains" function. New algorithm will reduce the complexity from O(n) to O(logn)
### Patch Changes
- [#1126](https://github.com/rrweb-io/rrweb/pull/1126) [`227d43a`](https://github.com/rrweb-io/rrweb/commit/227d43abb93d57cadc70c760b28c46911bf7d8ff) Thanks [@YunFeng0817](https://github.com/YunFeng0817)! - Refactor all suffix of bundled scripts with commonjs module from 'js' to cjs [#1087](https://github.com/rrweb-io/rrweb/pull/1087).
- Updated dependencies [[`1385f7a`](https://github.com/rrweb-io/rrweb/commit/1385f7acc0052f83be1458a7b00e18c026ee393f), [`227d43a`](https://github.com/rrweb-io/rrweb/commit/227d43abb93d57cadc70c760b28c46911bf7d8ff), [`227d43a`](https://github.com/rrweb-io/rrweb/commit/227d43abb93d57cadc70c760b28c46911bf7d8ff), [`3cc4323`](https://github.com/rrweb-io/rrweb/commit/3cc4323094065a12f8b65afecd45061d604e245f)]:
- rrweb-snapshot@2.0.0-alpha.5
- rrdom@2.0.0-alpha.5

View File

@@ -1,6 +1,6 @@
{ {
"name": "rrdom-nodejs", "name": "rrdom-nodejs",
"version": "2.0.0-alpha.5", "version": "0.1.7",
"scripts": { "scripts": {
"dev": "rollup -c -w", "dev": "rollup -c -w",
"bundle": "rollup --config", "bundle": "rollup --config",
@@ -49,8 +49,8 @@
"cssom": "^0.5.0", "cssom": "^0.5.0",
"cssstyle": "^2.3.0", "cssstyle": "^2.3.0",
"nwsapi": "^2.2.0", "nwsapi": "^2.2.0",
"rrdom": "^2.0.0-alpha.5", "rrdom": "^0.1.7",
"rrweb-snapshot": "^2.0.0-alpha.5" "rrweb-snapshot": "^2.0.0-alpha.4"
}, },
"browserslist": [ "browserslist": [
"supports es6-class" "supports es6-class"

View File

@@ -1,19 +0,0 @@
# rrdom
## 2.0.0-alpha.5
### Major Changes
- [#1127](https://github.com/rrweb-io/rrweb/pull/1127) [`3cc4323`](https://github.com/rrweb-io/rrweb/commit/3cc4323094065a12f8b65afecd45061d604e245f) Thanks [@YunFeng0817](https://github.com/YunFeng0817)! - Refactor: Improve performance by 80% in a super large benchmark case.
1. Refactor: change the data structure of childNodes from array to linked list
2. Improve the performance of the "contains" function. New algorithm will reduce the complexity from O(n) to O(logn)
### Patch Changes
- [#1126](https://github.com/rrweb-io/rrweb/pull/1126) [`227d43a`](https://github.com/rrweb-io/rrweb/commit/227d43abb93d57cadc70c760b28c46911bf7d8ff) Thanks [@YunFeng0817](https://github.com/YunFeng0817)! - Refactor all suffix of bundled scripts with commonjs module from 'js' to cjs [#1087](https://github.com/rrweb-io/rrweb/pull/1087).
- [#1126](https://github.com/rrweb-io/rrweb/pull/1126) [`227d43a`](https://github.com/rrweb-io/rrweb/commit/227d43abb93d57cadc70c760b28c46911bf7d8ff) Thanks [@YunFeng0817](https://github.com/YunFeng0817)! - Fix: improve rrdom robustness [#1091](https://github.com/rrweb-io/rrweb/pull/1091).
- Updated dependencies [[`1385f7a`](https://github.com/rrweb-io/rrweb/commit/1385f7acc0052f83be1458a7b00e18c026ee393f), [`227d43a`](https://github.com/rrweb-io/rrweb/commit/227d43abb93d57cadc70c760b28c46911bf7d8ff)]:
- rrweb-snapshot@2.0.0-alpha.5

View File

@@ -1,6 +1,6 @@
{ {
"name": "rrdom", "name": "rrdom",
"version": "2.0.0-alpha.5", "version": "0.1.7",
"homepage": "https://github.com/rrweb-io/rrweb/tree/main/packages/rrdom#readme", "homepage": "https://github.com/rrweb-io/rrweb/tree/main/packages/rrdom#readme",
"license": "MIT", "license": "MIT",
"main": "lib/rrdom.cjs", "main": "lib/rrdom.cjs",
@@ -32,7 +32,7 @@
}, },
"devDependencies": { "devDependencies": {
"@rollup/plugin-commonjs": "^20.0.0", "@rollup/plugin-commonjs": "^20.0.0",
"@rrweb/types": "^2.0.0-alpha.5", "@rrweb/types": "^2.0.0-alpha.4",
"@types/jest": "^27.4.1", "@types/jest": "^27.4.1",
"@types/puppeteer": "^5.4.4", "@types/puppeteer": "^5.4.4",
"@typescript-eslint/eslint-plugin": "^5.23.0", "@typescript-eslint/eslint-plugin": "^5.23.0",
@@ -48,6 +48,6 @@
"typescript": "^4.7.3" "typescript": "^4.7.3"
}, },
"dependencies": { "dependencies": {
"rrweb-snapshot": "^2.0.0-alpha.5" "rrweb-snapshot": "^2.0.0-alpha.4"
} }
} }

View File

@@ -1,10 +0,0 @@
# rrweb-player
## 2.0.0-alpha.5
### Patch Changes
- [#1126](https://github.com/rrweb-io/rrweb/pull/1126) [`227d43a`](https://github.com/rrweb-io/rrweb/commit/227d43abb93d57cadc70c760b28c46911bf7d8ff) Thanks [@YunFeng0817](https://github.com/YunFeng0817)! - Refactor all suffix of bundled scripts with commonjs module from 'js' to cjs [#1087](https://github.com/rrweb-io/rrweb/pull/1087).
- Updated dependencies [[`1385f7a`](https://github.com/rrweb-io/rrweb/commit/1385f7acc0052f83be1458a7b00e18c026ee393f), [`227d43a`](https://github.com/rrweb-io/rrweb/commit/227d43abb93d57cadc70c760b28c46911bf7d8ff), [`227d43a`](https://github.com/rrweb-io/rrweb/commit/227d43abb93d57cadc70c760b28c46911bf7d8ff), [`3cc4323`](https://github.com/rrweb-io/rrweb/commit/3cc4323094065a12f8b65afecd45061d604e245f), [`502d15d`](https://github.com/rrweb-io/rrweb/commit/502d15df9f7f43b3408ccfbb3f14c4bb007883c4), [`8d209a6`](https://github.com/rrweb-io/rrweb/commit/8d209a62f31c4c80e3e5bc36e47d7282ee854ac7)]:
- rrweb@2.0.0-alpha.5

View File

@@ -1,10 +1,10 @@
{ {
"name": "rrweb-player", "name": "rrweb-player",
"version": "2.0.0-alpha.5", "version": "1.0.0-alpha.4",
"devDependencies": { "devDependencies": {
"@rollup/plugin-commonjs": "^22.0.0", "@rollup/plugin-commonjs": "^22.0.0",
"@rollup/plugin-node-resolve": "^13.2.1", "@rollup/plugin-node-resolve": "^13.2.1",
"@rrweb/types": "^2.0.0-alpha.5", "@rrweb/types": "^2.0.0-alpha.4",
"@types/offscreencanvas": "^2019.6.4", "@types/offscreencanvas": "^2019.6.4",
"eslint-config-google": "^0.14.0", "eslint-config-google": "^0.14.0",
"eslint-plugin-svelte3": "^4.0.0", "eslint-plugin-svelte3": "^4.0.0",
@@ -25,7 +25,7 @@
}, },
"dependencies": { "dependencies": {
"@tsconfig/svelte": "^1.0.0", "@tsconfig/svelte": "^1.0.0",
"rrweb": "^2.0.0-alpha.5" "rrweb": "^2.0.0-alpha.4"
}, },
"scripts": { "scripts": {
"build": "rollup -c", "build": "rollup -c",

View File

@@ -1,9 +0,0 @@
# rrweb-snapshot
## 2.0.0-alpha.5
### Patch Changes
- [#1095](https://github.com/rrweb-io/rrweb/pull/1095) [`1385f7a`](https://github.com/rrweb-io/rrweb/commit/1385f7acc0052f83be1458a7b00e18c026ee393f) Thanks [@YunFeng0817](https://github.com/YunFeng0817)! - Fix duplicated shadow doms
- [#1126](https://github.com/rrweb-io/rrweb/pull/1126) [`227d43a`](https://github.com/rrweb-io/rrweb/commit/227d43abb93d57cadc70c760b28c46911bf7d8ff) Thanks [@YunFeng0817](https://github.com/YunFeng0817)! - Refactor all suffix of bundled scripts with commonjs module from 'js' to cjs [#1087](https://github.com/rrweb-io/rrweb/pull/1087).

View File

@@ -1,6 +1,6 @@
{ {
"name": "rrweb-snapshot", "name": "rrweb-snapshot",
"version": "2.0.0-alpha.5", "version": "2.0.0-alpha.4",
"description": "rrweb's component to take a snapshot of DOM, aka DOM serializer", "description": "rrweb's component to take a snapshot of DOM, aka DOM serializer",
"scripts": { "scripts": {
"prepare": "npm run prepack", "prepare": "npm run prepack",

View File

@@ -1,69 +0,0 @@
# rrweb
## 2.0.0-alpha.5
### Patch Changes
- [#1095](https://github.com/rrweb-io/rrweb/pull/1095) [`1385f7a`](https://github.com/rrweb-io/rrweb/commit/1385f7acc0052f83be1458a7b00e18c026ee393f) Thanks [@YunFeng0817](https://github.com/YunFeng0817)! - Fix duplicated shadow doms
- [#1126](https://github.com/rrweb-io/rrweb/pull/1126) [`227d43a`](https://github.com/rrweb-io/rrweb/commit/227d43abb93d57cadc70c760b28c46911bf7d8ff) Thanks [@YunFeng0817](https://github.com/YunFeng0817)! - Refactor all suffix of bundled scripts with commonjs module from 'js' to cjs [#1087](https://github.com/rrweb-io/rrweb/pull/1087).
- [#1126](https://github.com/rrweb-io/rrweb/pull/1126) [`227d43a`](https://github.com/rrweb-io/rrweb/commit/227d43abb93d57cadc70c760b28c46911bf7d8ff) Thanks [@YunFeng0817](https://github.com/YunFeng0817)! - Fix: improve rrdom robustness [#1091](https://github.com/rrweb-io/rrweb/pull/1091).
- [#1127](https://github.com/rrweb-io/rrweb/pull/1127) [`3cc4323`](https://github.com/rrweb-io/rrweb/commit/3cc4323094065a12f8b65afecd45061d604e245f) Thanks [@YunFeng0817](https://github.com/YunFeng0817)! - Refactor: Improve performance by 80% in a super large benchmark case.
1. Refactor: change the data structure of childNodes from array to linked list
2. Improve the performance of the "contains" function. New algorithm will reduce the complexity from O(n) to O(logn)
- [#1121](https://github.com/rrweb-io/rrweb/pull/1121) [`502d15d`](https://github.com/rrweb-io/rrweb/commit/502d15df9f7f43b3408ccfbb3f14c4bb007883c4) Thanks [@YunFeng0817](https://github.com/YunFeng0817)! - Fix: outdated ':hover' styles can't be removed from iframes or shadow doms
- [#1122](https://github.com/rrweb-io/rrweb/pull/1122) [`8d209a6`](https://github.com/rrweb-io/rrweb/commit/8d209a62f31c4c80e3e5bc36e47d7282ee854ac7) Thanks [@YunFeng0817](https://github.com/YunFeng0817)! - Add missing change logs manually. In the next version, all change logs will be generated automatically.
- [`a220835`](https://github.com/rrweb-io/rrweb/commit/a220835eeb81ca4f294682e060d46c8853720d7f) [#1053](https://github.com/rrweb-io/rrweb/pull/1053) Thanks [@Juice10](https://github.com/Juice10)! - Fix: Post message can break cross origin iframe recording.
- [`7e8dcdb`](https://github.com/rrweb-io/rrweb/commit/7e8dcdb11dc5dfefcdd19ff5e13ec9d8b5c24dcc) [#1063](https://github.com/rrweb-io/rrweb/pull/1063) Thanks [@lele0108](https://github.com/lele0108)! - Fix: muted false -> true not being set.
- [`b655361`](https://github.com/rrweb-io/rrweb/commit/b655361a5f0d50a053fcd0e5c823b8494c33b89c) [#1067](https://github.com/rrweb-io/rrweb/pull/1067) Thanks [@mydea](https://github.com/mydea)! - Export recordOptions type.
- [`36b44e1`](https://github.com/rrweb-io/rrweb/commit/36b44e104b91fc74c3e69684111240cd23105340) [#1042](https://github.com/rrweb-io/rrweb/pull/1042) Thanks [@wfk007](https://github.com/wfk007)! - Fix: Failed to execute insertBefore on Node.
- [`44e92cb`](https://github.com/rrweb-io/rrweb/commit/44e92cbff981c36e754dfcb9a184eae9e7292ecf) [#1058](https://github.com/rrweb-io/rrweb/pull/1058) Thanks [@mydea](https://github.com/mydea)! - Handle errors when observing iframes.
- [`729b8bf`](https://github.com/rrweb-io/rrweb/commit/729b8bf38c8c7f2e1b22b4e0f7cab14f0807bc74) [#1083](https://github.com/rrweb-io/rrweb/pull/1083) Thanks [@Juice10](https://github.com/Juice10)! - Fix: Catch iframe manager & fix formatting issues.
- [`03821d9`](https://github.com/rrweb-io/rrweb/commit/03821d9b9fa0513e6e373881d43102ceb9388340) [#1083](https://github.com/rrweb-io/rrweb/pull/1083) Thanks [@eoghanmurray](https://github.com/eoghanmurray)! - Harmonize on a single getWindowScroll
- [`d08913d`](https://github.com/rrweb-io/rrweb/commit/d08913d0dc506dbf119e94686fe5f01c415316c9) [#1086](https://github.com/rrweb-io/rrweb/pull/1086) Thanks [@YunFeng0817](https://github.com/YunFeng0817)! - Fix: missed adopted style sheets of shadow doms in checkout full snapshot.
- [`66abe17`](https://github.com/rrweb-io/rrweb/commit/66abe17832dbb23b3948af1c394f9a02caccc17b) [#1032](https://github.com/rrweb-io/rrweb/pull/1032) Thanks [@dbseel](https://github.com/dbseel)! - Fix: isBlocked throws on invalid HTML element.
- [`07aa1b2`](https://github.com/rrweb-io/rrweb/commit/07aa1b2807da5a9a1db678ebc3ff59320a300d06) [#1049](https://github.com/rrweb-io/rrweb/pull/1049) Thanks [@Juice10](https://github.com/Juice10)! - Fix: shadow dom bugs.
- [`57a2e14`](https://github.com/rrweb-io/rrweb/commit/57a2e140ea419f7790b1672529f21dfe2261b52b) [#1088](https://github.com/rrweb-io/rrweb/pull/1088) Thanks [@mydea](https://github.com/mydea)! - Fix: Guard against missing window.CSSStyleSheet.
- [`fc82869`](https://github.com/rrweb-io/rrweb/commit/fc828694099b87b4d811e6b651a7bb4c7499b896) [#1093](https://github.com/rrweb-io/rrweb/pull/1093) Thanks [@YunFeng0817](https://github.com/YunFeng0817)! - Fix: cross origin iframe bugs.
- [`a77e302`](https://github.com/rrweb-io/rrweb/commit/a77e30217893e63f8025c73afc3ac1ba294d7761) [#1104](https://github.com/rrweb-io/rrweb/pull/1104) Thanks [@jlalmes](https://github.com/jlalmes)! - [console-plugin] Feat: Record unhandled rejection event.
- [`25a4f5a`](https://github.com/rrweb-io/rrweb/commit/25a4f5ab6c7311f2e8e5e1a4d232c2820adf910e) [#1115](https://github.com/rrweb-io/rrweb/pull/1115) Thanks [@Juice10](https://github.com/Juice10)! - Fix: Don't trigger Finish event when in liveMode.
- [`cb15800`](https://github.com/rrweb-io/rrweb/commit/cb1580008d04b0bc5c5d4ebec0e2e79899faaeb6) [#1106](https://github.com/rrweb-io/rrweb/pull/1106) Thanks [@mydea](https://github.com/mydea)! - Fix: Ensure CSS support is checked more robustly.
- [`0732618`](https://github.com/rrweb-io/rrweb/commit/07326182f9750646771918481f116b946a17c2a9) [#1100](https://github.com/rrweb-io/rrweb/pull/1100) Thanks [@YunFeng0817](https://github.com/YunFeng0817)! - Fix: wrong rootId value in special iframes.
- [`3caa25e`](https://github.com/rrweb-io/rrweb/commit/3caa25ed9b19954c98775f22d5fa47233fa3d1db) [#1098](https://github.com/rrweb-io/rrweb/pull/1098) Thanks [@eoghanmurray](https://github.com/eoghanmurray)! - Refactor: Don't have requestAnimationFrame looping in background for Live Mode.
- [`3a26e36`](https://github.com/rrweb-io/rrweb/commit/3a26e36f6f625c0391c7e6d3f1050660adfccc4f) [#1092](https://github.com/rrweb-io/rrweb/pull/1092) Thanks [@YunFeng0817](https://github.com/YunFeng0817)! - Fix: regression of issue: ShadowHost can't be a string (issue 941)
- [`07d22e7`](https://github.com/rrweb-io/rrweb/commit/07d22e7cd999a48e7371aaef1b979574bb746500) [#1111](https://github.com/rrweb-io/rrweb/pull/1111) Thanks [@YunFeng0817](https://github.com/YunFeng0817)! - Feat: enable to customize logger in the replayer.
- [`0627d4d`](https://github.com/rrweb-io/rrweb/commit/0627d4df7cc76cde7babbd37ab8e3da5810fb51d) [#1109](https://github.com/rrweb-io/rrweb/pull/1109) Thanks [@YunFeng0817](https://github.com/YunFeng0817)! - Feat: add option to record on DOMContentLoaded event.
- [`174b9ac`](https://github.com/rrweb-io/rrweb/commit/174b9ac066565b8c065f40f0303189f10c7c4efb) [#1112](https://github.com/rrweb-io/rrweb/pull/1112) Thanks [@YunFeng0817](https://github.com/YunFeng0817)! - Fix: mutation Failed to execute 'insertBefore' on 'Node': Only one doctype on document allowed.
- [`5a1e5e9`](https://github.com/rrweb-io/rrweb/commit/5a1e5e919e3f8bef48d142115c0afd5706a442b5) [#1119](https://github.com/rrweb-io/rrweb/pull/1119) Thanks [@Juice10](https://github.com/Juice10)! - Feat: Automate NPM package releases.
- Updated dependencies [[`1385f7a`](https://github.com/rrweb-io/rrweb/commit/1385f7acc0052f83be1458a7b00e18c026ee393f), [`227d43a`](https://github.com/rrweb-io/rrweb/commit/227d43abb93d57cadc70c760b28c46911bf7d8ff), [`227d43a`](https://github.com/rrweb-io/rrweb/commit/227d43abb93d57cadc70c760b28c46911bf7d8ff), [`3cc4323`](https://github.com/rrweb-io/rrweb/commit/3cc4323094065a12f8b65afecd45061d604e245f)]:
- rrweb-snapshot@2.0.0-alpha.5
- rrdom@2.0.0-alpha.5
- @rrweb/types@2.0.0-alpha.5

View File

@@ -1,6 +1,6 @@
{ {
"name": "rrweb", "name": "rrweb",
"version": "2.0.0-alpha.5", "version": "2.0.0-alpha.4",
"description": "record and replay the web", "description": "record and replay the web",
"scripts": { "scripts": {
"prepare": "npm run prepack", "prepare": "npm run prepack",
@@ -78,13 +78,13 @@
"typescript": "^4.7.3" "typescript": "^4.7.3"
}, },
"dependencies": { "dependencies": {
"@rrweb/types": "^2.0.0-alpha.5", "@rrweb/types": "^2.0.0-alpha.4",
"@types/css-font-loading-module": "0.0.7", "@types/css-font-loading-module": "0.0.7",
"@xstate/fsm": "^1.4.0", "@xstate/fsm": "^1.4.0",
"base64-arraybuffer": "^1.0.1", "base64-arraybuffer": "^1.0.1",
"fflate": "^0.4.4", "fflate": "^0.4.4",
"mitt": "^3.0.0", "mitt": "^3.0.0",
"rrdom": "^2.0.0-alpha.5", "rrdom": "^0.1.7",
"rrweb-snapshot": "^2.0.0-alpha.5" "rrweb-snapshot": "^2.0.0-alpha.4"
} }
} }

View File

@@ -1,8 +0,0 @@
# @rrweb/types
## 2.0.0-alpha.5
### Patch Changes
- Updated dependencies [[`1385f7a`](https://github.com/rrweb-io/rrweb/commit/1385f7acc0052f83be1458a7b00e18c026ee393f), [`227d43a`](https://github.com/rrweb-io/rrweb/commit/227d43abb93d57cadc70c760b28c46911bf7d8ff)]:
- rrweb-snapshot@2.0.0-alpha.5

View File

@@ -1,6 +1,6 @@
{ {
"name": "@rrweb/types", "name": "@rrweb/types",
"version": "2.0.0-alpha.5", "version": "2.0.0-alpha.4",
"publishConfig": { "publishConfig": {
"access": "public" "access": "public"
}, },
@@ -44,7 +44,7 @@
"vite-plugin-dts": "^1.6.6" "vite-plugin-dts": "^1.6.6"
}, },
"dependencies": { "dependencies": {
"rrweb-snapshot": "^2.0.0-alpha.5" "rrweb-snapshot": "^2.0.0-alpha.4"
}, },
"browserslist": [ "browserslist": [
"supports es6-class" "supports es6-class"

View File

@@ -1,11 +0,0 @@
# @rrweb/web-extension
## 2.0.0-alpha.5
### Patch Changes
- [#1044](https://github.com/rrweb-io/rrweb/pull/1044) [`282c8fa`](https://github.com/rrweb-io/rrweb/commit/282c8fa415318e56e8b63fa30ce3f173813b39c3) Thanks [@YunFeng0817](https://github.com/YunFeng0817)! - Add rrweb browser extension
- Updated dependencies [[`1385f7a`](https://github.com/rrweb-io/rrweb/commit/1385f7acc0052f83be1458a7b00e18c026ee393f), [`227d43a`](https://github.com/rrweb-io/rrweb/commit/227d43abb93d57cadc70c760b28c46911bf7d8ff), [`227d43a`](https://github.com/rrweb-io/rrweb/commit/227d43abb93d57cadc70c760b28c46911bf7d8ff), [`3cc4323`](https://github.com/rrweb-io/rrweb/commit/3cc4323094065a12f8b65afecd45061d604e245f), [`502d15d`](https://github.com/rrweb-io/rrweb/commit/502d15df9f7f43b3408ccfbb3f14c4bb007883c4), [`8d209a6`](https://github.com/rrweb-io/rrweb/commit/8d209a62f31c4c80e3e5bc36e47d7282ee854ac7)]:
- rrweb@2.0.0-alpha.5
- rrweb-player@2.0.0-alpha.5

View File

@@ -1,7 +1,7 @@
{ {
"name": "@rrweb/web-extension", "name": "@rrweb/web-extension",
"private": true, "private": true,
"version": "2.0.0-alpha.5", "version": "2.0.0-alpha.4",
"description": "The web extension of rrweb which helps to run rrweb on any website out of box", "description": "The web extension of rrweb which helps to run rrweb on any website out of box",
"author": "rrweb-io", "author": "rrweb-io",
"license": "MIT", "license": "MIT",
@@ -16,7 +16,7 @@
"prepublish": "npm run pack:chrome && npm run pack:firefox" "prepublish": "npm run pack:chrome && npm run pack:firefox"
}, },
"devDependencies": { "devDependencies": {
"@rrweb/types": "^2.0.0-alpha.5", "@rrweb/types": "^2.0.0-alpha.4",
"@types/react-dom": "^18.0.6", "@types/react-dom": "^18.0.6",
"@types/webextension-polyfill": "^0.9.1", "@types/webextension-polyfill": "^0.9.1",
"@vitejs/plugin-react": "^2.1.0", "@vitejs/plugin-react": "^2.1.0",
@@ -25,7 +25,7 @@
"typescript": "^4.7.3", "typescript": "^4.7.3",
"vite": "^3.1.8", "vite": "^3.1.8",
"vite-plugin-web-extension": "^1.4.5", "vite-plugin-web-extension": "^1.4.5",
"vite-plugin-zip": "^1.0.1", "vite-plugin-zip-pack": "^1.0.5",
"webextension-polyfill": "^0.10.0" "webextension-polyfill": "^0.10.0"
}, },
"dependencies": { "dependencies": {
@@ -41,7 +41,7 @@
"react-dom": "^18.2.0", "react-dom": "^18.2.0",
"react-icons": "^4.4.0", "react-icons": "^4.4.0",
"react-router-dom": "^6.4.1", "react-router-dom": "^6.4.1",
"rrweb": "^2.0.0-alpha.5", "rrweb": "^2.0.0-alpha.4",
"rrweb-player": "^2.0.0-alpha.5" "rrweb-player": "^1.0.0-alpha.4"
} }
} }

View File

@@ -40,7 +40,7 @@ void (() => {
); );
if (isInCrossOriginIFrame()) { if (isInCrossOriginIFrame()) {
void initCrossOriginIframe(); void initCrossOriginIframe();
} else { } else if (window === window.top) {
void initMainPage(); void initMainPage();
} }
})(); })();
@@ -154,7 +154,9 @@ async function initMainPage() {
} }
// Before unload pages, cache the new events in the local storage. // Before unload pages, cache the new events in the local storage.
window.addEventListener('beforeunload', () => { window.addEventListener('beforeunload', (event) => {
event.preventDefault();
if (newEvents.length === 0) return;
void Browser.storage.local.set({ void Browser.storage.local.set({
[LocalDataKey.bufferedEvents]: bufferedEvents.concat(newEvents), [LocalDataKey.bufferedEvents]: bufferedEvents.concat(newEvents),
}); });

View File

@@ -43,7 +43,13 @@ const messageHandler = (
startRecord(data.config || {}); startRecord(data.config || {});
}, },
[MessageName.StopRecord]: () => { [MessageName.StopRecord]: () => {
if (stopFn) stopFn(); if (stopFn) {
try {
stopFn();
} catch (e) {
//
}
}
postMessage({ postMessage({
message: MessageName.RecordStopped, message: MessageName.RecordStopped,
events, events,

View File

@@ -130,11 +130,20 @@ class Channel {
* @param eventName - event name * @param eventName - event name
* @param handler - event handler, accepts two arguments: * @param handler - event handler, accepts two arguments:
* detail: event detail * detail: event detail
* source: source of the event, chrome.runtime.MessageSender object * source: source of the event, Browser.runtime.MessageSender object
* @returns a function to remove the handler * @returns a function to remove the handler
*/ */
public on(event: string, handler: (detail: unknown) => unknown) { public on(
return this.emitter.on(event, handler); event: string,
handler: (detail: unknown, sender: Runtime.MessageSender) => unknown,
) {
const emitHandler = ((data: {
detail: unknown;
sender: Runtime.MessageSender;
}) => {
handler(data.detail, data.sender);
}) as (data: unknown) => unknown;
return this.emitter.on(event, emitHandler);
} }
/** /**

View File

@@ -5,7 +5,7 @@ import {
PluginOption, PluginOption,
} from 'vite'; } from 'vite';
import webExtension, { readJsonFile } from 'vite-plugin-web-extension'; import webExtension, { readJsonFile } from 'vite-plugin-web-extension';
import zip from 'vite-plugin-zip'; import zip from 'vite-plugin-zip-pack';
import * as path from 'path'; import * as path from 'path';
import type { PackageJson } from 'type-fest'; import type { PackageJson } from 'type-fest';
import react from '@vitejs/plugin-react'; import react from '@vitejs/plugin-react';
@@ -94,8 +94,9 @@ export default defineConfig({
), ),
process.env.ZIP === 'true' && process.env.ZIP === 'true' &&
zip({ zip({
dir: 'dist', inDir: `dist/${process.env.TARGET_BROWSER || 'chrome'}`,
outputName: process.env.TARGET_BROWSER, outDir: 'dist',
outFileName: `${process.env.TARGET_BROWSER || 'chrome'}.zip`,
}), }),
], ],
resolve: { resolve: {

View File

@@ -10513,7 +10513,7 @@ jsprim@^1.2.2:
json-schema "0.2.3" json-schema "0.2.3"
verror "1.10.0" verror "1.10.0"
jszip@^3.2.2: jszip@^3.2.2, jszip@^3.7.1:
version "3.10.1" version "3.10.1"
resolved "https://registry.yarnpkg.com/jszip/-/jszip-3.10.1.tgz#34aee70eb18ea1faec2f589208a157d1feb091c2" resolved "https://registry.yarnpkg.com/jszip/-/jszip-3.10.1.tgz#34aee70eb18ea1faec2f589208a157d1feb091c2"
integrity sha512-xXDvecyTpGLrqFrvkrUSoxxfJI5AH7U8zxxtVclpsUtMCq4JQ290LY8AW5c7Ggnr/Y/oK+bQMbqK2qmtk3pN4g== integrity sha512-xXDvecyTpGLrqFrvkrUSoxxfJI5AH7U8zxxtVclpsUtMCq4JQ290LY8AW5c7Ggnr/Y/oK+bQMbqK2qmtk3pN4g==
@@ -15643,12 +15643,12 @@ vite-plugin-web-extension@^1.4.5:
md5 "^2.3.0" md5 "^2.3.0"
web-ext "^6.5.0" web-ext "^6.5.0"
vite-plugin-zip@^1.0.1: vite-plugin-zip-pack@^1.0.5:
version "1.0.1" version "1.0.5"
resolved "https://registry.yarnpkg.com/vite-plugin-zip/-/vite-plugin-zip-1.0.1.tgz#a72ad7f29ddc873f7d6f3917397fd008a6badaa3" resolved "https://registry.yarnpkg.com/vite-plugin-zip-pack/-/vite-plugin-zip-pack-1.0.5.tgz#6c2ef0a02cdfc9c7a9c785a4310ec7024695c91f"
integrity sha512-DdQQGq8eSLwMHtFmzwKZ/h59qaeSNsSFM6TKiUsHl2Cx2D1KD0iJD9OQP7rLOSEZCPoUoUvW45G2nJNcr0qlEg== integrity sha512-AY6F3GJL///Dc3d7fQhalJvWb08e0oIATVqHLwDAiK2/S1NCxbAFXfT4m2V+LtJRjHrRkHa0zbZvAI6/lb6vTQ==
dependencies: dependencies:
yazl "^2.5.1" jszip "^3.7.1"
vite@^3.1.8: vite@^3.1.8:
version "3.1.8" version "3.1.8"
@@ -16151,13 +16151,6 @@ yauzl@2.10.0, yauzl@^2.10.0:
buffer-crc32 "~0.2.3" buffer-crc32 "~0.2.3"
fd-slicer "~1.1.0" fd-slicer "~1.1.0"
yazl@^2.5.1:
version "2.5.1"
resolved "https://registry.yarnpkg.com/yazl/-/yazl-2.5.1.tgz#a3d65d3dd659a5b0937850e8609f22fffa2b5c35"
integrity sha512-phENi2PLiHnHb6QBVot+dJnaAZ0xosj7p3fWl+znIjBDlnMI2PsZCJZ306BPTFOaHf5qdDEI8x5qFrSOBN5vrw==
dependencies:
buffer-crc32 "~0.2.3"
yn@3.1.1: yn@3.1.1:
version "3.1.1" version "3.1.1"
resolved "https://registry.npmjs.org/yn/-/yn-3.1.1.tgz" resolved "https://registry.npmjs.org/yn/-/yn-3.1.1.tgz"