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

Rrweb sync alpha 15 vite complete #43

Merged
merged 39 commits into from
Oct 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
4fe0153
Chore: Migrate build to vite (#1033)
Juice10 Jun 7, 2024
db91358
chore(rrweb): fixing issues with vite
jxiwang Oct 17, 2024
ac683cf
chore(rrweb): almost finished builds
jxiwang Oct 18, 2024
41a53cc
chore(rrweb): Fixed build issues
jxiwang Oct 18, 2024
68ee960
chore(rrweb): fix issue typing issue
jxiwang Oct 18, 2024
a72a849
chore(rrweb): rrweb player type fix
jxiwang Oct 18, 2024
64b5ed3
chore(rrweb): pull in some flaky test fixes
jxiwang Oct 18, 2024
f317df7
fix: some nested cross-origin iframes can't be recorded (#1353)
YunFeng0817 Jun 7, 2024
0749d4c
Added changesets for https://github.com/rrweb-io/rrweb/pull/1033 (#1497)
Juice10 Jun 7, 2024
0eb478c
Chore: Ignore generated files from .svelte-kit for prettier & make vi…
Juice10 Jun 10, 2024
c994a02
Update styleguilde.md (#1498)
eoghanmurray Jun 10, 2024
416d1b1
Chore: Fix yarn dev (#1501)
Juice10 Jun 10, 2024
551b547
Chore: Delete unused lerna.json file (#1506)
Juice10 Jun 12, 2024
5bb9c50
fix: extension doesn't work after vite bump (#1507)
YunFeng0817 Jun 12, 2024
4442d21
Add option to block animation on <title> tag (#760)
eoghanmurray Jun 13, 2024
3ef1e70
Skip mask check on leaf elements (#1512)
eoghanmurray Jun 17, 2024
7a50870
Assuming all jest should have been removed in #1033 (#1511)
eoghanmurray Jun 17, 2024
d814428
Fix async assertions in test files (#1510)
Juice10 Jun 18, 2024
becf687
Fix maskInputFn is ignored during the creation of the full snapshot (…
ababik Jun 21, 2024
3075dca
Improve development tooling (#1516)
Juice10 Jun 21, 2024
fee67b5
chore(rrweb): fixing build issues with vite
jxiwang Oct 22, 2024
b834f12
feat: add new css parser - postcss (#1458)
daibhin Jun 27, 2024
586a9e1
fix: console assert only logs when arg 0 is falsy (#1530)
pauldambra Jul 2, 2024
1dba10a
[Feature] Include takeFullSnapshot function in rrweb (#1527)
arredgroup Jul 3, 2024
c63c427
chore: reduce flakey test due to '[vite] connected' message (#1525)
Juice10 Jul 5, 2024
178f1e6
fix: duplicate textContent for style element cause incremental style …
YunFeng0817 Jul 8, 2024
e8a0ecd
Added support for deprecated addRule & removeRule methods (#1515)
okejminja Jul 23, 2024
6676611
fix: nested stylesheets should have absolute URLs (#1533)
jeffdnguyen Jul 25, 2024
3ae57a6
Support top-layer <dialog> recording & replay (#1503)
Juice10 Aug 2, 2024
c3d79a6
Added session downloader for chrome extension (#1522)
kirankunigiri Aug 2, 2024
9e9226f
Reverse monkey patch built in methods to support LWC (#1509)
Juice10 Aug 2, 2024
a054e1f
chore(rrweb): fix package issues
jxiwang Oct 22, 2024
fc69d50
chore(rrweb): fix dev dependencies
jxiwang Oct 22, 2024
4e4f5b3
chore(rrweb): update changesets to amplitude
jxiwang Oct 22, 2024
64c762e
chore(rrweb): changeset fix
jxiwang Oct 22, 2024
282e8b4
chore(rrweb): fixing web-extension
jxiwang Oct 22, 2024
cf57d6f
chore(rrweb): tsconfig for rrweb-snpashot
jxiwang Oct 22, 2024
ec36208
fix(rrweb): try/catch to postcss
jxiwang Oct 22, 2024
c2eefdc
Apply formatting changes
jxiwang Oct 22, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
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