Canvas recording: Preserve drawing buffer (#1273)

* Upgrade jest to 29 and puppeteer to 16 in rrweb

* Apply formatting changes

* Upgrade rrweb's puppeteer to v20

* Apply formatting changes

* Canvas: Reduce flickering and capturing of empty canvas elements

Turn on `preserveDrawingBuffer` by default for canvas FPS recording.
Has some negative performance implications, but really helps when capturing canvas.

* Apply formatting changes

* Include all test image snapshots in ci

* Apply formatting changes

* Allow more flexibility when capturing hover

* Apply formatting changes

* Create tiny-chairs-build.md

* Apply formatting changes

* Update hover.test.ts

* Apply formatting changes

* Document snapshotFormat jest config

* Freeze `yarn.lock` in ci for reproducible dependencies

* Apply formatting changes

* Apply formatting changes

* Revert to old style of puppeteer evaluation script notation

* Apply formatting changes

* Make test less flaky

* Apply formatting changes

* Apply formatting changes

* Make tests less flaky

* Apply formatting changes

* Make test more robust

* Apply formatting changes

* Apply formatting changes

* Add debugging code for test

* Apply formatting changes

* Also test not ignored input

* Apply formatting changes

* Apply formatting changes

* Apply formatting changes

* escape ignoreSelector

* Apply formatting changes

* Apply formatting changes
This commit is contained in:
Justin Halsall
2026-04-01 12:00:00 +08:00
committed by GitHub
parent d4ce14af98
commit 7d1a278688
20 changed files with 2103 additions and 201 deletions

View File

@@ -21,7 +21,7 @@ jobs:
node-version: lts/*
- name: Install Dependencies
run: yarn
run: yarn install --frozen-lockfile
- name: Build Project
run: NODE_OPTIONS='--max-old-space-size=4096' yarn build:all
@@ -37,5 +37,5 @@ jobs:
if: failure()
with:
name: image-diff
path: packages/rrweb/test/e2e/__image_snapshots__/__diff_output__/*.png
path: packages/rrweb/test/*/__image_snapshots__/__diff_output__/*.png
if-no-files-found: ignore

View File

@@ -21,7 +21,7 @@ jobs:
node-version: lts/*
- name: Install Dependencies
run: yarn
run: yarn install --frozen-lockfile
- name: Create Release Pull Request or Publish to npm
id: changesets
@@ -29,7 +29,7 @@ jobs:
with:
publish: yarn run release
env:
NODE_OPTIONS: "--max-old-space-size=4096"
NODE_OPTIONS: '--max-old-space-size=4096'
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

View File

@@ -18,7 +18,7 @@ jobs:
node-version: 16
cache: 'yarn'
- name: Install Dependencies
run: yarn
run: yarn install --frozen-lockfile
- name: Build Packages
run: NODE_OPTIONS='--max-old-space-size=4096' yarn build:all
- name: Eslint Check