Skip to content

Commit 61ae54e

Browse files
Juice10ruiconti
authored andcommitted
Merge branch 'master' into rui/fix-worker-b64-inlined-source
2 parents c559345 + fd9d274 commit 61ae54e

File tree

142 files changed

+5188
-1904
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

142 files changed

+5188
-1904
lines changed

.changeset/angry-turtles-provide.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"rrweb-snapshot": patch
3+
---
4+
5+
Handle exceptions thrown from postcss when calling adaptCssForReplay

.changeset/blank-cherries-laugh.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
---
2+
---

.changeset/blank-dev-changset.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
---
2+
---

.changeset/chilled-penguins-sin.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"rrdom": patch
3+
---
4+
5+
Ignore invalid DOM attributes when diffing

.changeset/dirty-pets-fly.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
---
2+
---
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
"rrweb-snapshot": patch
3+
"rrweb": patch
4+
---
5+
6+
Improve performance of splitCssText for <style> elements with large css content - see #1603
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
"rrweb-snapshot": patch
3+
"rrweb": patch
4+
---
5+
6+
Improve performance of splitCssText for <style> elements with large css content - see #1603
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
---
2+
---

.changeset/famous-bobcats-push.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
---
2+
---

.changeset/fix-adapt-css.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
"rrweb": patch
3+
"rrweb-snapshot": patch
4+
---
5+
6+
#1575 Fix that postcss could fall over when trying to process css content split arbitrarily

.changeset/four-panthers-fly.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@rrweb/web-extension": patch
3+
---
4+
5+
web-extension: improve recording stability across tabs and enable session import

.changeset/fuzzy-mugs-march.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
---
2+
---

.changeset/itchy-tables-compete.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
---
2+
"@rrweb/rrweb-plugin-console-record": patch
3+
"@rrweb/record": patch
4+
"rrweb": patch
5+
"@rrweb/utils": patch
6+
---
7+
8+
Move patch function into @rrweb/utils to improve bundling

.changeset/lucky-donuts-hammer.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
---
2+
---

.changeset/metal-mugs-mate.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
---
2+
---

.changeset/moody-experts-build.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@rrweb/record": patch
3+
---
4+
5+
Correctly detect when angular has wrapped mutation observer

.changeset/odd-onions-brush.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@rrweb/web-extension": patch
3+
---
4+
5+
fix: remove the permission not needed and update the player style link

.changeset/perfect-dolls-grab.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"rrweb-snapshot": patch
3+
---
4+
5+
fix dimensions for blocked element not being applied

.changeset/pre.json

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@
3232
"calm-bulldogs-speak",
3333
"calm-oranges-sin",
3434
"chatty-cherries-train",
35+
"chilled-penguins-sin",
3536
"clean-plants-play",
3637
"clean-shrimps-lay",
3738
"cold-eyes-hunt",
@@ -90,11 +91,13 @@
9091
"lovely-pears-cross",
9192
"lovely-students-boil",
9293
"mean-tips-impress",
94+
"metal-mugs-mate",
9395
"mighty-ads-worry",
9496
"mighty-bulldogs-begin",
9597
"mighty-frogs-sparkle",
9698
"modern-doors-watch",
9799
"moody-dots-refuse",
100+
"moody-experts-build",
98101
"nasty-scissors-reply",
99102
"nervous-buses-pump",
100103
"nervous-kiwis-nail",
@@ -106,6 +109,7 @@
106109
"no-neg-lookbehind",
107110
"old-dryers-hide",
108111
"perfect-bulldogs-punch",
112+
"perfect-dolls-grab",
109113
"polite-olives-wave",
110114
"pretty-meals-flash",
111115
"pretty-plums-rescue",
@@ -127,6 +131,8 @@
127131
"silly-knives-chew",
128132
"silver-pots-sit",
129133
"silver-windows-float",
134+
"simplifify-hover-replacement",
135+
"single-style-capture",
130136
"six-llamas-brush",
131137
"sixty-impalas-laugh",
132138
"skip-mask-check-on-leaf-elements",
@@ -137,10 +143,12 @@
137143
"smart-geckos-cover",
138144
"smooth-papayas-boil",
139145
"smooth-poems-bake",
146+
"soft-worms-tan",
140147
"spotty-bees-destroy",
141148
"stupid-ghosts-help",
142149
"swift-dancers-rest",
143150
"swift-peas-film",
151+
"swift-pots-search",
144152
"thin-vans-applaud",
145153
"thirty-baboons-punch",
146154
"three-baboons-bow",

.changeset/red-peaches-explode.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"rrweb": patch
3+
---
4+
5+
This fixes an issue where inlined CSS from a remotely loaded `<link>` does not get applied properly due to object reference mutation.

.changeset/short-hounds-confess.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
"rrweb-snapshot": patch
3+
"rrweb": patch
4+
---
5+
6+
Change to ignore all link[rel="modulepreload"] instead of including only those with `as="script"`

.changeset/shy-countries-rhyme.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
---
2+
---
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
"rrweb-snapshot": patch
3+
"rrweb": patch
4+
---
5+
6+
Slight simplification to how we replace :hover after #1458

.changeset/single-style-capture.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
"rrweb-snapshot": patch
3+
"rrweb": patch
4+
---
5+
6+
Edge case: Provide support for mutations on a <style> element which (unusually) has multiple text nodes

.changeset/soft-worms-tan.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
---
2+
"@rrweb/all": patch
3+
"rrdom-nodejs": patch
4+
"rrdom": patch
5+
"rrweb-snapshot": major
6+
"rrweb": patch
7+
"@rrweb/rrweb-plugin-canvas-webrtc-record": patch
8+
---
9+
10+
`NodeType` enum was moved from rrweb-snapshot to @rrweb/types
11+
The following types where moved from rrweb-snapshot to @rrweb/types: `documentNode`, `documentTypeNode`, `legacyAttributes`, `textNode`, `cdataNode`, `commentNode`, `elementNode`, `serializedNode`, `serializedNodeWithId`, `serializedElementNodeWithId`, `serializedTextNodeWithId`, `IMirror`, `INode`, `mediaAttributes`, `attributes` and `DataURLOptions`

.changeset/swift-pots-search.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"rrweb": minor
3+
---
4+
5+
Optimize isParentRemoved check

.changeset/textarea-inner-html.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"rrweb": patch
3+
---
4+
5+
#1596 Add masking for innerText mutations on textarea elements

.eslintrc.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,5 +23,8 @@ module.exports = {
2323
rules: {
2424
'tsdoc/syntax': 'warn',
2525
'@typescript-eslint/prefer-as-const': 'warn',
26+
'camelcase': ['error', {
27+
allow: ['rr_.*', 'legacy_.*', 'UNSAFE_.*', '__rrweb_.*'],
28+
}],
2629
},
2730
};

.github/workflows/ci-cd.yml

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ concurrency: ${{ github.workflow }}-${{ github.ref }}
77
jobs:
88
release:
99
name: Tests
10+
permissions:
11+
contents: read
1012
runs-on: ubuntu-latest
1113
steps:
1214
- name: Checkout Repo
@@ -19,7 +21,8 @@ jobs:
1921
uses: actions/setup-node@v3
2022
with:
2123
node-version: lts/*
22-
24+
cache: 'yarn'
25+
2326
- name: Install Dependencies
2427
run: yarn install --frozen-lockfile
2528

@@ -33,8 +36,16 @@ jobs:
3336
# run: PUPPETEER_EXECUTABLE_PATH=${{ steps.setup-chrome.outputs.chrome-path }} PUPPETEER_HEADLESS=true xvfb-run --server-args="-screen 0 1920x1080x24" yarn test
3437
run: PUPPETEER_HEADLESS=true xvfb-run --server-args="-screen 0 1920x1080x24" yarn test
3538

39+
- name: Check bundle sizes
40+
uses: preactjs/compressed-size-action@v2
41+
with:
42+
install-script: "yarn install --frozen-lockfile"
43+
build-script: "build:all"
44+
compression: "none"
45+
pattern: "**/dist/*.{js,cjs,mjs,css}"
46+
3647
- name: Upload diff images to GitHub
37-
uses: actions/upload-artifact@v3
48+
uses: actions/upload-artifact@v4
3849
if: failure()
3950
with:
4051
name: image-diff

.github/workflows/release.yml

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,17 @@ jobs:
3333
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
3434
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
3535

36-
# - name: Send a Slack notification if a publish happens
37-
# if: steps.changesets.outputs.published == 'true'
38-
# # You can do something when a publish happens.
39-
# run: my-slack-bot send-notification --message "A new version of ${GITHUB_REPOSITORY} was published!"
36+
- name: Build Chrome Extension
37+
if: steps.changesets.outputs.published == 'true'
38+
run: NODE_OPTIONS='--max-old-space-size=4096' DISABLE_WORKER_INLINING=true yarn turbo run prepublish --filter=@rrweb/web-extension
39+
40+
- name: Publish Chrome Extension
41+
uses: mnao305/[email protected]
42+
if: steps.changesets.outputs.published == 'true'
43+
with:
44+
extension-id: 'pdaldeopoccdhlkabbkcjmecmmoninhe'
45+
file-path: ./packages/web-extension/dist/chrome.zip
46+
client-id: ${{ secrets.CWS_CLIENT_ID }}
47+
client-secret: ${{ secrets.CWS_CLIENT_SECRET }}
48+
refresh-token: ${{ secrets.CWS_REFRESH_TOKEN }}
49+
publish: true

.github/workflows/style-check.yml

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ on: [push, pull_request_target]
55
jobs:
66
eslint_check_upload:
77
runs-on: ubuntu-latest
8+
permissions:
9+
contents: read
810
name: ESLint Check and Report Upload
911

1012
steps:
@@ -28,19 +30,21 @@ jobs:
2830
# Continue to the next step even if this fails
2931
continue-on-error: true
3032
- name: Upload ESLint Report
31-
uses: actions/upload-artifact@v3
33+
uses: actions/upload-artifact@v4
3234
with:
3335
name: eslint_report.json
3436
path: eslint_report.json
3537

3638
annotation:
3739
# Skip the annotation action in push events
3840
if: github.event_name == 'pull_request_target'
41+
permissions:
42+
checks: write
3943
needs: eslint_check_upload
4044
runs-on: ubuntu-latest
4145
name: ESLint Annotation
4246
steps:
43-
- uses: actions/download-artifact@v3
47+
- uses: actions/download-artifact@v4
4448
with:
4549
name: eslint_report.json
4650
- name: Annotate Code Linting Results
@@ -52,6 +56,8 @@ jobs:
5256
prettier_check:
5357
# In the forked PR, it's hard to format code and push to the branch directly, so the action only check the format correctness.
5458
if: github.event_name != 'push' && github.event.pull_request.head.repo.full_name != 'rrweb-io/rrweb'
59+
permissions:
60+
contents: read
5561
runs-on: ubuntu-latest
5662
name: Format Check
5763
steps:
@@ -73,6 +79,8 @@ jobs:
7379
# Skip the format code action in forked PRs
7480
if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name == 'rrweb-io/rrweb'
7581
runs-on: ubuntu-latest
82+
permissions:
83+
contents: write
7684
name: Format Code
7785
steps:
7886
- uses: actions/checkout@v3

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,3 +35,6 @@ dist
3535
# for vite
3636
vite.config.js.timestamp-*
3737
vite.config.ts.timestamp-*
38+
39+
# bundle analysis files
40+
*-bundle-analysis.html

docs/recipes/optimize-storage.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ rrweb.record({
4949
rrweb.record({
5050
emit(event) {},
5151
sampling: {
52-
// Configure which kins of mouse interaction should be recorded
52+
// Configure which kinds of mouse interaction should be recorded
5353
mouseInteraction: {
5454
MouseUp: false,
5555
MouseDown: false,
@@ -78,7 +78,7 @@ import { pack } from '@rrweb/packer';
7878

7979
rrweb.record({
8080
emit(event) {},
81-
packFn: rrweb.pack,
81+
packFn: pack,
8282
});
8383
```
8484

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

9090
const replayer = new rrweb.Replayer(events, {
91-
unpackFn: rrweb.unpack,
91+
unpackFn: unpack,
9292
});
9393
```
9494

package.json

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,11 @@
3434
"eslint-plugin-compat": "^5.0.0",
3535
"eslint-plugin-jest": "^27.6.0",
3636
"eslint-plugin-tsdoc": "^0.2.17",
37+
"happy-dom": "^14.12.0",
3738
"markdownlint": "^0.25.1",
3839
"markdownlint-cli": "^0.31.1",
3940
"prettier": "2.8.4",
41+
"rollup-plugin-visualizer": "^5.12.0",
4042
"turbo": "^2.0.4",
4143
"typescript": "^5.4.5"
4244
},
@@ -52,8 +54,8 @@
5254
"dev": "yarn turbo run dev --concurrency=18",
5355
"repl": "cd packages/rrweb && npm run repl",
5456
"live-stream": "cd packages/rrweb && yarn live-stream",
55-
"lint": "yarn run concurrently --success=all -r -m=1 'yarn run markdownlint docs' 'yarn eslint packages/*/src --ext .ts,.tsx,.js,.jsx,.svelte'",
56-
"lint:report": "yarn eslint --output-file eslint_report.json --format json packages/*/src --ext .ts,.tsx,.js,.jsx",
57+
"lint": "yarn run concurrently --success=all -r -m=1 'yarn run markdownlint docs' 'ESLINT_USE_FLAT_CONFIG=false yarn eslint packages/*/src --ext .ts,.tsx,.js,.jsx,.svelte'",
58+
"lint:report": "ESLINT_USE_FLAT_CONFIG=false yarn eslint --output-file eslint_report.json --format json packages/*/src --ext .ts,.tsx,.js,.jsx",
5759
"release": "yarn build:all && changeset publish"
5860
},
5961
"resolutions": {

packages/all/CHANGELOG.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,16 @@
11
# @rrweb/all
22

3+
## 2.0.0-alpha.18
4+
5+
### Patch Changes
6+
7+
- [#1593](https://github.com/rrweb-io/rrweb/pull/1593) [`5a78938`](https://github.com/rrweb-io/rrweb/commit/5a789385a341311ba327a768fe0e2f0f2f5002ee) Thanks [@daibhin](https://github.com/daibhin)! - `NodeType` enum was moved from rrweb-snapshot to @rrweb/types
8+
The following types where moved from rrweb-snapshot to @rrweb/types: `documentNode`, `documentTypeNode`, `legacyAttributes`, `textNode`, `cdataNode`, `commentNode`, `elementNode`, `serializedNode`, `serializedNodeWithId`, `serializedElementNodeWithId`, `serializedTextNodeWithId`, `IMirror`, `INode`, `mediaAttributes`, `attributes` and `DataURLOptions`
9+
- Updated dependencies [[`04ee6ed`](https://github.com/rrweb-io/rrweb/commit/04ee6eda57157f0e04f18f907d8f3e59ababc753), [`5fbb904`](https://github.com/rrweb-io/rrweb/commit/5fbb904edb653f3da17e6775ee438d81ef0bba83), [`5a78938`](https://github.com/rrweb-io/rrweb/commit/5a789385a341311ba327a768fe0e2f0f2f5002ee), [`53b83bb`](https://github.com/rrweb-io/rrweb/commit/53b83bb037f9cb30c93179548f436ed776f143ab)]:
10+
11+
- @rrweb/types@2.0.0-alpha.18
12+
- @rrweb/packer@2.0.0-alpha.18
13+
314
## 2.0.0-alpha.17
415

516
### Patch Changes

0 commit comments

Comments
 (0)