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

Merge upstream from remote rrweb #26

Merged
merged 27 commits into from
Nov 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
d08624c
Skip mask check on leaf elements (#1512)
eoghanmurray Jun 17, 2024
47b0fbb
Assuming all jest should have been removed in #1033 (#1511)
eoghanmurray Jun 17, 2024
5d6dbbb
Fix async assertions in test files (#1510)
Juice10 Jun 18, 2024
a2c8a1a
Fix maskInputFn is ignored during the creation of the full snapshot (…
ababik Jun 21, 2024
a756a45
Improve development tooling (#1516)
Juice10 Jun 21, 2024
4f44bd1
Version Packages (alpha) (#1513)
github-actions[bot] Jun 25, 2024
db20184
Keep all packages in sync
Juice10 Jun 26, 2024
89ae4d2
feat: add new css parser - postcss (#1458)
daibhin Jun 27, 2024
874933b
fix: console assert only logs when arg 0 is falsy (#1530)
pauldambra Jul 2, 2024
68076b7
[Feature] Include takeFullSnapshot function in rrweb (#1527)
arredgroup Jul 3, 2024
e0590bb
chore: reduce flakey test due to '[vite] connected' message (#1525)
Juice10 Jul 5, 2024
40bbc25
fix: duplicate textContent for style element cause incremental style …
YunFeng0817 Jul 8, 2024
8059d96
Added support for deprecated addRule & removeRule methods (#1515)
okejminja Jul 23, 2024
d350da8
fix: nested stylesheets should have absolute URLs (#1533)
jeffdnguyen Jul 25, 2024
335639a
Support top-layer <dialog> recording & replay (#1503)
Juice10 Aug 2, 2024
b1f9daa
Added session downloader for chrome extension (#1522)
kirankunigiri Aug 2, 2024
be6bf52
Reverse monkey patch built in methods to support LWC (#1509)
Juice10 Aug 2, 2024
8837fe3
Version Packages (alpha) (#1526)
github-actions[bot] Aug 2, 2024
5fbb904
Single style capture (#1437)
eoghanmurray Aug 6, 2024
04ee6ed
Simplify the hover replacement function (#1535)
eoghanmurray Sep 13, 2024
61ab209
fix some typos in optimize-storage.md (#1565)
riadhmouamnia Sep 13, 2024
8e55c45
fix(rrdom): Ignore invalid DOM attributes when diffing (#1561)
billyvg Sep 13, 2024
02cc62d
fix(snapshot): dimensions for blocked element not being applied (#1331)
billyvg Sep 20, 2024
53b83bb
ref: isParentRemoved to cache subtree (#1543)
JonasBa Oct 4, 2024
cb13876
merging conflicts fixed
Nov 3, 2024
80f8753
changeset to 2.0.13
Nov 3, 2024
8fc65fd
fix snapshot build
Nov 3, 2024
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
11 changes: 11 additions & 0 deletions .changeset/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,17 @@
"commit": false,
"fixed": [
[
"@saola.ai/rrweb-all",
"@saola.ai/replay",
"@saola.ai/record",
"@saola.ai/rrweb-packer",
"@saola.ai/rrweb-utils",
"@saola.ai/rrweb-plugin-console-record",
"@saola.ai/rrweb-plugin-console-replay",
"@saola.ai/rrweb-plugin-sequential-id-record",
"@saola.ai/rrweb-plugin-sequential-id-replay",
"@saola.ai/rrweb-plugin-canvas-webrtc-record",
"@saola.ai/rrweb-plugin-canvas-webrtc-replay",
"@saola.ai/rrweb",
"@saola.ai/rrweb-snapshot",
"@saola.ai/rrdom",
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci-cd.yml.disabled
Original file line number Diff line number Diff line change
Expand Up @@ -41,5 +41,5 @@ jobs:
if: failure()
with:
name: image-diff
path: packages/rrweb/test/*/__image_snapshots__/__diff_output__/*.png
path: packages/**/__image_snapshots__/__diff_output__/*.png
if-no-files-found: ignore
8 changes: 7 additions & 1 deletion .vscode/rrweb-monorepo.code-workspace
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,10 @@
"name": "@rrweb/types",
"path": "../packages/types"
},
{
"name": "@rrweb/utils",
"path": "../packages/utils"
},
{
"name": "@rrweb/packer",
"path": "../packages/packer"
Expand Down Expand Up @@ -88,12 +92,14 @@
"@rrweb/record",
"@rrweb/replay",
"@rrweb/types",
"@rrweb/utils",
"@rrweb/packer",
"@rrweb/rrweb-plugin-console-record",
"@rrweb/rrweb-plugin-console-replay",
"@rrweb/rrweb-plugin-sequential-id",
"@rrweb/rrweb-plugin-canvas-webrtc-record",
"@rrweb/rrweb-plugin-canvas-webrtc-replay"
]
],
"typescript.tsdk": " rrweb monorepo/node_modules/typescript/lib"
}
}
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ Since we want the record and replay sides to share a strongly typed data structu

1. Fork this repository.
2. Run `yarn install` in the root to install required dependencies for all sub-packages (note: `npm install` is _not_ recommended).
3. Run `yarn dev` in the root to get auto-building for all the sub-packages whenever you modify anything.
3. Run `yarn build:all` to build all packages and get a stable base, then `yarn dev` in the root to get auto-building for all the sub-packages whenever you modify anything.
4. Navigate to one of the sub-packages (in the `packages` folder) where you'd like to make a change.
5. Patch the code and run `yarn test` to run the tests, make sure they pass before you commit anything. Add test cases in order to avoid future regression.
6. If tests are failing, but the change in output is desirable, run `yarn test:update` and carefully commit the changes in test output.
Expand Down
6 changes: 3 additions & 3 deletions docs/recipes/optimize-storage.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ rrweb.record({
rrweb.record({
emit(event) {},
sampling: {
// Configure which kins of mouse interaction should be recorded
// Configure which kinds of mouse interaction should be recorded
mouseInteraction: {
MouseUp: false,
MouseDown: false,
Expand Down Expand Up @@ -78,7 +78,7 @@ import { pack } from '@rrweb/packer';

rrweb.record({
emit(event) {},
packFn: rrweb.pack,
packFn: pack,
});
```

Expand All @@ -88,7 +88,7 @@ And you need to pass packer.unpack as the `unpackFn` in replaying.
import { unpack } from '@rrweb/packer';

const replayer = new rrweb.Replayer(events, {
unpackFn: rrweb.unpack,
unpackFn: unpack,
});
```

Expand Down
1 change: 1 addition & 0 deletions guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ Besides the `rrweb` and `@rrweb/record` packages, rrweb also provides other pack
- [@rrweb/replay](packages/replay): A package for replaying rrweb sessions.
- [@rrweb/packer](packages/packer): A package for packing and unpacking rrweb data.
- [@rrweb/types](packages/types): Contains types shared across rrweb packages.
- [@rrweb/utils](packages/utils): Contains utility functions shared across rrweb packages.
- [web-extension](packages/web-extension): A web extension for rrweb.
- [rrvideo](packages/rrvideo): A package for handling video operations in rrweb.
- [@rrweb/rrweb-plugin-console-record](packages/plugins/rrweb-plugin-console-record): A plugin for recording console logs.
Expand Down
3 changes: 2 additions & 1 deletion guide.zh_CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,8 @@ rrweb 代码分为录制和回放两部分,大多数时候用户在被录制
- [@rrweb/record](packages/record):一个用于录制 rrweb 会话的包。
- [@rrweb/replay](packages/replay):一个用于回放 rrweb 会话的包。
- [@rrweb/packer](packages/packer):一个用于打包和解包 rrweb 数据的包。
- [@rrweb/types](packages/types):包含 rrweb 中使用的类型定义。
- [@rrweb/types](packages/types):包含 rrweb 包中共享的类型定义。
- [@rrweb/utils](packages/utils):包含 rrweb 包中共享的工具函数。
- [web-extension](packages/web-extension):rrweb 的网页扩展。
- [rrvideo](packages/rrvideo):一个用于处理 rrweb 中视频操作的包。
- [@rrweb/rrweb-plugin-console-record](packages/plugins/rrweb-plugin-console-record):一个用于记录控制台日志的插件。
Expand Down
18 changes: 11 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,26 +30,29 @@
"@typescript-eslint/parser": "^5.62.0",
"browserslist": "^4.22.1",
"concurrently": "^7.1.0",
"cross-env": "^7.0.3",
"esbuild-plugin-umd-wrapper": "^2.0.0",
"eslint": "^8.53.0",
"eslint-plugin-compat": "^4.2.0",
"eslint-plugin-compat": "^5.0.0",
"eslint-plugin-jest": "^27.6.0",
"eslint-plugin-tsdoc": "^0.2.17",
"happy-dom": "^14.12.0",
"markdownlint": "^0.25.1",
"markdownlint-cli": "^0.31.1",
"prettier": "2.8.4",
"turbo": "^2.0.3",
"typescript": "^4.9.5"
"turbo": "^2.0.4",
"typescript": "^5.4.5"
},
"scripts": {
"build:all": "NODE_OPTIONS='--max-old-space-size=4096' yarn run concurrently --success=all -r -m=1 'yarn workspaces-to-typescript-project-references' 'yarn turbo run prepublish'",
"test": "yarn run concurrently --success=all -r -m=1 'yarn workspaces-to-typescript-project-references --check' 'yarn turbo run test --concurrency=1 --continue'",
"build:all": "NODE_OPTIONS='--max-old-space-size=4096' yarn turbo run prepublish",
"references:update": "yarn workspaces-to-typescript-project-references",
"test": "yarn turbo run test --concurrency=1 --continue",
"test:watch": "yarn turbo run test:watch",
"test:update": "yarn turbo run test:update",
"check-types": "yarn turbo run check-types --continue",
"format": "yarn prettier --write '**/*.{ts,md}'",
"format:head": "git diff --name-only HEAD^ |grep '\\.ts$\\|\\.md$' |xargs yarn prettier --write",
"dev": "CLEAR_DIST_DIR=false yarn turbo run dev --concurrency=17",
"dev": "yarn turbo run dev --concurrency=18",
"repl": "cd packages/rrweb && npm run repl",
"live-stream": "cd packages/rrweb && yarn live-stream",
"lint": "yarn run concurrently --success=all -r -m=1 'yarn run markdownlint docs' 'yarn eslint packages/*/src --ext .ts,.tsx,.js,.jsx,.svelte'",
Expand All @@ -58,7 +61,8 @@
},
"resolutions": {
"**/cssom": "https://registry.npmjs.org/rrweb-cssom/-/rrweb-cssom-0.6.0.tgz",
"**/@types/dom-webcodecs": "0.1.5"
"**/@types/dom-webcodecs": "0.1.5",
"typescript": "^5.4.5"
},
"browserslist": [
"defaults",
Expand Down
22 changes: 22 additions & 0 deletions packages/all/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,27 @@
# @rrweb/all

## 2.0.13

### Patch Changes

- Merge from rrweb remote upstream

- Updated dependencies []:
- @saola.ai/rrweb-packer@2.0.13
- @saola.ai/rrweb@2.0.13
- @saola.ai/rrweb-types@2.0.13

## 2.0.0-alpha.17

### Patch Changes

- [`db20184`](https://github.com/rrweb-io/rrweb/commit/db201841accd2b5df3cd7c88779aa62ab158501c) Thanks [@Juice10](https://github.com/Juice10)! - Keep package version in sync with other packages

- Updated dependencies [[`db20184`](https://github.com/rrweb-io/rrweb/commit/db201841accd2b5df3cd7c88779aa62ab158501c), [`40bbc25`](https://github.com/rrweb-io/rrweb/commit/40bbc25fc287badc317a53f2d3f21b1c9f2b211b), [`68076b7`](https://github.com/rrweb-io/rrweb/commit/68076b724ff19d198d4f351a05063b85e1705a8c), [`8059d96`](https://github.com/rrweb-io/rrweb/commit/8059d9695146626b102b2059a3a9b932d5f598f6), [`335639a`](https://github.com/rrweb-io/rrweb/commit/335639af9b0ce7f70eb0f38ce113d877c7325158), [`be6bf52`](https://github.com/rrweb-io/rrweb/commit/be6bf52c248c35de1b3491e3a3440ff61f876414)]:
- @rrweb/packer@2.0.0-alpha.17
- rrweb@2.0.0-alpha.17
- @rrweb/types@2.0.0-alpha.17

## 2.0.0

### Major Changes
Expand Down
18 changes: 9 additions & 9 deletions packages/all/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@saola.ai/rrweb-all",
"version": "2.0.0",
"version": "2.0.13",
"publishConfig": {
"access": "public"
},
Expand All @@ -10,11 +10,11 @@
],
"scripts": {
"dev": "vite build --watch",
"build": "tsc -noEmit && vite build",
"build": "yarn turbo run prepublish",
"test": "vitest run",
"test:watch": "vitest watch",
"check-types": "tsc -noEmit",
"prepublish": "npm run build",
"prepublish": "tsc -noEmit && vite build",
"lint": "yarn eslint src/**/*.ts"
},
"homepage": "https://github.com/rrweb-io/rrweb/tree/main/packages/@rrweb/all#readme",
Expand Down Expand Up @@ -50,15 +50,15 @@
],
"devDependencies": {
"puppeteer": "^20.9.0",
"vite": "^5.2.8",
"vite-plugin-dts": "^3.8.1",
"vite": "^5.3.1",
"vite-plugin-dts": "^3.9.1",
"vitest": "^1.4.0",
"typescript": "^4.7.3"
"typescript": "^5.4.5"
},
"dependencies": {
"@saola.ai/rrweb-types": "^2.0.0",
"@saola.ai/rrweb-packer": "^2.0.0",
"@saola.ai/rrweb": "^2.0.0"
"@saola.ai/rrweb-types": "^2.0.13",
"@saola.ai/rrweb-packer": "^2.0.13",
"@saola.ai/rrweb": "^2.0.13"
},
"browserslist": [
"supports es6-class"
Expand Down
2 changes: 1 addition & 1 deletion packages/all/test/cross-origin-iframe-packer.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ describe('cross origin iframes & packer', function (this: ISuite) {
const unpackedSnapshots = packedSnapshots.map((packed) =>
unpack(packed),
) as eventWithTime[];
assertSnapshot(unpackedSnapshots);
await assertSnapshot(unpackedSnapshots);
});
});
});
Expand Down
18 changes: 18 additions & 0 deletions packages/packer/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,23 @@
# @rrweb/packer

## 2.0.13

### Patch Changes

- Merge from rrweb remote upstream

- Updated dependencies []:
- @saola.ai/rrweb-types@2.0.13

## 2.0.0-alpha.17

### Patch Changes

- [`db20184`](https://github.com/rrweb-io/rrweb/commit/db201841accd2b5df3cd7c88779aa62ab158501c) Thanks [@Juice10](https://github.com/Juice10)! - Keep package version in sync with other packages

- Updated dependencies [[`335639a`](https://github.com/rrweb-io/rrweb/commit/335639af9b0ce7f70eb0f38ce113d877c7325158)]:
- @rrweb/types@2.0.0-alpha.17

## 2.0.0

### Major Changes
Expand Down
14 changes: 7 additions & 7 deletions packages/packer/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@saola.ai/rrweb-packer",
"version": "2.0.0",
"version": "2.0.13",
"publishConfig": {
"access": "public"
},
Expand All @@ -10,11 +10,11 @@
],
"scripts": {
"dev": "vite build --watch",
"build": "tsc -noEmit && vite build",
"build": "yarn turbo run prepublish",
"test": "vitest run",
"test:watch": "vitest watch",
"check-types": "tsc -noEmit",
"prepublish": "npm run build",
"prepublish": "tsc -noEmit && vite build",
"lint": "yarn eslint src/**/*.ts"
},
"bugs": {
Expand Down Expand Up @@ -70,14 +70,14 @@
"package.json"
],
"devDependencies": {
"vite": "^5.2.8",
"vite-plugin-dts": "^3.8.1",
"vite": "^5.3.1",
"vite-plugin-dts": "^3.9.1",
"vitest": "^1.4.0",
"typescript": "^4.7.3"
"typescript": "^5.4.5"
},
"dependencies": {
"fflate": "^0.4.4",
"@saola.ai/rrweb-types": "^2.0.0"
"@saola.ai/rrweb-types": "^2.0.13"
},
"browserslist": [
"supports es6-class"
Expand Down
2 changes: 1 addition & 1 deletion packages/packer/src/pack.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { strFromU8, strToU8, zlibSync } from 'fflate';
import type { PackFn } from '@saola.ai/rrweb-types';
import { eventWithTimeAndPacker, MARK } from './base';
import { type eventWithTimeAndPacker, MARK } from './base';

export const pack: PackFn = (event) => {
const _e: eventWithTimeAndPacker = {
Expand Down
2 changes: 1 addition & 1 deletion packages/packer/src/unpack.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { strFromU8, strToU8, unzlibSync } from 'fflate';
import { eventWithTimeAndPacker, MARK } from './base';
import { type eventWithTimeAndPacker, MARK } from './base';
import type { UnpackFn, eventWithTime } from '@saola.ai/rrweb-types';

export const unpack: UnpackFn = (raw: string) => {
Expand Down
18 changes: 18 additions & 0 deletions packages/plugins/rrweb-plugin-canvas-webrtc-record/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,23 @@
# @rrweb/rrweb-plugin-canvas-webrtc-record

## 2.0.13

### Patch Changes

- Merge from rrweb remote upstream

- Updated dependencies []:
- @saola.ai/rrweb@2.0.13

## 2.0.0-alpha.17

### Patch Changes

- [`db20184`](https://github.com/rrweb-io/rrweb/commit/db201841accd2b5df3cd7c88779aa62ab158501c) Thanks [@Juice10](https://github.com/Juice10)! - Keep package version in sync with other packages

- Updated dependencies [[`40bbc25`](https://github.com/rrweb-io/rrweb/commit/40bbc25fc287badc317a53f2d3f21b1c9f2b211b), [`68076b7`](https://github.com/rrweb-io/rrweb/commit/68076b724ff19d198d4f351a05063b85e1705a8c), [`8059d96`](https://github.com/rrweb-io/rrweb/commit/8059d9695146626b102b2059a3a9b932d5f598f6), [`335639a`](https://github.com/rrweb-io/rrweb/commit/335639af9b0ce7f70eb0f38ce113d877c7325158), [`be6bf52`](https://github.com/rrweb-io/rrweb/commit/be6bf52c248c35de1b3491e3a3440ff61f876414)]:
- rrweb@2.0.0-alpha.17

## 2.0.0

### Major Changes
Expand Down
16 changes: 8 additions & 8 deletions packages/plugins/rrweb-plugin-canvas-webrtc-record/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@saola.ai/rrweb-plugin-canvas-webrtc-record",
"version": "2.0.0",
"version": "2.0.13",
"description": "",
"type": "module",
"main": "./dist/rrweb-plugin-canvas-webrtc-record.umd.cjs",
Expand All @@ -25,9 +25,9 @@
],
"scripts": {
"dev": "vite build --watch",
"build": "tsc -noEmit && vite build",
"build": "yarn turbo run prepublish",
"check-types": "tsc -noEmit",
"prepublish": "npm run build"
"prepublish": "tsc -noEmit && vite build"
},
"repository": {
"type": "git",
Expand All @@ -43,12 +43,12 @@
},
"homepage": "https://github.com/rrweb-io/rrweb#readme",
"devDependencies": {
"@saola.ai/rrweb": "^2.0.0",
"typescript": "^4.7.3",
"vite": "^5.2.8",
"vite-plugin-dts": "^3.8.1"
"@saola.ai/rrweb": "^2.0.13",
"typescript": "^5.4.5",
"vite": "^5.3.1",
"vite-plugin-dts": "^3.9.1"
},
"peerDependencies": {
"@saola.ai/rrweb": "^2.0.0"
"@saola.ai/rrweb": "^2.0.13"
}
}
18 changes: 18 additions & 0 deletions packages/plugins/rrweb-plugin-canvas-webrtc-replay/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,23 @@
# @rrweb/rrweb-plugin-canvas-webrtc-replay

## 2.0.13

### Patch Changes

- Merge from rrweb remote upstream

- Updated dependencies []:
- @saola.ai/rrweb@2.0.13

## 2.0.0-alpha.17

### Patch Changes

- [`db20184`](https://github.com/rrweb-io/rrweb/commit/db201841accd2b5df3cd7c88779aa62ab158501c) Thanks [@Juice10](https://github.com/Juice10)! - Keep package version in sync with other packages

- Updated dependencies [[`40bbc25`](https://github.com/rrweb-io/rrweb/commit/40bbc25fc287badc317a53f2d3f21b1c9f2b211b), [`68076b7`](https://github.com/rrweb-io/rrweb/commit/68076b724ff19d198d4f351a05063b85e1705a8c), [`8059d96`](https://github.com/rrweb-io/rrweb/commit/8059d9695146626b102b2059a3a9b932d5f598f6), [`335639a`](https://github.com/rrweb-io/rrweb/commit/335639af9b0ce7f70eb0f38ce113d877c7325158), [`be6bf52`](https://github.com/rrweb-io/rrweb/commit/be6bf52c248c35de1b3491e3a3440ff61f876414)]:
- rrweb@2.0.0-alpha.17

## 2.0.0

### Major Changes
Expand Down
Loading