Commit Graph

87 Commits

Author SHA1 Message Date
dependabot[bot]
1b5d08d977 Bump trim-off-newlines from 1.0.1 to 1.0.3 (#808)
Bumps [trim-off-newlines](https://github.com/stevemao/trim-off-newlines) from 1.0.1 to 1.0.3.
- [Release notes](https://github.com/stevemao/trim-off-newlines/releases)
- [Commits](https://github.com/stevemao/trim-off-newlines/compare/v1.0.1...v1.0.3)

---
updated-dependencies:
- dependency-name: trim-off-newlines
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-04-01 12:00:00 +08:00
Lucky Feng
dd2cdedcd6 rrdom (#613)
* create rrdom package

* test(rrdom): add unit tests for polyfill.ts

* fix(rrweb snapshot): type check errors

Errors are caused by the declaration similarity of @types/mocha and @types/jest if we install both of them in the whole project.

* Set tagNames to upper case by default

This mirrors the `Element.tagName` implementation:

```
For DOM trees which represent HTML documents, the returned tag name is always in the canonical upper-case form. For example, tagName called on a <div> element returns "DIV".
```
https://developer.mozilla.org/en-US/docs/Web/API/Element/tagName

* Add workspace file

* VSCode settings for rrdom tests

* Add basic test for RRDocument

* Only setup jest tests for rrdom

* mock Node type and Event type for nodejs environment

* test(rrdom): add snapshot for document.test.ts

* fix issue of nwsapi import and add unit tests for rrdom

* fix: querySelectorAll returns nothing when querying elements with ids and classNames

* fix: error of unit test for Event polyfill

Since Event class is built in nodejs after v15.0.0

* add a dummy implementation of canvas

* add style element support

* add unit test for style element

Co-authored-by: Justin Halsall <Juice10@users.noreply.github.com>
2026-04-01 12:00:00 +08:00
yz-yu
23e00bdf66 migrate to jest (#721)
* migrate rrweb-snapshot tests to jest

* migrate rrweb tests to jest
2026-04-01 12:00:00 +08:00
Yanzhen Yu
4b6a7fbf2e fix lock file registry 2026-04-01 12:00:00 +08:00
Yanzhen Yu
a74961065c upgrade rollup and rollup plugins 2026-04-01 12:00:00 +08:00
dependabot[bot]
3577303979 Bump tar from 4.4.17 to 4.4.19 (#686)
Bumps [tar](https://github.com/npm/node-tar) from 4.4.17 to 4.4.19.
- [Release notes](https://github.com/npm/node-tar/releases)
- [Changelog](https://github.com/npm/node-tar/blob/main/CHANGELOG.md)
- [Commits](https://github.com/npm/node-tar/compare/v4.4.17...v4.4.19)

---
updated-dependencies:
- dependency-name: tar
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-04-01 12:00:00 +08:00
Yanzhen Yu
15e80075f1 fix registry in lock file 2026-04-01 12:00:00 +08:00
Yanzhen Yu
d26d9582b6 update yarn.lock 2026-04-01 12:00:00 +08:00
yz-yu
183b6c11af Record and replay nested stylesheet rules (#666)
* fix typo

* record nested style rules

* Replay nested style rules

* handle index array in replayer

Co-authored-by: Justin Halsall <Juice10@users.noreply.github.com>
2026-04-01 12:00:00 +08:00
Yanzhen Yu
309b7d9026 add lerna to manage monorepo 2026-04-01 12:00:00 +08:00
Mark-fenng
f6aafb70e1 moved rrweb into packages/rrweb 2026-04-01 12:00:00 +08:00
Yanzhen Yu
d144f29f71 upgrade rrweb-snapshot to 1.1.7
ignore prefetch and preload script links
close #52, #297, #597

Handle quoted strings in data url
2026-04-01 12:00:00 +08:00
yz-yu
50998fae7f use prettier instead of node-libtidy (#638) 2026-04-01 12:00:00 +08:00
Justin Halsall
a891d141d2 Add type checking to ci (#626)
* Add type checking to ci

* Update @types/node to version 12

We are using node 12 on ci
2026-04-01 12:00:00 +08:00
Justin Halsall
59b7a39ce1 Buffer modifications to virtual stylesheets (#618)
* Fix sheet insertion

Restore skip duration

Use virtualStyleRulesMap to re-populate stylesheet on Flush event

Clear virtualStyleRulesMap after flush applied

* Support rule deletion in virtual processing

* Simply restoreNodeSheet with early aborts

* Encountered a bug where firstFullSnapshot was played twice because timer was immediately started and reached the snapshot before the setTimeout returned

* Ignoring a FullSnapshot needs to be a one-time only thing, as otherwise we'll ignore it after scrubbing (restarting play head at a particular time). This is a problem if mutations have altered the player state, and we try to replay those mutations, so we e.g. try to remove an element that has already been removed because we haven't reset the FullSnapshot state

* Some `npm run typings` related fixups

* add basic html snapshot functionality

* move restoreNodeSheet to it's own module

* Refactor virtual style rules to buffer changes.
Only applies changes on flush.

`virtualStyleRulesMap` now works with strings instead of CSSRules.
CSSRules can only be via made `.insertRule` on CSSStyleSheet in most browsers.
And `new CSSStyleSheet()` only works in Chrome currently.

* remove unused code

* move VirtualStyleRules from CSSRule to string in tests

* correct paths for tests

* naming

* create and restore style snapshots for virtual nodes

* update replayer snapshot

* move storeCSSRules to virtual-styles.ts

* try/catch access to .sheet in case of access errors

* clean up tests

Co-authored-by: Vladimir Milenko <vladimir.milenko@uber.com>
Co-authored-by: Eoghan Murray <eoghan@getthere.ie>
2026-04-01 12:00:00 +08:00
Justin Halsall
4dcd674e34 Mask value attribute changes for elements in maskInputOptions (#602)
* mask value attribute changes for elements in maskInputOptions

* refactor initInputObserver to use maskInputValue

* add todo

* Fix typo

* upgrade rrweb-snapshot to 1.1.6

* move maskInputValue to rrweb-snapshot
2026-04-01 12:00:00 +08:00
Yanzhen Yu
880cc3ab9e update yarn.lock 2026-04-01 12:00:00 +08:00
dependabot[bot]
f5119c9b5d Bump color-string from 1.5.4 to 1.5.5 (#599)
Bumps [color-string](https://github.com/Qix-/color-string) from 1.5.4 to 1.5.5.
- [Release notes](https://github.com/Qix-/color-string/releases)
- [Changelog](https://github.com/Qix-/color-string/blob/master/CHANGELOG.md)
- [Commits](https://github.com/Qix-/color-string/compare/1.5.4...1.5.5)

---
updated-dependencies:
- dependency-name: color-string
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-04-01 12:00:00 +08:00
Justin Halsall
80e7307729 Tests: Iframe event order (#568)
* add failing test

* assert order of events

* defer attaching of iframe till FullSnapshot is done
Fixes: https://github.com/rrweb-io/rrweb/issues/567

* correct event order in iframe integration test snapshot

* trigger build

* trigger build

* Move settimeout responsibility to snapshot
https://github.com/rrweb-io/rrweb-snapshot/pull/78

* upgrade rrweb-snapshot to 1.1.4

* DRY record tests

* cleanup

* Upgrade puppeteer to 9.1.1
for (hopefully) more consistent behaviour between CI and development

* make input bigger to prevent triggering scroll events

* page.waitFor is deprecated
more info: https://github.com/puppeteer/puppeteer/issues/6214

* Set os and distro for Travis ci

Co-authored-by: yz-yu <yanzhen@smartx.com>
2026-04-01 12:00:00 +08:00
Yanzhen Yu
b9e1938951 fix registry 2026-04-01 12:00:00 +08:00
Yanzhen Yu
30f4aa20b3 update rrweb-snapshot 2026-04-01 12:00:00 +08:00
dependabot[bot]
a9a3e2849f Bump ws from 6.2.1 to 6.2.2 (#575)
Bumps [ws](https://github.com/websockets/ws) from 6.2.1 to 6.2.2.
- [Release notes](https://github.com/websockets/ws/releases)
- [Commits](https://github.com/websockets/ws/commits)

---
updated-dependencies:
- dependency-name: ws
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-04-01 12:00:00 +08:00
dependabot[bot]
1a05e51ee2 Bump browserslist from 4.14.5 to 4.16.6 (#569)
Bumps [browserslist](https://github.com/browserslist/browserslist) from 4.14.5 to 4.16.6.
- [Release notes](https://github.com/browserslist/browserslist/releases)
- [Changelog](https://github.com/browserslist/browserslist/blob/main/CHANGELOG.md)
- [Commits](https://github.com/browserslist/browserslist/compare/4.14.5...4.16.6)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-04-01 12:00:00 +08:00
dependabot[bot]
e66b5d9af6 Bump lodash from 4.17.20 to 4.17.21
Bumps [lodash](https://github.com/lodash/lodash) from 4.17.20 to 4.17.21.
- [Release notes](https://github.com/lodash/lodash/releases)
- [Commits](https://github.com/lodash/lodash/compare/4.17.20...4.17.21)

Signed-off-by: dependabot[bot] <support@github.com>
2026-04-01 12:00:00 +08:00
re-fort
b1b25447ff Add options to mask texts (#540)
* feat: add options to mask texts

* feat: add the default mask function

* refactor: rename options to identify the difference between  mask text and mask input

* test: add tests about masking

* doc: add options about masking

* chore: bump up rrweb-snapshot version
2026-04-01 12:00:00 +08:00
Yanzhen Yu
0e688bba0c impl shadow DOM manager
part of #38
1. observe DOM mutations in shadow DOM
2. rebuild DOM mutations in shadow DOM
2026-04-01 12:00:00 +08:00
Yanzhen Yu
e9d915b3d6 rename node_modules in es bundle to ext 2026-04-01 12:00:00 +08:00
Yanzhen Yu
64b1c44b3a upgrade rrweb-snapshot to 1.0.7 2026-04-01 12:00:00 +08:00
Moji Izadmehr
2906b0cb22 Add prettier as a dependency (#487) 2026-04-01 12:00:00 +08:00
yz-yu
33f0ac5cfe Impl record iframe (#481)
* Impl record iframe

* iframe observe

* temp: add bundle file to git

* update bundle

* update with pick

* update bundle

* fix fragment map remove

* feat: add an option to determine whether to pause CSS animation when playback is paused (#428)

set pauseAnimation to true by default

* fix: elements would lose some states like scroll position because of "virtual parent" optimization (#427)

* fix: elements would lose some state like scroll position because of "virtual parent" optimization

* refactor: the bugfix code

bug: elements would lose some state like scroll position because of "virtual parent" optimization

* fix: an error occured at applyMutation(remove nodes part)

error message:
Uncaught (in promise) DOMException: Failed to execute 'removeChild' on 'Node': The node to be removed is not a child of this node

* pick fixes

* revert ignore file

* re-impl iframe record

* re-impl iframe replay

* code housekeeping

* move multi layer dimension calculation to replay side

* update test cases

* teardown test server

* upgrade rrweb-snapshot with iframe load timeout

Co-authored-by: Lucky Feng <yun.feng@smartx.com>
2026-04-01 12:00:00 +08:00
Yanzhen Yu
25d23bdc35 read __rrMutationObserver from window 2026-04-01 12:00:00 +08:00
Yanzhen Yu
4dea29333a upgrade snapshot 2026-04-01 12:00:00 +08:00
101arrowz
30026bb8f5 Update to fflate (#448)
* Update to fflate

* Update docs, bundler config
2026-04-01 12:00:00 +08:00
dependabot[bot]
b0db4395ae Bump ini from 1.3.5 to 1.3.8 (#441)
Bumps [ini](https://github.com/isaacs/ini) from 1.3.5 to 1.3.8.
- [Release notes](https://github.com/isaacs/ini/releases)
- [Commits](https://github.com/isaacs/ini/compare/v1.3.5...v1.3.8)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-04-01 12:00:00 +08:00
Yanzhen Yu
ffa1fa2538 upgrade rrweb-snapshot 2026-04-01 12:00:00 +08:00
Yanzhen Yu
528b8373a0 upgrade to rrweb-snapshot v1.0 2026-04-01 12:00:00 +08:00
yz-yu
4118f12582 Fix CI (#405)
* add yarn.lock to CI

* update travis config

* replace data url by placeholder in CI
2026-04-01 12:00:00 +08:00