Skip to content

Commit

Permalink
Merge pull request #43 from amplitude/rrweb-sync-alpha-15-vite-complete
Browse files Browse the repository at this point in the history
Rrweb sync alpha 15 vite complete
  • Loading branch information
jxiwang authored Oct 23, 2024
2 parents 892bfc0 + c2eefdc commit 217db79
Show file tree
Hide file tree
Showing 346 changed files with 19,541 additions and 15,292 deletions.
Empty file added .cache/.gitkeep
Empty file.
6 changes: 6 additions & 0 deletions .changeset/beige-olives-roll.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
"@amplitude/rrweb-snapshot": patch
"@amplitude/rrweb": patch
---

Fix that the optional `maskInputFn` was being accidentally ignored during the creation of the full snapshot
2 changes: 2 additions & 0 deletions .changeset/bright-socks-clap.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
---
---
13 changes: 12 additions & 1 deletion .changeset/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,20 @@
"@amplitude/rrdom",
"@amplitude/rrdom-nodejs",
"@amplitude/rrweb-player",
"@amplitude/rrweb-all",
"@amplitude/rrweb-replay",
"@amplitude/rrweb-record",
"@amplitude/rrweb-types",
"@amplitude/rrweb-packer",
"@amplitude/rrweb-utils",
"@amplitude/rrweb-web-extension",
"@amplitude/rrvideo"
"@amplitude/rrvideo",
"@amplitude/rrweb-plugin-console-record",
"@amplitude/rrweb-plugin-console-replay",
"@amplitude/rrweb-plugin-sequential-id-record",
"@amplitude/rrweb-plugin-sequential-id-replay",
"@amplitude/rrweb-plugin-canvas-webrtc-record",
"@amplitude/rrweb-plugin-canvas-webrtc-replay"
]
],
"linked": [],
Expand Down
6 changes: 6 additions & 0 deletions .changeset/cuddly-bikes-fail.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
"@amplitude/rrweb-snapshot": patch
"@amplitude/rrweb": patch
---

fix: duplicate textContent for style elements cause incremental style mutations to be invalid
8 changes: 8 additions & 0 deletions .changeset/eighty-teachers-smash.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
"@amplitude/rrweb-plugin-canvas-webrtc-replay": patch
"@amplitude/rrweb-plugin-sequential-id-replay": patch
"@amplitude/rrweb-plugin-console-replay": patch
"@amplitude/rrweb": patch
---

Export `ReplayPlugin` from rrweb directly. Previously we had to do `import type { ReplayPlugin } from 'rrweb/dist/types';` now we can do `import type { ReplayPlugin } from 'rrweb';`
2 changes: 2 additions & 0 deletions .changeset/eleven-toys-vanish.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
---
---
5 changes: 5 additions & 0 deletions .changeset/giant-rats-chew.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@amplitude/rrweb": patch
---

Export takeFullSnapshot function for a recording process
5 changes: 5 additions & 0 deletions .changeset/gold-experts-type.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@amplitude/rrweb-plugin-console-record": patch
---

corrects behaviour of console.assert logging to only capture logs when the provided assertion is falsey
6 changes: 6 additions & 0 deletions .changeset/great-cows-camp.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
"@amplitude/rrweb-record": patch
"@amplitude/rrweb": patch
---

Added support for deprecated addRule & removeRule methods
5 changes: 5 additions & 0 deletions .changeset/happy-carrots-hide.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@amplitude/rrweb-snapshot": minor
---

Record dialog's modal status for replay in rrweb. (Currently triggering `dialog.showModal()` is not supported in rrweb-snapshot's rebuild)
2 changes: 2 additions & 0 deletions .changeset/last-jest-to-vitest.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
---
---
2 changes: 2 additions & 0 deletions .changeset/lovely-files-sparkle.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
---
---
2 changes: 2 additions & 0 deletions .changeset/nasty-scissors-reply.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
---
---
12 changes: 12 additions & 0 deletions .changeset/perfect-bulldogs-punch.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
---
"@amplitude/rrweb-plugin-canvas-webrtc-record": major
"@amplitude/rrweb-plugin-canvas-webrtc-replay": major
"@amplitude/rrweb-plugin-sequential-id-record": major
"@amplitude/rrweb-plugin-sequential-id-replay": major
"@amplitude/rrweb-plugin-console-record": major
"@amplitude/rrweb-plugin-console-replay": major
"@amplitude/rrweb-packer": major
"@amplitude/rrweb": major
---

Split plugins out of rrweb and move them into their own packages: @rrweb/packer, @rrweb/rrweb-plugin-canvas-webrtc-record, @rrweb/rrweb-plugin-canvas-webrtc-replay, @rrweb/rrweb-plugin-sequential-id-record, @rrweb/rrweb-plugin-sequential-id-replay, @rrweb/rrweb-plugin-console-record, @rrweb/rrweb-plugin-console-replay. Check out the README of each package for more information or check out https://github.com/rrweb-io/rrweb/pull/1033 to see the changes.
20 changes: 20 additions & 0 deletions .changeset/pretty-meals-flash.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
"@amplitude/rrweb-all": major
"@amplitude/rrweb-packer": major
"@amplitude/rrweb-plugin-canvas-webrtc-record": major
"@amplitude/rrweb-plugin-canvas-webrtc-replay": major
"@amplitude/rrweb-plugin-console-record": major
"@amplitude/rrweb-plugin-console-replay": major
"@amplitude/rrweb-plugin-sequential-id-record": major
"@amplitude/rrweb-plugin-sequential-id-replay": major
"@amplitude/rrweb-record": major
"@amplitude/rrweb-replay": major
"@amplitude/rrdom": major
"@amplitude/rrdom-nodejs": major
"@amplitude/rrweb": major
"@amplitude/rrweb-player": major
"@amplitude/rrweb-snapshot": major
"@amplitude/rrweb-types": major
---

Important: If you don't reference distributed files directly, for example you run `import rrweb from 'rrweb'` you won't notice a difference. If you include rrweb in a script tag and referred to a `.js` file, you'll now have to update that path to include a `.umd.cjs` file. Distributed files have new paths, filenames and extensions. All packages now no longer include a `.js` files, instead they include `.cjs`, `.umd.cjs` and `.mjs` files. The `.umd.cjs` files are CommonJS modules that bundle all files together to make it easy to ship one file to browser environments. The `.mjs` files are ES modules that can be used in modern browsers, node.js and bundlers that support ES modules. The `.cjs` files are CommonJS modules that can be used in older Node.js environments.
5 changes: 5 additions & 0 deletions .changeset/purple-carrots-film.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@amplitude/rrweb": patch
---

Fix: some nested cross-origin iframes can't be recorded
2 changes: 2 additions & 0 deletions .changeset/serious-eggs-greet.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
---
---
7 changes: 7 additions & 0 deletions .changeset/silly-knives-chew.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
"@amplitude/rrdom": minor
"@amplitude/rrweb": minor
"@amplitude/rrweb-types": minor
---

Support top-layer <dialog> components. Fixes #1381.
5 changes: 5 additions & 0 deletions .changeset/six-llamas-brush.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@amplitude/rrweb-snapshot": patch
---

Fix `url()` rewrite for nested stylesheets by rewriting during stringification instead of after
6 changes: 6 additions & 0 deletions .changeset/skip-mask-check-on-leaf-elements.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
"@amplitude/rrweb-snapshot": patch
"@amplitude/rrweb": patch
---

optimisation: skip mask check on leaf elements
2 changes: 2 additions & 0 deletions .changeset/slimy-eagles-grow.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
---
---
8 changes: 8 additions & 0 deletions .changeset/small-hats-kneel.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
"@amplitude/rrweb-all": major
"@amplitude/rrweb-record": major
"@amplitude/rrweb-replay": major
"@amplitude/rrweb": major
---

Remove the rrweb-all.js, rrweb-record.js, and rrweb-replay.js files from `rrweb` package. Now you can use `@rrweb/all`, `@rrweb/record`, and `@rrweb/replay` packages instead. Check out the README of each package for more information or check out [PR #1033](https://github.com/rrweb-io/rrweb/pull/1033) to see the changes.
6 changes: 6 additions & 0 deletions .changeset/title-deanimate-option.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
"@amplitude/rrweb-snapshot": patch
"@amplitude/rrweb": patch
---

Add slimDOM option to block animation on <title> tag; enabled when the 'all' value is used for slimDOM
2 changes: 2 additions & 0 deletions .changeset/two-boats-boil.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
---
---
7 changes: 7 additions & 0 deletions .changeset/unlucky-mirrors-invite.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
"@amplitude/rrweb-snapshot": patch
"@amplitude/rrweb": patch
"@amplitude/rrweb-utils": patch
---

Reverse monkey patch built in methods to support LWC (and other frameworks like angular which monkey patch built in methods).
5 changes: 5 additions & 0 deletions .changeset/wicked-dolphins-tie.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@amplitude/rrweb-web-extension": minor
---

Added session downloader for chrome extension
2 changes: 2 additions & 0 deletions .changeset/wicked-lions-return.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
---
---
13 changes: 13 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
.DS_Store
node_modules
/build
/dist
/package
.env
.env.*
!.env.example

# Ignore files for PNPM, NPM and YARN
pnpm-lock.yaml
package-lock.json
yarn.lock
3 changes: 2 additions & 1 deletion .eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// TODO: add .eslintignore. More info: https://bobbyhadz.com/blog/typescript-parseroptions-project-has-been-set-for
module.exports = {
env: {
browser: true,
Expand All @@ -16,7 +17,7 @@ module.exports = {
ecmaVersion: 'latest',
sourceType: 'module',
tsconfigRootDir: __dirname,
project: ['./tsconfig.eslint.json', './packages/*/tsconfig.json'],
project: ['./tsconfig.eslint.json', './packages/**/tsconfig.json'],
},
plugins: ['@typescript-eslint', 'eslint-plugin-tsdoc', 'jest', 'compat'],
rules: {
Expand Down
7 changes: 4 additions & 3 deletions .github/workflows/ci-cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,23 +19,24 @@ jobs:
uses: actions/setup-node@v3
with:
node-version: lts/*

- name: Install Dependencies
run: yarn install --frozen-lockfile

- name: Build Project
run: NODE_OPTIONS='--max-old-space-size=4096' yarn build:all

- name: Check types
run: yarn turbo run check-types
run: yarn check-types

- name: Run tests
# run: PUPPETEER_EXECUTABLE_PATH=${{ steps.setup-chrome.outputs.chrome-path }} PUPPETEER_HEADLESS=true xvfb-run --server-args="-screen 0 1920x1080x24" yarn test
run: PUPPETEER_HEADLESS=true xvfb-run --server-args="-screen 0 1920x1080x24" yarn test

- name: Upload diff images to GitHub
uses: actions/upload-artifact@v3
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
3 changes: 2 additions & 1 deletion .github/workflows/style-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:
name: ESLint Check and Report Upload

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
repository: ${{ github.event.pull_request.head.repo.full_name }}
ref: ${{ github.head_ref }}
Expand Down Expand Up @@ -93,3 +93,4 @@ jobs:
with:
commit_message: Apply formatting changes
branch: ${{ github.head_ref }}
file_pattern: ':!packages/rrweb-player/.svelte-kit/ambient.d.ts'
13 changes: 12 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,25 @@ temp

.DS_Store

# output of `yarn build`
build
dist

# turbo cache
.turbo

# needed to store puppeteer binaries
.cache/*
!.gitkeep

# emacs working files end in a tilde
*~

# `.yarn/install-state.gz` is an optimization file that you shouldn't ever have to commit.
# It simply stores the exact state of your project so that the next commands can boot without having to resolve your workspaces all over again.
.yarn/install-state.gz
.yarn/install-state.gz


# for vite
vite.config.js.timestamp-*
vite.config.ts.timestamp-*
5 changes: 5 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -105,3 +105,8 @@
.changeset/witty-kids-talk.md
.changeset/yellow-mails-cheat.md
.changeset/young-timers-grow.md

# files generated by svelte-kit
packages/rrweb-player/.svelte-kit/generated/*
packages/rrweb-player/.svelte-kit/ambient.d.ts
packages/rrweb-player/.svelte-kit/non-ambient.d.ts
10 changes: 10 additions & 0 deletions .puppeteerrc.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
const { join } = require('path');

/**
* @type {import("puppeteer").Configuration}
*/
module.exports = {
// Changes the cache location for Puppeteer.
cacheDirectory: join(__dirname, '.cache', 'puppeteer'),
browserRevision: '115.0.5763.0',
};
70 changes: 67 additions & 3 deletions .vscode/rrweb-monorepo.code-workspace
Original file line number Diff line number Diff line change
Expand Up @@ -24,18 +24,82 @@
"name": "rrweb-snapshot (package)",
"path": "../packages/rrweb-snapshot"
},
{
"name": "@rrweb/all",
"path": "../packages/all"
},
{
"name": "@rrweb/record",
"path": "../packages/record"
},
{
"name": "@rrweb/replay",
"path": "../packages/replay"
},
{
"name": "@rrweb/types",
"path": "../packages/types"
},
{
"name": "@rrweb/utils",
"path": "../packages/utils"
},
{
"name": "@rrweb/packer",
"path": "../packages/packer"
},
{
"name": "web-extension (package)",
"path": "../packages/web-extension"
},
{ "name": "rrvideo (package)", "path": "../packages/rrvideo" },
{ "name": "@rrweb/types", "path": "../packages/types" }
{
"name": "@rrweb/rrweb-plugin-console-record",
"path": "../packages/plugins/rrweb-plugin-console-record"
},
{
"name": "@rrweb/rrweb-plugin-console-replay",
"path": "../packages/plugins/rrweb-plugin-console-replay"
},
{
"name": "@rrweb/rrweb-plugin-sequential-id-record",
"path": "../packages/plugins/rrweb-plugin-sequential-id-record"
},
{
"name": "@rrweb/rrweb-plugin-sequential-id-replay",
"path": "../packages/plugins/rrweb-plugin-sequential-id-replay"
},
{
"name": "@rrweb/rrweb-plugin-canvas-webrtc-record",
"path": "../packages/plugins/rrweb-plugin-canvas-webrtc-record"
},
{
"name": "@rrweb/rrweb-plugin-canvas-webrtc-replay",
"path": "../packages/plugins/rrweb-plugin-canvas-webrtc-replay"
}
],
"settings": {
"vitest.workspaceConfig": "../vitest.workspace.ts",
"vitest.commandLine": "yarn vitest",
"jest.disabledWorkspaceFolders": [
" rrweb monorepo",
"rrweb (package)",
"rrweb-player (package)",
"@rrweb/types"
]
"rrweb-snapshot (package)",
"rrdom (package)",
"rrdom-nodejs (package)",
"@rrweb/all",
"@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"
}
}
Loading

0 comments on commit 217db79

Please sign in to comment.