Migrates to vite@6 to drop base64 inlined worker source from all bundles #1762
Migrates to vite@6 to drop base64 inlined worker source from all bundles #1762
Conversation
Without this change, build would fail because the produced stylesheet assumes the `package.json['name']` i.e., `styles/rrweb.css`. To maintain the existing behavior, these changes are required. See https://vite.dev/guide/migration.html#customize-css-output-file-name-in-library-mode
Update playwright dependency to latest version and refactor test execution options to use a shared configuration with increased timeout for stability.
Update playwright dependency to latest version and refactor test execution options to use a shared configuration with increased timeout for stability.
🦋 Changeset detectedLatest commit: 57e5f26 The changes in this PR will be included in the next version bump. This PR includes changesets to release 19 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
…cess Add detailed console.log statements throughout the transformToVideo function to track execution flow and debug potential issues. Logging covers browser launch, context creation, page navigation, replay progress, and video file operations.
…bility - Add Playwright Chromium installation step to CI workflow - Change test execution stdio from 'pipe' to 'inherit' for better debugging
…t listeners Set autoPlay to false in replayer configuration and manually call play() after all event listeners are attached. This ensures event handlers are properly registered before playback begins, preventing potential race conditions. Also refactor test execution options to separate stdio configuration from timeout settings for better control over test output visibility.
Add comprehensive error handling to prevent hanging during video transformation: - Add 2-minute timeout for replay finish event - Add console and error listeners for better debugging - Improve promise chain with proper error catching - Clear timeout on successful completion or error This prevents the process from hanging indefinitely when the replay finish event never fires.
Wrap replayer initialization in try-catch block to handle potential errors gracefully. Restructure Player instantiation to use rrwebPlayer directly instead of rrwebPlayer.Player, and move width/height into props object for correct API usage. On error, log to console and trigger onReplayFinish callback to prevent hanging state.
There was a problem hiding this comment.
Pull request overview
This PR upgrades major dependencies (Vite 5.x → 6.0.1, Playwright 1.32.1 → 1.56.1, esbuild 0.21.5 → 0.24.2) across the entire monorepo and fixes critical issues in the rrvideo package to unfreeze tests from PR #1637. The changes focus on resolving playback stalls in rrvideo by refactoring how rrweb-player is initialized, adding comprehensive error handling and debug logging, and ensuring Playwright browsers are properly installed in CI.
- Major dependency upgrades across all packages (Vite, Playwright, esbuild)
- Fixed rrvideo playback issues with improved player initialization and error handling
- Added debug logging and timeout handling for better troubleshooting
Reviewed changes
Copilot reviewed 26 out of 27 changed files in this pull request and generated 7 comments.
Show a summary per file
| File | Description |
|---|---|
| yarn.lock | Updated lockfile with new versions of esbuild (0.24.2), playwright (1.56.1), vite (6.0.11), and related dependencies including new optional platform dependencies |
| vite.config.default.ts | Added cssFileName configuration and removed commented rollup options |
| packages/*/package.json (18 files) | Updated vite dependency to ^6.0.1 across all packages; updated playwright to ^1.56.1 in rrvideo |
| packages/rrweb/package.json | Added new CSS export path "./dist/rrweb.css" |
| packages/rrvideo/src/index.ts | Refactored replayer initialization from Player class to direct constructor, added try-catch error handling, manual play() call, extensive debug logging, timeout mechanism, and console/error listeners |
| packages/rrvideo/test/cli.test.ts | Added timeout configuration (60s) and changed stdio from 'pipe' to 'inherit' for better debugging |
| .github/workflows/ci-cd.yml | Added step to install Playwright chromium browser before running tests |
| .changeset/*.md | Added changesets documenting patches for rrvideo improvements and dropping base64 inlined workers |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| @@ -0,0 +1,2 @@ | |||
| --- | |||
| --- | |||
There was a problem hiding this comment.
This changeset file appears to be empty except for the frontmatter. An empty changeset may not be intentional and could cause issues with versioning. Either this file should be removed, or it should include a description of what changes were made and which packages are affected.
| --- | |
| --- | |
| This changeset file contains no versioning information and was created accidentally; it can be safely removed when cleaning up changesets. |
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Update UMD build globals for recorder and replayer and refresh documentation accordingly. BREAKING CHANGE: UMD global names changed to rrwebRecord and rrwebReplay.
Co-authored-by: Eoghan Murray <eoghan@getthere.ie>
Unfreeze PR #1637 tests so the tests pass. Superseeds #1637
BREAKING CHANGE: Rename UMD global names from
rrwebtorrwebRecordfor the recorder andrrwebReplayfor the replayer. This avoids conflicts when both are loaded on the same page.Fixes #1578
Description from @ruiconti: