Skip to content
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

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

Merged
merged 3 commits into from
Feb 14, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 2 additions & 12 deletions .changeset/pre.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,7 @@
"rrweb": "2.0.0-alpha.4",
"rrweb-player": "1.0.0-alpha.4",
"rrweb-snapshot": "2.0.0-alpha.4",
"@rrweb/types": "2.0.0-alpha.4",
"@rrweb/web-extension": "2.0.0-alpha.4"
"@rrweb/types": "2.0.0-alpha.4"
},
"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"
]
"changesets": []
}
18 changes: 0 additions & 18 deletions packages/rrdom-nodejs/CHANGELOG.md

This file was deleted.

6 changes: 3 additions & 3 deletions packages/rrdom-nodejs/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "rrdom-nodejs",
"version": "2.0.0-alpha.5",
"version": "0.1.7",
"scripts": {
"dev": "rollup -c -w",
"bundle": "rollup --config",
Expand Down Expand Up @@ -49,8 +49,8 @@
"cssom": "^0.5.0",
"cssstyle": "^2.3.0",
"nwsapi": "^2.2.0",
"rrdom": "^2.0.0-alpha.5",
"rrweb-snapshot": "^2.0.0-alpha.5"
"rrdom": "^0.1.7",
"rrweb-snapshot": "^2.0.0-alpha.4"
},
"browserslist": [
"supports es6-class"
Expand Down
19 changes: 0 additions & 19 deletions packages/rrdom/CHANGELOG.md

This file was deleted.

6 changes: 3 additions & 3 deletions packages/rrdom/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "rrdom",
"version": "2.0.0-alpha.5",
"version": "0.1.7",
"homepage": "https://github.com/rrweb-io/rrweb/tree/main/packages/rrdom#readme",
"license": "MIT",
"main": "lib/rrdom.cjs",
Expand Down Expand Up @@ -32,7 +32,7 @@
},
"devDependencies": {
"@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/puppeteer": "^5.4.4",
"@typescript-eslint/eslint-plugin": "^5.23.0",
Expand All @@ -48,6 +48,6 @@
"typescript": "^4.7.3"
},
"dependencies": {
"rrweb-snapshot": "^2.0.0-alpha.5"
"rrweb-snapshot": "^2.0.0-alpha.4"
}
}
10 changes: 0 additions & 10 deletions packages/rrweb-player/CHANGELOG.md

This file was deleted.

6 changes: 3 additions & 3 deletions packages/rrweb-player/package.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{
"name": "rrweb-player",
"version": "2.0.0-alpha.5",
"version": "1.0.0-alpha.4",
"devDependencies": {
"@rollup/plugin-commonjs": "^22.0.0",
"@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",
"eslint-config-google": "^0.14.0",
"eslint-plugin-svelte3": "^4.0.0",
Expand All @@ -25,7 +25,7 @@
},
"dependencies": {
"@tsconfig/svelte": "^1.0.0",
"rrweb": "^2.0.0-alpha.5"
"rrweb": "^2.0.0-alpha.4"
},
"scripts": {
"build": "rollup -c",
Expand Down
9 changes: 0 additions & 9 deletions packages/rrweb-snapshot/CHANGELOG.md

This file was deleted.

2 changes: 1 addition & 1 deletion packages/rrweb-snapshot/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"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",
"scripts": {
"prepare": "npm run prepack",
Expand Down
69 changes: 0 additions & 69 deletions packages/rrweb/CHANGELOG.md

This file was deleted.

8 changes: 4 additions & 4 deletions packages/rrweb/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "rrweb",
"version": "2.0.0-alpha.5",
"version": "2.0.0-alpha.4",
"description": "record and replay the web",
"scripts": {
"prepare": "npm run prepack",
Expand Down Expand Up @@ -78,13 +78,13 @@
"typescript": "^4.7.3"
},
"dependencies": {
"@rrweb/types": "^2.0.0-alpha.5",
"@rrweb/types": "^2.0.0-alpha.4",
"@types/css-font-loading-module": "0.0.7",
"@xstate/fsm": "^1.4.0",
"base64-arraybuffer": "^1.0.1",
"fflate": "^0.4.4",
"mitt": "^3.0.0",
"rrdom": "^2.0.0-alpha.5",
"rrweb-snapshot": "^2.0.0-alpha.5"
"rrdom": "^0.1.7",
"rrweb-snapshot": "^2.0.0-alpha.4"
}
}
8 changes: 0 additions & 8 deletions packages/types/CHANGELOG.md

This file was deleted.

4 changes: 2 additions & 2 deletions packages/types/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@rrweb/types",
"version": "2.0.0-alpha.5",
"version": "2.0.0-alpha.4",
"publishConfig": {
"access": "public"
},
Expand Down Expand Up @@ -44,7 +44,7 @@
"vite-plugin-dts": "^1.6.6"
},
"dependencies": {
"rrweb-snapshot": "^2.0.0-alpha.5"
"rrweb-snapshot": "^2.0.0-alpha.4"
},
"browserslist": [
"supports es6-class"
Expand Down
11 changes: 0 additions & 11 deletions packages/web-extension/CHANGELOG.md

This file was deleted.

10 changes: 5 additions & 5 deletions packages/web-extension/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@rrweb/web-extension",
"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",
"author": "rrweb-io",
"license": "MIT",
Expand All @@ -16,7 +16,7 @@
"prepublish": "npm run pack:chrome && npm run pack:firefox"
},
"devDependencies": {
"@rrweb/types": "^2.0.0-alpha.5",
"@rrweb/types": "^2.0.0-alpha.4",
"@types/react-dom": "^18.0.6",
"@types/webextension-polyfill": "^0.9.1",
"@vitejs/plugin-react": "^2.1.0",
Expand All @@ -25,7 +25,7 @@
"typescript": "^4.7.3",
"vite": "^3.1.8",
"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"
},
"dependencies": {
Expand All @@ -41,7 +41,7 @@
"react-dom": "^18.2.0",
"react-icons": "^4.4.0",
"react-router-dom": "^6.4.1",
"rrweb": "^2.0.0-alpha.5",
"rrweb-player": "^2.0.0-alpha.5"
"rrweb": "^2.0.0-alpha.4",
"rrweb-player": "^1.0.0-alpha.4"
}
}
6 changes: 4 additions & 2 deletions packages/web-extension/src/content/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ void (() => {
);
if (isInCrossOriginIFrame()) {
void initCrossOriginIframe();
} else {
} else if (window === window.top) {
void initMainPage();
}
})();
Expand Down Expand Up @@ -154,7 +154,9 @@ async function initMainPage() {
}

// 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({
[LocalDataKey.bufferedEvents]: bufferedEvents.concat(newEvents),
});
Expand Down
8 changes: 7 additions & 1 deletion packages/web-extension/src/content/inject.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,13 @@ const messageHandler = (
startRecord(data.config || {});
},
[MessageName.StopRecord]: () => {
if (stopFn) stopFn();
if (stopFn) {
try {
stopFn();
} catch (e) {
//
}
}
postMessage({
message: MessageName.RecordStopped,
events,
Expand Down
Loading