feat: merge upstream commits - #137

Merged
billyvg merged 44 commits into
getsentry:sentry-v2from
rrweb-io:master
Apr 30, 2024
Merged

feat: merge upstream commits#137
billyvg merged 44 commits into
getsentry:sentry-v2from
rrweb-io:master

Conversation

@billyvg

Copy link
Copy Markdown
Member

No description provided.

KentoMoriwakiand others added 30 commits October 6, 2023 10:42
…1311)
* Add config option to turn off all snapshotting and related observers
- allows RRWEB to be used for click/movement tracking alone, e.g. for a heatmaps use case
- could also be used if there was a separate process for recording the DOM (in which case a 3rd party library like https://github.com/antonmedv/finder could be added to record targets instead of the mirror)
---------
Authored-by: eoghanmurray <eoghanmurray@users.noreply.github.com>
Co-authored-by: Justin Halsall <Juice10@users.noreply.github.com>
* Extends maskTextFn to pass the HTMLElement to the deciding function
---------
Authored-by: benjackwhite <benjackwhite@users.noreply.github.com>
Co-authored-by: Justin Halsall <Juice10@users.noreply.github.com>
Co-authored-by: Eoghan Murray <eoghan@getthere.ie>
Co-authored-by: Yun Feng <yun.feng0817@gmail.com>
* export eventWithTime for consumption in typescript code
* Fix linting issues
* Apply formatting changes
Co-authored-by: Justin Halsall <Juice10@users.noreply.github.com>
* only call createHTMLDocument where it is needed
* Perf: create the mutation document once as a 'singleton' as it can be reused
---------
Co-authored-by: Michael Dellanoce <mdellanoce@pendo.io>
…nts (#1155)
* Feat: Add support for replaying :defined pseudo-class of custom elements
* add isCustom flag to serialized elements
Applying Justin's review suggestion
* fix code lint error
* add custom element event
* fix: tests (#1348)
* Update packages/rrweb/src/record/observer.ts
* Update packages/rrweb/src/record/observer.ts
---------
Co-authored-by: Nafees Nehar <nafees87n@gmail.com>
Co-authored-by: Justin Halsall <Juice10@users.noreply.github.com>
… the DOM (#1349)
* masking performance: avoid the repeated calls to `closest` when recursing through the DOM
- needsMask===true means that an ancestor has tested positively for masking, and so this node and all descendents should be masked
- needsMask===false means that no ancestors have tested positively for masking, we should check each node encountered
- needsMask===undefined means that we don't know whether ancestors are masked or not (e.g. after a mutation) and should look up the tree
* Add tests including an explicit characterData mutation tests * Further performance improvement: avoid calls to `el.matches` when on a leaf node, e.g. a `<br/>`
---------
Authored-by: eoghanmurray <eoghan@getthere.ie>
Based on initial PR #1338 by Alexey Babik <alexey.babik@noibu.com>
* Fix serialization and mutation of <textarea> elements taking account the duality that the value can be set in either the child node, or in the value _parameter_ (not attribute)
* Backwards compatibility: Bug fix and regression test for #112
- this is to fix up 'historical' recordings, as duplicate textarea content should no longer be being created at record time
- new test shows what the snapshot generated by previous versions of rrweb used to look like, hence 'bad'
- original 0efe23f fix either didn't work or no longer works due to childNodes being appended subsequent to this part of the code
- during review, we also verified that the `_cssText` case should still be handled okay, as there's currently no scenario where csstext is present with css child nodes of a <style>
* Masking: Fix that textarea values were being missed by the masking system if the value was recorded as a child node
- I didn't notice that form.html was used in other tests, so lucky that I noticed that those tests also should have the 'pre value' masked out
* Simplify by always storing the textarea value in the `.value` attribute (from it's DOM property) and not as a childNode. It should still be rebuilt as a childNode rather than a property
---------
Authored-by: eoghanmurray <eoghan@getthere.ie>
Co-authored-by: Justin Halsall <Juice10@users.noreply.github.com>
Co-authored-by: Yun Feng <yun.feng0817@gmail.com>
* Update Node version to LTS
* Create silver-windows-float.md
* Add UXWizz to Readme (CN)
* Add UXWizz to Readme
* Create hip-worms-relax.md
---------
Co-authored-by: Justin Halsall <Juice10@users.noreply.github.com>
* Add rrweb presentation
Add Justin Halsall open to rrweb consulting
* Create few-rockets-travel.md
* Update README.md
* Update README.md
* Fix alignment
* chore: export canvasMutation
* add changeset
* fix: console logger can serialize bigint values
* teach test jsdom is present
* add a changeset
* Update export-to-video.md
The file was pointing to the old Rrvideo repo The old repository soon is going to be closed as the Rrvideo was merged on Rrweb This change is pointing this recipe to the new and updated official doc.
* Update export-to-video.zh_CN.md
The file was pointing to the old Rrvideo repo The old repository soon is going to be closed as the Rrvideo was merged on Rrweb This change is pointing this recipe to the new and updated official doc.
Chinese version
* run tests without concurrency
* do not use cache in rpt2 during test
* Make properties x and y optional in mouseInteractionParam
The event representing a mouse interaction of focus an element does not include the properties x and y. Thus, they must be defined as optional.
* Fix typings
* feat(Snapshot): Capture stylesheets designated as `rel="preload"`
* fix(Snapshot): Harden asset file extension matching
* Add changeset
* chore: Lint
* Tweak regex, add try-catch block on URL constructor
* fix: scrolling can be incorrect when fast-forwarding
* add test case
* add changeset and remove duplicate diffProps process
---------
Co-authored-by: Yun Feng <yun.feng0817@gmail.com>
eoghanmurrayand others added 14 commits March 26, 2024 16:44
* We weren't recursing into media queries (or @supports etc.) to rewrite hover pseudoclasses
* The early return meant that the stylesWithHoverClass cache wasn't being populated if there were no hover selectors on the stylesheet
- not committing the test, but modifying the existing 'add a hover class to a previously processed css string' as follows shows the problem:
--- a/packages/rrweb-snapshot/test/rebuild.test.ts
+++ b/packages/rrweb-snapshot/test/rebuild.test.ts
@@ -151,6 +185,7 @@ describe('rebuild', function () {
path.resolve(__dirname, './css/benchmark.css'),
'utf8',
);
+ cssText = cssText.replace(/:hover/g, '');
const start = process.hrtime();
addHoverClass(cssText, cache);
* Replace `min-device-width` and similar with `min-width` as the former looks out at the browser viewport whereas we need it to look at the replayer iframe viewport
* Add some tests to show how the hover replacement works against selector lists. I believe these were failing in a previous version of rrweb as I had some local patches that no longer seem to be needed to handle these cases
* Update name of function to reflect that 'addHoverClass' does more than just :hover. I believe this function is only exported for the purposes of use in the tests
* Apply formatting changes
* Create rotten-spies-enjoy.md
* Apply formatting changes
* Add correct typing on `getSelectors`
* Refactor CSS interfaces to include optional rules
* Change `rules` to be non optional
---------
Co-authored-by: eoghanmurray <eoghanmurray@users.noreply.github.com>
Co-authored-by: Justin Halsall <Juice10@users.noreply.github.com>
* Add HowdyGo to Who's using rrweb
* Create twenty-goats-kneel.md
---------
Co-authored-by: Justin Halsall <Juice10@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
* try/catch injection of recording script in rrweb repl and stream
* Add empty changesets
* fix: createImageBitmap throws DOMException if source is 0
* code review
* fix
* Create breezy-cats-heal.md
* fix format
---------
Co-authored-by: Justin Halsall <Juice10@users.noreply.github.com>
* protect against a missing parent node during a mutation on an textNode
…layer (#1408)
Expose constant SKIP_TIME_THRESHOLD as `inactivePeriodThreshold` config setting in replayer
* Add support for capturing media attributes in rrweb-snapshot
* Add loop to mediaInteractionParam
* Add support for loop in RRMediaElement
* Add support for recording loop attribute on media elements
* Update video playback and fix bugs
* Update cross-origin iframe media attributes and player state
* Fix known issues
* Run format
* Fix linting errors
* Add comment in code for source of match logic
* Add changeset
…xt" (#1369)
* Add "types" field to fix error when using "moduleResolution": "NodeNext".
* Add changeset.
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
* better splitting of selectors - overlapping with #1401 * Add test from example at PostHog/posthog#21427
* ignore brackets inside selector strings
* Add another test as noticed that it's possible to escape strings
* Ensure we are ignoring commas within strings
Co-authored-by: Eoghan Murray <eoghan@getthere.ie>
…sion (#1441)
performance: remove a nested function call and an object clone during event emission
- rename `event` to `eventWithoutTime`, but maintain backwards compatibility
- `eventWithTime` (with time) could be renamed to `event` in a future version
This is an extension of PR #1339 authored by: mydea <mydea@users.noreply.github.com>
@billyvgbillyvg closed this Apr 19, 2024
@billyvgbillyvg reopened this Apr 19, 2024
@billyvg
billyvg merged commit 9e7381d into getsentry:sentry-v2Apr 30, 2024
chargome added a commit that referenced this pull request Mar 25, 2026
Remove lerna and replace its two uses with lighter alternatives:
- **`lerna version`** → `scripts/bump-version.js` — a ~80-line Node
script that updates all workspace `package.json` versions and
`@sentry-internal/*` cross-references to the exact new version. Modeled
after
[sentry-javascript#19325](getsentry/sentry-javascript#19325).
- **`lerna run build:tarball`** → `turbo run build:tarball` — Turborepo
is already used for all other cross-package tasks.
Lerna was pulling in a large transitive dependency tree including
packages with known vulnerabilities. This removes ~2,300 lines from
`yarn.lock`.
### Dependabot alerts resolved
**Fully resolved** (vulnerable package completely removed from
lockfile):
| Alert | Severity | Package | Summary |
|-------|----------|---------|---------|
| #217 | HIGH | `tar` | Symlink Path Traversal via Drive-Relative
Linkpath |
| #216 | HIGH | `tar` | Hardlink Path Traversal via Drive-Relative
Linkpath |
| #185 | HIGH | `tar` | Arbitrary File Read/Write via Hardlink Target
Escape Through Symlink Chain |
| #176 | HIGH | `tar` | Arbitrary File Creation/Overwrite via Hardlink
Path Traversal |
| #174 | HIGH | `tar` | Race Condition via Unicode Ligature Collisions
on macOS APFS |
| #172 | HIGH | `tar` | Arbitrary File Overwrite and Symlink Poisoning
via Insufficient Path Sanitization |
| #137 | HIGH | `axios` | SSRF and Credential Leakage via Absolute URL |
**Partially resolved** (some vulnerable entries removed, but the package
still exists via other dependency chains):
| Alert | Severity | Package | Remaining source |
|-------|----------|---------|-----------------|
| #213, #208, #207, #205 | HIGH | `minimatch` | `markdownlint-cli`,
`vite-plugin-dts` still pull in vulnerable versions |
| #161 | HIGH | `glob` | `markdownlint-cli`, `web-ext-run` still pull in
vulnerable versions |
| #136, #135 | CRITICAL | `form-data` | `jest` (via jsdom) still pulls
in `form-data@3.0.2` |
| #158, #157 | MEDIUM | `js-yaml` | `@changesets/cli`, `jest` still pull
in `js-yaml@3.14.1` |
The partially resolved alerts will be addressed in later phases (Phase
6: mop up remaining — bumping `markdownlint-cli`, `@changesets/cli`,
`jest`/rrvideo, etc.).
Part of the ongoing effort to resolve all Dependabot alerts on this
repo.
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

20 participants

@billyvg@KentoMoriwaki@eoghanmurray@benjackwhite@mydea@huangkairan@BelenLuo-tech@Juice10@mdellanoce@boehlerlukas@YunFeng0817@pauldambra@Cristy94@daibhin@patlopes@Yuyz0112@avillegasn@andrewpomeroy@xujiujiu@juliecheng
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Add copy buttons to all
 blocks\n(function() {\n function addCopyButtons() {\n document.querySelectorAll('pre code').forEach(function(codeBlock) {\n if (codeBlock.parentElement.hasAttribute('data-copy-added')) return;\n codeBlock.parentElement.setAttribute('data-copy-added', 'true');\n \n var btn = document.createElement('button');\n btn.textContent = 'Copy';\n btn.style.cssText = 'position:absolute;top:4px;right:4px;padding:2px 8px;font-size:11px;background:#4ecdc4;border:none;border-radius:4px;color:#1a1a2e;cursor:pointer;opacity:0.7;transition:opacity 0.2s;';\n btn.onmouseover = function() { this.style.opacity = '1'; };\n btn.onmouseout = function() { this.style.opacity = '0.7'; };\n btn.onclick = function() {\n navigator.clipboard.writeText(codeBlock.textContent).then(function() {\n btn.textContent = 'Copied!';\n setTimeout(function() { btn.textContent = 'Copy'; }, 1500);\n });\n };\n codeBlock.parentElement.style.position = 'relative';\n codeBlock.parentElement.appendChild(btn);\n });\n }\n \n addCopyButtons();\n \n // Re-run on dynamic content\n var observer = new MutationObserver(addCopyButtons);\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "Add Copy Buttons to Code Blocks");
}
} catch(__e) { console.warn('[Userscript:Add Copy Buttons to Code Blocks]', __e); }
})();
(function(){
try {
var __m = "github.com";
var __re = new RegExp('^' + "github\\.com" + '
Skip to content

feat: merge upstream commits - #137

Merged
billyvg merged 44 commits into
getsentry:sentry-v2from
rrweb-io:master
Apr 30, 2024
Merged

feat: merge upstream commits#137
billyvg merged 44 commits into
getsentry:sentry-v2from
rrweb-io:master

Conversation

@billyvg

Copy link
Copy Markdown
Member

No description provided.

KentoMoriwakiand others added 30 commits October 6, 2023 10:42
…1311)
* Add config option to turn off all snapshotting and related observers
- allows RRWEB to be used for click/movement tracking alone, e.g. for a heatmaps use case
- could also be used if there was a separate process for recording the DOM (in which case a 3rd party library like https://github.com/antonmedv/finder could be added to record targets instead of the mirror)
---------
Authored-by: eoghanmurray <eoghanmurray@users.noreply.github.com>
Co-authored-by: Justin Halsall <Juice10@users.noreply.github.com>
* Extends maskTextFn to pass the HTMLElement to the deciding function
---------
Authored-by: benjackwhite <benjackwhite@users.noreply.github.com>
Co-authored-by: Justin Halsall <Juice10@users.noreply.github.com>
Co-authored-by: Eoghan Murray <eoghan@getthere.ie>
Co-authored-by: Yun Feng <yun.feng0817@gmail.com>
* export eventWithTime for consumption in typescript code
* Fix linting issues
* Apply formatting changes
Co-authored-by: Justin Halsall <Juice10@users.noreply.github.com>
* only call createHTMLDocument where it is needed
* Perf: create the mutation document once as a 'singleton' as it can be reused
---------
Co-authored-by: Michael Dellanoce <mdellanoce@pendo.io>
…nts (#1155)
* Feat: Add support for replaying :defined pseudo-class of custom elements
* add isCustom flag to serialized elements
Applying Justin's review suggestion
* fix code lint error
* add custom element event
* fix: tests (#1348)
* Update packages/rrweb/src/record/observer.ts
* Update packages/rrweb/src/record/observer.ts
---------
Co-authored-by: Nafees Nehar <nafees87n@gmail.com>
Co-authored-by: Justin Halsall <Juice10@users.noreply.github.com>
… the DOM (#1349)
* masking performance: avoid the repeated calls to `closest` when recursing through the DOM
- needsMask===true means that an ancestor has tested positively for masking, and so this node and all descendents should be masked
- needsMask===false means that no ancestors have tested positively for masking, we should check each node encountered
- needsMask===undefined means that we don't know whether ancestors are masked or not (e.g. after a mutation) and should look up the tree
* Add tests including an explicit characterData mutation tests * Further performance improvement: avoid calls to `el.matches` when on a leaf node, e.g. a `<br/>`
---------
Authored-by: eoghanmurray <eoghan@getthere.ie>
Based on initial PR #1338 by Alexey Babik <alexey.babik@noibu.com>
* Fix serialization and mutation of <textarea> elements taking account the duality that the value can be set in either the child node, or in the value _parameter_ (not attribute)
* Backwards compatibility: Bug fix and regression test for #112
- this is to fix up 'historical' recordings, as duplicate textarea content should no longer be being created at record time
- new test shows what the snapshot generated by previous versions of rrweb used to look like, hence 'bad'
- original 0efe23f fix either didn't work or no longer works due to childNodes being appended subsequent to this part of the code
- during review, we also verified that the `_cssText` case should still be handled okay, as there's currently no scenario where csstext is present with css child nodes of a <style>
* Masking: Fix that textarea values were being missed by the masking system if the value was recorded as a child node
- I didn't notice that form.html was used in other tests, so lucky that I noticed that those tests also should have the 'pre value' masked out
* Simplify by always storing the textarea value in the `.value` attribute (from it's DOM property) and not as a childNode. It should still be rebuilt as a childNode rather than a property
---------
Authored-by: eoghanmurray <eoghan@getthere.ie>
Co-authored-by: Justin Halsall <Juice10@users.noreply.github.com>
Co-authored-by: Yun Feng <yun.feng0817@gmail.com>
* Update Node version to LTS
* Create silver-windows-float.md
* Add UXWizz to Readme (CN)
* Add UXWizz to Readme
* Create hip-worms-relax.md
---------
Co-authored-by: Justin Halsall <Juice10@users.noreply.github.com>
* Add rrweb presentation
Add Justin Halsall open to rrweb consulting
* Create few-rockets-travel.md
* Update README.md
* Update README.md
* Fix alignment
* chore: export canvasMutation
* add changeset
* fix: console logger can serialize bigint values
* teach test jsdom is present
* add a changeset
* Update export-to-video.md
The file was pointing to the old Rrvideo repo The old repository soon is going to be closed as the Rrvideo was merged on Rrweb This change is pointing this recipe to the new and updated official doc.
* Update export-to-video.zh_CN.md
The file was pointing to the old Rrvideo repo The old repository soon is going to be closed as the Rrvideo was merged on Rrweb This change is pointing this recipe to the new and updated official doc.
Chinese version
* run tests without concurrency
* do not use cache in rpt2 during test
* Make properties x and y optional in mouseInteractionParam
The event representing a mouse interaction of focus an element does not include the properties x and y. Thus, they must be defined as optional.
* Fix typings
* feat(Snapshot): Capture stylesheets designated as `rel="preload"`
* fix(Snapshot): Harden asset file extension matching
* Add changeset
* chore: Lint
* Tweak regex, add try-catch block on URL constructor
* fix: scrolling can be incorrect when fast-forwarding
* add test case
* add changeset and remove duplicate diffProps process
---------
Co-authored-by: Yun Feng <yun.feng0817@gmail.com>
eoghanmurrayand others added 14 commits March 26, 2024 16:44
* We weren't recursing into media queries (or @supports etc.) to rewrite hover pseudoclasses
* The early return meant that the stylesWithHoverClass cache wasn't being populated if there were no hover selectors on the stylesheet
- not committing the test, but modifying the existing 'add a hover class to a previously processed css string' as follows shows the problem:
--- a/packages/rrweb-snapshot/test/rebuild.test.ts
+++ b/packages/rrweb-snapshot/test/rebuild.test.ts
@@ -151,6 +185,7 @@ describe('rebuild', function () {
path.resolve(__dirname, './css/benchmark.css'),
'utf8',
);
+ cssText = cssText.replace(/:hover/g, '');
const start = process.hrtime();
addHoverClass(cssText, cache);
* Replace `min-device-width` and similar with `min-width` as the former looks out at the browser viewport whereas we need it to look at the replayer iframe viewport
* Add some tests to show how the hover replacement works against selector lists. I believe these were failing in a previous version of rrweb as I had some local patches that no longer seem to be needed to handle these cases
* Update name of function to reflect that 'addHoverClass' does more than just :hover. I believe this function is only exported for the purposes of use in the tests
* Apply formatting changes
* Create rotten-spies-enjoy.md
* Apply formatting changes
* Add correct typing on `getSelectors`
* Refactor CSS interfaces to include optional rules
* Change `rules` to be non optional
---------
Co-authored-by: eoghanmurray <eoghanmurray@users.noreply.github.com>
Co-authored-by: Justin Halsall <Juice10@users.noreply.github.com>
* Add HowdyGo to Who's using rrweb
* Create twenty-goats-kneel.md
---------
Co-authored-by: Justin Halsall <Juice10@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
* try/catch injection of recording script in rrweb repl and stream
* Add empty changesets
* fix: createImageBitmap throws DOMException if source is 0
* code review
* fix
* Create breezy-cats-heal.md
* fix format
---------
Co-authored-by: Justin Halsall <Juice10@users.noreply.github.com>
* protect against a missing parent node during a mutation on an textNode
…layer (#1408)
Expose constant SKIP_TIME_THRESHOLD as `inactivePeriodThreshold` config setting in replayer
* Add support for capturing media attributes in rrweb-snapshot
* Add loop to mediaInteractionParam
* Add support for loop in RRMediaElement
* Add support for recording loop attribute on media elements
* Update video playback and fix bugs
* Update cross-origin iframe media attributes and player state
* Fix known issues
* Run format
* Fix linting errors
* Add comment in code for source of match logic
* Add changeset
…xt" (#1369)
* Add "types" field to fix error when using "moduleResolution": "NodeNext".
* Add changeset.
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
* better splitting of selectors - overlapping with #1401 * Add test from example at PostHog/posthog#21427
* ignore brackets inside selector strings
* Add another test as noticed that it's possible to escape strings
* Ensure we are ignoring commas within strings
Co-authored-by: Eoghan Murray <eoghan@getthere.ie>
…sion (#1441)
performance: remove a nested function call and an object clone during event emission
- rename `event` to `eventWithoutTime`, but maintain backwards compatibility
- `eventWithTime` (with time) could be renamed to `event` in a future version
This is an extension of PR #1339 authored by: mydea <mydea@users.noreply.github.com>
@billyvgbillyvg closed this Apr 19, 2024
@billyvgbillyvg reopened this Apr 19, 2024
@billyvg
billyvg merged commit 9e7381d into getsentry:sentry-v2Apr 30, 2024
chargome added a commit that referenced this pull request Mar 25, 2026
Remove lerna and replace its two uses with lighter alternatives:
- **`lerna version`** → `scripts/bump-version.js` — a ~80-line Node
script that updates all workspace `package.json` versions and
`@sentry-internal/*` cross-references to the exact new version. Modeled
after
[sentry-javascript#19325](getsentry/sentry-javascript#19325).
- **`lerna run build:tarball`** → `turbo run build:tarball` — Turborepo
is already used for all other cross-package tasks.
Lerna was pulling in a large transitive dependency tree including
packages with known vulnerabilities. This removes ~2,300 lines from
`yarn.lock`.
### Dependabot alerts resolved
**Fully resolved** (vulnerable package completely removed from
lockfile):
| Alert | Severity | Package | Summary |
|-------|----------|---------|---------|
| #217 | HIGH | `tar` | Symlink Path Traversal via Drive-Relative
Linkpath |
| #216 | HIGH | `tar` | Hardlink Path Traversal via Drive-Relative
Linkpath |
| #185 | HIGH | `tar` | Arbitrary File Read/Write via Hardlink Target
Escape Through Symlink Chain |
| #176 | HIGH | `tar` | Arbitrary File Creation/Overwrite via Hardlink
Path Traversal |
| #174 | HIGH | `tar` | Race Condition via Unicode Ligature Collisions
on macOS APFS |
| #172 | HIGH | `tar` | Arbitrary File Overwrite and Symlink Poisoning
via Insufficient Path Sanitization |
| #137 | HIGH | `axios` | SSRF and Credential Leakage via Absolute URL |
**Partially resolved** (some vulnerable entries removed, but the package
still exists via other dependency chains):
| Alert | Severity | Package | Remaining source |
|-------|----------|---------|-----------------|
| #213, #208, #207, #205 | HIGH | `minimatch` | `markdownlint-cli`,
`vite-plugin-dts` still pull in vulnerable versions |
| #161 | HIGH | `glob` | `markdownlint-cli`, `web-ext-run` still pull in
vulnerable versions |
| #136, #135 | CRITICAL | `form-data` | `jest` (via jsdom) still pulls
in `form-data@3.0.2` |
| #158, #157 | MEDIUM | `js-yaml` | `@changesets/cli`, `jest` still pull
in `js-yaml@3.14.1` |
The partially resolved alerts will be addressed in later phases (Phase
6: mop up remaining — bumping `markdownlint-cli`, `@changesets/cli`,
`jest`/rrvideo, etc.).
Part of the ongoing effort to resolve all Dependabot alerts on this
repo.
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

20 participants

@billyvg@KentoMoriwaki@eoghanmurray@benjackwhite@mydea@huangkairan@BelenLuo-tech@Juice10@mdellanoce@boehlerlukas@YunFeng0817@pauldambra@Cristy94@daibhin@patlopes@Yuyz0112@avillegasn@andrewpomeroy@xujiujiu@juliecheng
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Force GitHub README to respect dark mode\n(function() {\n var style = document.createElement('style');\n style.textContent = '\n .markdown-body {\n color-scheme: dark light;\n }\n .markdown-body pre { background: #161b22 !important; }\n .markdown-body code { background: rgba(110, 118, 129, 0.4) !important; }\n .markdown-body table th, .markdown-body table td { border-color: #30363d !important; }\n .markdown-body img { background: #0d1117; }\n .markdown-body blockquote { border-left-color: #8b949e; }\n .markdown-body hr { border-color: #30363d; }\n ';\n document.head.appendChild(style);\n})();", "GitHub Dark Mode README Fix"); } } catch(__e) { console.warn('[Userscript:GitHub Dark Mode README Fix]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content

feat: merge upstream commits - #137

Merged
billyvg merged 44 commits into
getsentry:sentry-v2from
rrweb-io:master
Apr 30, 2024
Merged

feat: merge upstream commits#137
billyvg merged 44 commits into
getsentry:sentry-v2from
rrweb-io:master

Conversation

@billyvg

Copy link
Copy Markdown
Member

No description provided.

KentoMoriwakiand others added 30 commits October 6, 2023 10:42
…1311)
* Add config option to turn off all snapshotting and related observers
- allows RRWEB to be used for click/movement tracking alone, e.g. for a heatmaps use case
- could also be used if there was a separate process for recording the DOM (in which case a 3rd party library like https://github.com/antonmedv/finder could be added to record targets instead of the mirror)
---------
Authored-by: eoghanmurray <eoghanmurray@users.noreply.github.com>
Co-authored-by: Justin Halsall <Juice10@users.noreply.github.com>
* Extends maskTextFn to pass the HTMLElement to the deciding function
---------
Authored-by: benjackwhite <benjackwhite@users.noreply.github.com>
Co-authored-by: Justin Halsall <Juice10@users.noreply.github.com>
Co-authored-by: Eoghan Murray <eoghan@getthere.ie>
Co-authored-by: Yun Feng <yun.feng0817@gmail.com>
* export eventWithTime for consumption in typescript code
* Fix linting issues
* Apply formatting changes
Co-authored-by: Justin Halsall <Juice10@users.noreply.github.com>
* only call createHTMLDocument where it is needed
* Perf: create the mutation document once as a 'singleton' as it can be reused
---------
Co-authored-by: Michael Dellanoce <mdellanoce@pendo.io>
…nts (#1155)
* Feat: Add support for replaying :defined pseudo-class of custom elements
* add isCustom flag to serialized elements
Applying Justin's review suggestion
* fix code lint error
* add custom element event
* fix: tests (#1348)
* Update packages/rrweb/src/record/observer.ts
* Update packages/rrweb/src/record/observer.ts
---------
Co-authored-by: Nafees Nehar <nafees87n@gmail.com>
Co-authored-by: Justin Halsall <Juice10@users.noreply.github.com>
… the DOM (#1349)
* masking performance: avoid the repeated calls to `closest` when recursing through the DOM
- needsMask===true means that an ancestor has tested positively for masking, and so this node and all descendents should be masked
- needsMask===false means that no ancestors have tested positively for masking, we should check each node encountered
- needsMask===undefined means that we don't know whether ancestors are masked or not (e.g. after a mutation) and should look up the tree
* Add tests including an explicit characterData mutation tests * Further performance improvement: avoid calls to `el.matches` when on a leaf node, e.g. a `<br/>`
---------
Authored-by: eoghanmurray <eoghan@getthere.ie>
Based on initial PR #1338 by Alexey Babik <alexey.babik@noibu.com>
* Fix serialization and mutation of <textarea> elements taking account the duality that the value can be set in either the child node, or in the value _parameter_ (not attribute)
* Backwards compatibility: Bug fix and regression test for #112
- this is to fix up 'historical' recordings, as duplicate textarea content should no longer be being created at record time
- new test shows what the snapshot generated by previous versions of rrweb used to look like, hence 'bad'
- original 0efe23f fix either didn't work or no longer works due to childNodes being appended subsequent to this part of the code
- during review, we also verified that the `_cssText` case should still be handled okay, as there's currently no scenario where csstext is present with css child nodes of a <style>
* Masking: Fix that textarea values were being missed by the masking system if the value was recorded as a child node
- I didn't notice that form.html was used in other tests, so lucky that I noticed that those tests also should have the 'pre value' masked out
* Simplify by always storing the textarea value in the `.value` attribute (from it's DOM property) and not as a childNode. It should still be rebuilt as a childNode rather than a property
---------
Authored-by: eoghanmurray <eoghan@getthere.ie>
Co-authored-by: Justin Halsall <Juice10@users.noreply.github.com>
Co-authored-by: Yun Feng <yun.feng0817@gmail.com>
* Update Node version to LTS
* Create silver-windows-float.md
* Add UXWizz to Readme (CN)
* Add UXWizz to Readme
* Create hip-worms-relax.md
---------
Co-authored-by: Justin Halsall <Juice10@users.noreply.github.com>
* Add rrweb presentation
Add Justin Halsall open to rrweb consulting
* Create few-rockets-travel.md
* Update README.md
* Update README.md
* Fix alignment
* chore: export canvasMutation
* add changeset
* fix: console logger can serialize bigint values
* teach test jsdom is present
* add a changeset
* Update export-to-video.md
The file was pointing to the old Rrvideo repo The old repository soon is going to be closed as the Rrvideo was merged on Rrweb This change is pointing this recipe to the new and updated official doc.
* Update export-to-video.zh_CN.md
The file was pointing to the old Rrvideo repo The old repository soon is going to be closed as the Rrvideo was merged on Rrweb This change is pointing this recipe to the new and updated official doc.
Chinese version
* run tests without concurrency
* do not use cache in rpt2 during test
* Make properties x and y optional in mouseInteractionParam
The event representing a mouse interaction of focus an element does not include the properties x and y. Thus, they must be defined as optional.
* Fix typings
* feat(Snapshot): Capture stylesheets designated as `rel="preload"`
* fix(Snapshot): Harden asset file extension matching
* Add changeset
* chore: Lint
* Tweak regex, add try-catch block on URL constructor
* fix: scrolling can be incorrect when fast-forwarding
* add test case
* add changeset and remove duplicate diffProps process
---------
Co-authored-by: Yun Feng <yun.feng0817@gmail.com>
eoghanmurrayand others added 14 commits March 26, 2024 16:44
* We weren't recursing into media queries (or @supports etc.) to rewrite hover pseudoclasses
* The early return meant that the stylesWithHoverClass cache wasn't being populated if there were no hover selectors on the stylesheet
- not committing the test, but modifying the existing 'add a hover class to a previously processed css string' as follows shows the problem:
--- a/packages/rrweb-snapshot/test/rebuild.test.ts
+++ b/packages/rrweb-snapshot/test/rebuild.test.ts
@@ -151,6 +185,7 @@ describe('rebuild', function () {
path.resolve(__dirname, './css/benchmark.css'),
'utf8',
);
+ cssText = cssText.replace(/:hover/g, '');
const start = process.hrtime();
addHoverClass(cssText, cache);
* Replace `min-device-width` and similar with `min-width` as the former looks out at the browser viewport whereas we need it to look at the replayer iframe viewport
* Add some tests to show how the hover replacement works against selector lists. I believe these were failing in a previous version of rrweb as I had some local patches that no longer seem to be needed to handle these cases
* Update name of function to reflect that 'addHoverClass' does more than just :hover. I believe this function is only exported for the purposes of use in the tests
* Apply formatting changes
* Create rotten-spies-enjoy.md
* Apply formatting changes
* Add correct typing on `getSelectors`
* Refactor CSS interfaces to include optional rules
* Change `rules` to be non optional
---------
Co-authored-by: eoghanmurray <eoghanmurray@users.noreply.github.com>
Co-authored-by: Justin Halsall <Juice10@users.noreply.github.com>
* Add HowdyGo to Who's using rrweb
* Create twenty-goats-kneel.md
---------
Co-authored-by: Justin Halsall <Juice10@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
* try/catch injection of recording script in rrweb repl and stream
* Add empty changesets
* fix: createImageBitmap throws DOMException if source is 0
* code review
* fix
* Create breezy-cats-heal.md
* fix format
---------
Co-authored-by: Justin Halsall <Juice10@users.noreply.github.com>
* protect against a missing parent node during a mutation on an textNode
…layer (#1408)
Expose constant SKIP_TIME_THRESHOLD as `inactivePeriodThreshold` config setting in replayer
* Add support for capturing media attributes in rrweb-snapshot
* Add loop to mediaInteractionParam
* Add support for loop in RRMediaElement
* Add support for recording loop attribute on media elements
* Update video playback and fix bugs
* Update cross-origin iframe media attributes and player state
* Fix known issues
* Run format
* Fix linting errors
* Add comment in code for source of match logic
* Add changeset
…xt" (#1369)
* Add "types" field to fix error when using "moduleResolution": "NodeNext".
* Add changeset.
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
* better splitting of selectors - overlapping with #1401 * Add test from example at PostHog/posthog#21427
* ignore brackets inside selector strings
* Add another test as noticed that it's possible to escape strings
* Ensure we are ignoring commas within strings
Co-authored-by: Eoghan Murray <eoghan@getthere.ie>
…sion (#1441)
performance: remove a nested function call and an object clone during event emission
- rename `event` to `eventWithoutTime`, but maintain backwards compatibility
- `eventWithTime` (with time) could be renamed to `event` in a future version
This is an extension of PR #1339 authored by: mydea <mydea@users.noreply.github.com>
@billyvgbillyvg closed this Apr 19, 2024
@billyvgbillyvg reopened this Apr 19, 2024
@billyvg
billyvg merged commit 9e7381d into getsentry:sentry-v2Apr 30, 2024
chargome added a commit that referenced this pull request Mar 25, 2026
Remove lerna and replace its two uses with lighter alternatives:
- **`lerna version`** → `scripts/bump-version.js` — a ~80-line Node
script that updates all workspace `package.json` versions and
`@sentry-internal/*` cross-references to the exact new version. Modeled
after
[sentry-javascript#19325](getsentry/sentry-javascript#19325).
- **`lerna run build:tarball`** → `turbo run build:tarball` — Turborepo
is already used for all other cross-package tasks.
Lerna was pulling in a large transitive dependency tree including
packages with known vulnerabilities. This removes ~2,300 lines from
`yarn.lock`.
### Dependabot alerts resolved
**Fully resolved** (vulnerable package completely removed from
lockfile):
| Alert | Severity | Package | Summary |
|-------|----------|---------|---------|
| #217 | HIGH | `tar` | Symlink Path Traversal via Drive-Relative
Linkpath |
| #216 | HIGH | `tar` | Hardlink Path Traversal via Drive-Relative
Linkpath |
| #185 | HIGH | `tar` | Arbitrary File Read/Write via Hardlink Target
Escape Through Symlink Chain |
| #176 | HIGH | `tar` | Arbitrary File Creation/Overwrite via Hardlink
Path Traversal |
| #174 | HIGH | `tar` | Race Condition via Unicode Ligature Collisions
on macOS APFS |
| #172 | HIGH | `tar` | Arbitrary File Overwrite and Symlink Poisoning
via Insufficient Path Sanitization |
| #137 | HIGH | `axios` | SSRF and Credential Leakage via Absolute URL |
**Partially resolved** (some vulnerable entries removed, but the package
still exists via other dependency chains):
| Alert | Severity | Package | Remaining source |
|-------|----------|---------|-----------------|
| #213, #208, #207, #205 | HIGH | `minimatch` | `markdownlint-cli`,
`vite-plugin-dts` still pull in vulnerable versions |
| #161 | HIGH | `glob` | `markdownlint-cli`, `web-ext-run` still pull in
vulnerable versions |
| #136, #135 | CRITICAL | `form-data` | `jest` (via jsdom) still pulls
in `form-data@3.0.2` |
| #158, #157 | MEDIUM | `js-yaml` | `@changesets/cli`, `jest` still pull
in `js-yaml@3.14.1` |
The partially resolved alerts will be addressed in later phases (Phase
6: mop up remaining — bumping `markdownlint-cli`, `@changesets/cli`,
`jest`/rrvideo, etc.).
Part of the ongoing effort to resolve all Dependabot alerts on this
repo.
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

20 participants

@billyvg@KentoMoriwaki@eoghanmurray@benjackwhite@mydea@huangkairan@BelenLuo-tech@Juice10@mdellanoce@boehlerlukas@YunFeng0817@pauldambra@Cristy94@daibhin@patlopes@Yuyz0112@avillegasn@andrewpomeroy@xujiujiu@juliecheng
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Highlight search terms from Google/DuckDuckGo/Bing referrer\n(function() {\n var ref = document.referrer;\n var terms = [];\n \n if (ref.includes('google.com') || ref.includes('duckduckgo.com') || ref.includes('bing.com')) {\n var url = new URL(ref);\n var q = url.searchParams.get('q') || url.searchParams.get('p');\n if (q) {\n terms = q.split(/\\s+/).filter(function(t) { return t.length > 2; });\n }\n }\n \n if (terms.length === 0) return;\n \n var style = document.createElement('style');\n style.textContent = '.userscript-highlight { background: #fbbf24; color: #1a1a2e; padding: 1px 3px; border-radius: 2px; }';\n document.head.appendChild(style);\n \n function highlight(node) {\n if (node.nodeType === 3) { // text node\n var text = node.textContent;\n var found = false;\n terms.forEach(function(term) {\n var regex = new RegExp('(' + term.replace(/[.*+?^${}()|[\\]\\\\]/g, '\\\\') + ')', 'gi');\n if (regex.test(text)) {\n found = true;\n var frag = document.createDocumentFragment();\n var parts = text.split(regex);\n parts.forEach(function(part, i) {\n if (i % 2 === 0) {\n frag.appendChild(document.createTextNode(part));\n } else {\n var span = document.createElement('span');\n span.className = 'userscript-highlight';\n span.textContent = part;\n frag.appendChild(span);\n }\n });\n node.parentNode.replaceChild(frag, node);\n }\n });\n } else if (node.nodeType === 1 && node.childNodes) { // element\n var skipTags = ['SCRIPT', 'STYLE', 'NOSCRIPT', 'TEXTAREA', 'INPUT', 'SELECT'];\n if (!skipTags.includes(node.tagName)) {\n Array.from(node.childNodes).forEach(highlight);\n }\n }\n }\n \n highlight(document.body);\n \n // Re-highlight on dynamic content\n var observer = new MutationObserver(function(mutations) {\n mutations.forEach(function(m) {\n m.addedNodes.forEach(function(node) {\n if (node.nodeType === 1 || node.nodeType === 3) highlight(node);\n });\n });\n });\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "Highlight Search Terms"); } } catch(__e) { console.warn('[Userscript:Highlight Search Terms]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content

feat: merge upstream commits - #137

Merged
billyvg merged 44 commits into
getsentry:sentry-v2from
rrweb-io:master
Apr 30, 2024
Merged

feat: merge upstream commits#137
billyvg merged 44 commits into
getsentry:sentry-v2from
rrweb-io:master

Conversation

@billyvg

Copy link
Copy Markdown
Member

No description provided.

KentoMoriwakiand others added 30 commits October 6, 2023 10:42
…1311)
* Add config option to turn off all snapshotting and related observers
- allows RRWEB to be used for click/movement tracking alone, e.g. for a heatmaps use case
- could also be used if there was a separate process for recording the DOM (in which case a 3rd party library like https://github.com/antonmedv/finder could be added to record targets instead of the mirror)
---------
Authored-by: eoghanmurray <eoghanmurray@users.noreply.github.com>
Co-authored-by: Justin Halsall <Juice10@users.noreply.github.com>
* Extends maskTextFn to pass the HTMLElement to the deciding function
---------
Authored-by: benjackwhite <benjackwhite@users.noreply.github.com>
Co-authored-by: Justin Halsall <Juice10@users.noreply.github.com>
Co-authored-by: Eoghan Murray <eoghan@getthere.ie>
Co-authored-by: Yun Feng <yun.feng0817@gmail.com>
* export eventWithTime for consumption in typescript code
* Fix linting issues
* Apply formatting changes
Co-authored-by: Justin Halsall <Juice10@users.noreply.github.com>
* only call createHTMLDocument where it is needed
* Perf: create the mutation document once as a 'singleton' as it can be reused
---------
Co-authored-by: Michael Dellanoce <mdellanoce@pendo.io>
…nts (#1155)
* Feat: Add support for replaying :defined pseudo-class of custom elements
* add isCustom flag to serialized elements
Applying Justin's review suggestion
* fix code lint error
* add custom element event
* fix: tests (#1348)
* Update packages/rrweb/src/record/observer.ts
* Update packages/rrweb/src/record/observer.ts
---------
Co-authored-by: Nafees Nehar <nafees87n@gmail.com>
Co-authored-by: Justin Halsall <Juice10@users.noreply.github.com>
… the DOM (#1349)
* masking performance: avoid the repeated calls to `closest` when recursing through the DOM
- needsMask===true means that an ancestor has tested positively for masking, and so this node and all descendents should be masked
- needsMask===false means that no ancestors have tested positively for masking, we should check each node encountered
- needsMask===undefined means that we don't know whether ancestors are masked or not (e.g. after a mutation) and should look up the tree
* Add tests including an explicit characterData mutation tests * Further performance improvement: avoid calls to `el.matches` when on a leaf node, e.g. a `<br/>`
---------
Authored-by: eoghanmurray <eoghan@getthere.ie>
Based on initial PR #1338 by Alexey Babik <alexey.babik@noibu.com>
* Fix serialization and mutation of <textarea> elements taking account the duality that the value can be set in either the child node, or in the value _parameter_ (not attribute)
* Backwards compatibility: Bug fix and regression test for #112
- this is to fix up 'historical' recordings, as duplicate textarea content should no longer be being created at record time
- new test shows what the snapshot generated by previous versions of rrweb used to look like, hence 'bad'
- original 0efe23f fix either didn't work or no longer works due to childNodes being appended subsequent to this part of the code
- during review, we also verified that the `_cssText` case should still be handled okay, as there's currently no scenario where csstext is present with css child nodes of a <style>
* Masking: Fix that textarea values were being missed by the masking system if the value was recorded as a child node
- I didn't notice that form.html was used in other tests, so lucky that I noticed that those tests also should have the 'pre value' masked out
* Simplify by always storing the textarea value in the `.value` attribute (from it's DOM property) and not as a childNode. It should still be rebuilt as a childNode rather than a property
---------
Authored-by: eoghanmurray <eoghan@getthere.ie>
Co-authored-by: Justin Halsall <Juice10@users.noreply.github.com>
Co-authored-by: Yun Feng <yun.feng0817@gmail.com>
* Update Node version to LTS
* Create silver-windows-float.md
* Add UXWizz to Readme (CN)
* Add UXWizz to Readme
* Create hip-worms-relax.md
---------
Co-authored-by: Justin Halsall <Juice10@users.noreply.github.com>
* Add rrweb presentation
Add Justin Halsall open to rrweb consulting
* Create few-rockets-travel.md
* Update README.md
* Update README.md
* Fix alignment
* chore: export canvasMutation
* add changeset
* fix: console logger can serialize bigint values
* teach test jsdom is present
* add a changeset
* Update export-to-video.md
The file was pointing to the old Rrvideo repo The old repository soon is going to be closed as the Rrvideo was merged on Rrweb This change is pointing this recipe to the new and updated official doc.
* Update export-to-video.zh_CN.md
The file was pointing to the old Rrvideo repo The old repository soon is going to be closed as the Rrvideo was merged on Rrweb This change is pointing this recipe to the new and updated official doc.
Chinese version
* run tests without concurrency
* do not use cache in rpt2 during test
* Make properties x and y optional in mouseInteractionParam
The event representing a mouse interaction of focus an element does not include the properties x and y. Thus, they must be defined as optional.
* Fix typings
* feat(Snapshot): Capture stylesheets designated as `rel="preload"`
* fix(Snapshot): Harden asset file extension matching
* Add changeset
* chore: Lint
* Tweak regex, add try-catch block on URL constructor
* fix: scrolling can be incorrect when fast-forwarding
* add test case
* add changeset and remove duplicate diffProps process
---------
Co-authored-by: Yun Feng <yun.feng0817@gmail.com>
eoghanmurrayand others added 14 commits March 26, 2024 16:44
* We weren't recursing into media queries (or @supports etc.) to rewrite hover pseudoclasses
* The early return meant that the stylesWithHoverClass cache wasn't being populated if there were no hover selectors on the stylesheet
- not committing the test, but modifying the existing 'add a hover class to a previously processed css string' as follows shows the problem:
--- a/packages/rrweb-snapshot/test/rebuild.test.ts
+++ b/packages/rrweb-snapshot/test/rebuild.test.ts
@@ -151,6 +185,7 @@ describe('rebuild', function () {
path.resolve(__dirname, './css/benchmark.css'),
'utf8',
);
+ cssText = cssText.replace(/:hover/g, '');
const start = process.hrtime();
addHoverClass(cssText, cache);
* Replace `min-device-width` and similar with `min-width` as the former looks out at the browser viewport whereas we need it to look at the replayer iframe viewport
* Add some tests to show how the hover replacement works against selector lists. I believe these were failing in a previous version of rrweb as I had some local patches that no longer seem to be needed to handle these cases
* Update name of function to reflect that 'addHoverClass' does more than just :hover. I believe this function is only exported for the purposes of use in the tests
* Apply formatting changes
* Create rotten-spies-enjoy.md
* Apply formatting changes
* Add correct typing on `getSelectors`
* Refactor CSS interfaces to include optional rules
* Change `rules` to be non optional
---------
Co-authored-by: eoghanmurray <eoghanmurray@users.noreply.github.com>
Co-authored-by: Justin Halsall <Juice10@users.noreply.github.com>
* Add HowdyGo to Who's using rrweb
* Create twenty-goats-kneel.md
---------
Co-authored-by: Justin Halsall <Juice10@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
* try/catch injection of recording script in rrweb repl and stream
* Add empty changesets
* fix: createImageBitmap throws DOMException if source is 0
* code review
* fix
* Create breezy-cats-heal.md
* fix format
---------
Co-authored-by: Justin Halsall <Juice10@users.noreply.github.com>
* protect against a missing parent node during a mutation on an textNode
…layer (#1408)
Expose constant SKIP_TIME_THRESHOLD as `inactivePeriodThreshold` config setting in replayer
* Add support for capturing media attributes in rrweb-snapshot
* Add loop to mediaInteractionParam
* Add support for loop in RRMediaElement
* Add support for recording loop attribute on media elements
* Update video playback and fix bugs
* Update cross-origin iframe media attributes and player state
* Fix known issues
* Run format
* Fix linting errors
* Add comment in code for source of match logic
* Add changeset
…xt" (#1369)
* Add "types" field to fix error when using "moduleResolution": "NodeNext".
* Add changeset.
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
* better splitting of selectors - overlapping with #1401 * Add test from example at PostHog/posthog#21427
* ignore brackets inside selector strings
* Add another test as noticed that it's possible to escape strings
* Ensure we are ignoring commas within strings
Co-authored-by: Eoghan Murray <eoghan@getthere.ie>
…sion (#1441)
performance: remove a nested function call and an object clone during event emission
- rename `event` to `eventWithoutTime`, but maintain backwards compatibility
- `eventWithTime` (with time) could be renamed to `event` in a future version
This is an extension of PR #1339 authored by: mydea <mydea@users.noreply.github.com>
@billyvgbillyvg closed this Apr 19, 2024
@billyvgbillyvg reopened this Apr 19, 2024
@billyvg
billyvg merged commit 9e7381d into getsentry:sentry-v2Apr 30, 2024
chargome added a commit that referenced this pull request Mar 25, 2026
Remove lerna and replace its two uses with lighter alternatives:
- **`lerna version`** → `scripts/bump-version.js` — a ~80-line Node
script that updates all workspace `package.json` versions and
`@sentry-internal/*` cross-references to the exact new version. Modeled
after
[sentry-javascript#19325](getsentry/sentry-javascript#19325).
- **`lerna run build:tarball`** → `turbo run build:tarball` — Turborepo
is already used for all other cross-package tasks.
Lerna was pulling in a large transitive dependency tree including
packages with known vulnerabilities. This removes ~2,300 lines from
`yarn.lock`.
### Dependabot alerts resolved
**Fully resolved** (vulnerable package completely removed from
lockfile):
| Alert | Severity | Package | Summary |
|-------|----------|---------|---------|
| #217 | HIGH | `tar` | Symlink Path Traversal via Drive-Relative
Linkpath |
| #216 | HIGH | `tar` | Hardlink Path Traversal via Drive-Relative
Linkpath |
| #185 | HIGH | `tar` | Arbitrary File Read/Write via Hardlink Target
Escape Through Symlink Chain |
| #176 | HIGH | `tar` | Arbitrary File Creation/Overwrite via Hardlink
Path Traversal |
| #174 | HIGH | `tar` | Race Condition via Unicode Ligature Collisions
on macOS APFS |
| #172 | HIGH | `tar` | Arbitrary File Overwrite and Symlink Poisoning
via Insufficient Path Sanitization |
| #137 | HIGH | `axios` | SSRF and Credential Leakage via Absolute URL |
**Partially resolved** (some vulnerable entries removed, but the package
still exists via other dependency chains):
| Alert | Severity | Package | Remaining source |
|-------|----------|---------|-----------------|
| #213, #208, #207, #205 | HIGH | `minimatch` | `markdownlint-cli`,
`vite-plugin-dts` still pull in vulnerable versions |
| #161 | HIGH | `glob` | `markdownlint-cli`, `web-ext-run` still pull in
vulnerable versions |
| #136, #135 | CRITICAL | `form-data` | `jest` (via jsdom) still pulls
in `form-data@3.0.2` |
| #158, #157 | MEDIUM | `js-yaml` | `@changesets/cli`, `jest` still pull
in `js-yaml@3.14.1` |
The partially resolved alerts will be addressed in later phases (Phase
6: mop up remaining — bumping `markdownlint-cli`, `@changesets/cli`,
`jest`/rrvideo, etc.).
Part of the ongoing effort to resolve all Dependabot alerts on this
repo.
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

20 participants

@billyvg@KentoMoriwaki@eoghanmurray@benjackwhite@mydea@huangkairan@BelenLuo-tech@Juice10@mdellanoce@boehlerlukas@YunFeng0817@pauldambra@Cristy94@daibhin@patlopes@Yuyz0112@avillegasn@andrewpomeroy@xujiujiu@juliecheng
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Strip utm_, fbclid, gclid, etc. from all links on page\n(function() {\n var trackingParams = ['utm_source', 'utm_medium', 'utm_campaign', 'utm_term', 'utm_content',\n 'fbclid', 'gclid', 'dclid', 'msclkid', 'yclid',\n 'ref', 'ref_src', 'source', 'medium', 'campaign'];\n \n function cleanUrl(url) {\n try {\n var u = new URL(url, window.location.origin);\n var changed = false;\n trackingParams.forEach(function(p) {\n if (u.searchParams.has(p)) {\n u.searchParams.delete(p);\n changed = true;\n }\n });\n return changed ? u.toString() : url;\n } catch (e) {\n return url;\n }\n }\n \n function cleanLinks() {\n document.querySelectorAll('a[href]').forEach(function(a) {\n var clean = cleanUrl(a.href);\n if (clean !== a.href) a.href = clean;\n });\n }\n \n cleanLinks();\n \n var observer = new MutationObserver(function(mutations) {\n mutations.forEach(function(m) {\n m.addedNodes.forEach(function(node) {\n if (node.nodeType === 1) {\n if (node.tagName === 'A') cleanLinks();\n node.querySelectorAll('a[href]').forEach(function(a) {\n var clean = cleanUrl(a.href);\n if (clean !== a.href) a.href = clean;\n });\n }\n });\n });\n });\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "Remove Tracking Parameters from Links"); } } catch(__e) { console.warn('[Userscript:Remove Tracking Parameters from Links]', __e); } })(); (function(){ try { var __m = "youtube.com"; var __re = new RegExp('^' + "youtube\\.com" + '
Skip to content

feat: merge upstream commits - #137

Merged
billyvg merged 44 commits into
getsentry:sentry-v2from
rrweb-io:master
Apr 30, 2024
Merged

feat: merge upstream commits#137
billyvg merged 44 commits into
getsentry:sentry-v2from
rrweb-io:master

Conversation

@billyvg

Copy link
Copy Markdown
Member

No description provided.

KentoMoriwakiand others added 30 commits October 6, 2023 10:42
…1311)
* Add config option to turn off all snapshotting and related observers
- allows RRWEB to be used for click/movement tracking alone, e.g. for a heatmaps use case
- could also be used if there was a separate process for recording the DOM (in which case a 3rd party library like https://github.com/antonmedv/finder could be added to record targets instead of the mirror)
---------
Authored-by: eoghanmurray <eoghanmurray@users.noreply.github.com>
Co-authored-by: Justin Halsall <Juice10@users.noreply.github.com>
* Extends maskTextFn to pass the HTMLElement to the deciding function
---------
Authored-by: benjackwhite <benjackwhite@users.noreply.github.com>
Co-authored-by: Justin Halsall <Juice10@users.noreply.github.com>
Co-authored-by: Eoghan Murray <eoghan@getthere.ie>
Co-authored-by: Yun Feng <yun.feng0817@gmail.com>
* export eventWithTime for consumption in typescript code
* Fix linting issues
* Apply formatting changes
Co-authored-by: Justin Halsall <Juice10@users.noreply.github.com>
* only call createHTMLDocument where it is needed
* Perf: create the mutation document once as a 'singleton' as it can be reused
---------
Co-authored-by: Michael Dellanoce <mdellanoce@pendo.io>
…nts (#1155)
* Feat: Add support for replaying :defined pseudo-class of custom elements
* add isCustom flag to serialized elements
Applying Justin's review suggestion
* fix code lint error
* add custom element event
* fix: tests (#1348)
* Update packages/rrweb/src/record/observer.ts
* Update packages/rrweb/src/record/observer.ts
---------
Co-authored-by: Nafees Nehar <nafees87n@gmail.com>
Co-authored-by: Justin Halsall <Juice10@users.noreply.github.com>
… the DOM (#1349)
* masking performance: avoid the repeated calls to `closest` when recursing through the DOM
- needsMask===true means that an ancestor has tested positively for masking, and so this node and all descendents should be masked
- needsMask===false means that no ancestors have tested positively for masking, we should check each node encountered
- needsMask===undefined means that we don't know whether ancestors are masked or not (e.g. after a mutation) and should look up the tree
* Add tests including an explicit characterData mutation tests * Further performance improvement: avoid calls to `el.matches` when on a leaf node, e.g. a `<br/>`
---------
Authored-by: eoghanmurray <eoghan@getthere.ie>
Based on initial PR #1338 by Alexey Babik <alexey.babik@noibu.com>
* Fix serialization and mutation of <textarea> elements taking account the duality that the value can be set in either the child node, or in the value _parameter_ (not attribute)
* Backwards compatibility: Bug fix and regression test for #112
- this is to fix up 'historical' recordings, as duplicate textarea content should no longer be being created at record time
- new test shows what the snapshot generated by previous versions of rrweb used to look like, hence 'bad'
- original 0efe23f fix either didn't work or no longer works due to childNodes being appended subsequent to this part of the code
- during review, we also verified that the `_cssText` case should still be handled okay, as there's currently no scenario where csstext is present with css child nodes of a <style>
* Masking: Fix that textarea values were being missed by the masking system if the value was recorded as a child node
- I didn't notice that form.html was used in other tests, so lucky that I noticed that those tests also should have the 'pre value' masked out
* Simplify by always storing the textarea value in the `.value` attribute (from it's DOM property) and not as a childNode. It should still be rebuilt as a childNode rather than a property
---------
Authored-by: eoghanmurray <eoghan@getthere.ie>
Co-authored-by: Justin Halsall <Juice10@users.noreply.github.com>
Co-authored-by: Yun Feng <yun.feng0817@gmail.com>
* Update Node version to LTS
* Create silver-windows-float.md
* Add UXWizz to Readme (CN)
* Add UXWizz to Readme
* Create hip-worms-relax.md
---------
Co-authored-by: Justin Halsall <Juice10@users.noreply.github.com>
* Add rrweb presentation
Add Justin Halsall open to rrweb consulting
* Create few-rockets-travel.md
* Update README.md
* Update README.md
* Fix alignment
* chore: export canvasMutation
* add changeset
* fix: console logger can serialize bigint values
* teach test jsdom is present
* add a changeset
* Update export-to-video.md
The file was pointing to the old Rrvideo repo The old repository soon is going to be closed as the Rrvideo was merged on Rrweb This change is pointing this recipe to the new and updated official doc.
* Update export-to-video.zh_CN.md
The file was pointing to the old Rrvideo repo The old repository soon is going to be closed as the Rrvideo was merged on Rrweb This change is pointing this recipe to the new and updated official doc.
Chinese version
* run tests without concurrency
* do not use cache in rpt2 during test
* Make properties x and y optional in mouseInteractionParam
The event representing a mouse interaction of focus an element does not include the properties x and y. Thus, they must be defined as optional.
* Fix typings
* feat(Snapshot): Capture stylesheets designated as `rel="preload"`
* fix(Snapshot): Harden asset file extension matching
* Add changeset
* chore: Lint
* Tweak regex, add try-catch block on URL constructor
* fix: scrolling can be incorrect when fast-forwarding
* add test case
* add changeset and remove duplicate diffProps process
---------
Co-authored-by: Yun Feng <yun.feng0817@gmail.com>
eoghanmurrayand others added 14 commits March 26, 2024 16:44
* We weren't recursing into media queries (or @supports etc.) to rewrite hover pseudoclasses
* The early return meant that the stylesWithHoverClass cache wasn't being populated if there were no hover selectors on the stylesheet
- not committing the test, but modifying the existing 'add a hover class to a previously processed css string' as follows shows the problem:
--- a/packages/rrweb-snapshot/test/rebuild.test.ts
+++ b/packages/rrweb-snapshot/test/rebuild.test.ts
@@ -151,6 +185,7 @@ describe('rebuild', function () {
path.resolve(__dirname, './css/benchmark.css'),
'utf8',
);
+ cssText = cssText.replace(/:hover/g, '');
const start = process.hrtime();
addHoverClass(cssText, cache);
* Replace `min-device-width` and similar with `min-width` as the former looks out at the browser viewport whereas we need it to look at the replayer iframe viewport
* Add some tests to show how the hover replacement works against selector lists. I believe these were failing in a previous version of rrweb as I had some local patches that no longer seem to be needed to handle these cases
* Update name of function to reflect that 'addHoverClass' does more than just :hover. I believe this function is only exported for the purposes of use in the tests
* Apply formatting changes
* Create rotten-spies-enjoy.md
* Apply formatting changes
* Add correct typing on `getSelectors`
* Refactor CSS interfaces to include optional rules
* Change `rules` to be non optional
---------
Co-authored-by: eoghanmurray <eoghanmurray@users.noreply.github.com>
Co-authored-by: Justin Halsall <Juice10@users.noreply.github.com>
* Add HowdyGo to Who's using rrweb
* Create twenty-goats-kneel.md
---------
Co-authored-by: Justin Halsall <Juice10@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
* try/catch injection of recording script in rrweb repl and stream
* Add empty changesets
* fix: createImageBitmap throws DOMException if source is 0
* code review
* fix
* Create breezy-cats-heal.md
* fix format
---------
Co-authored-by: Justin Halsall <Juice10@users.noreply.github.com>
* protect against a missing parent node during a mutation on an textNode
…layer (#1408)
Expose constant SKIP_TIME_THRESHOLD as `inactivePeriodThreshold` config setting in replayer
* Add support for capturing media attributes in rrweb-snapshot
* Add loop to mediaInteractionParam
* Add support for loop in RRMediaElement
* Add support for recording loop attribute on media elements
* Update video playback and fix bugs
* Update cross-origin iframe media attributes and player state
* Fix known issues
* Run format
* Fix linting errors
* Add comment in code for source of match logic
* Add changeset
…xt" (#1369)
* Add "types" field to fix error when using "moduleResolution": "NodeNext".
* Add changeset.
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
* better splitting of selectors - overlapping with #1401 * Add test from example at PostHog/posthog#21427
* ignore brackets inside selector strings
* Add another test as noticed that it's possible to escape strings
* Ensure we are ignoring commas within strings
Co-authored-by: Eoghan Murray <eoghan@getthere.ie>
…sion (#1441)
performance: remove a nested function call and an object clone during event emission
- rename `event` to `eventWithoutTime`, but maintain backwards compatibility
- `eventWithTime` (with time) could be renamed to `event` in a future version
This is an extension of PR #1339 authored by: mydea <mydea@users.noreply.github.com>
@billyvgbillyvg closed this Apr 19, 2024
@billyvgbillyvg reopened this Apr 19, 2024
@billyvg
billyvg merged commit 9e7381d into getsentry:sentry-v2Apr 30, 2024
chargome added a commit that referenced this pull request Mar 25, 2026
Remove lerna and replace its two uses with lighter alternatives:
- **`lerna version`** → `scripts/bump-version.js` — a ~80-line Node
script that updates all workspace `package.json` versions and
`@sentry-internal/*` cross-references to the exact new version. Modeled
after
[sentry-javascript#19325](getsentry/sentry-javascript#19325).
- **`lerna run build:tarball`** → `turbo run build:tarball` — Turborepo
is already used for all other cross-package tasks.
Lerna was pulling in a large transitive dependency tree including
packages with known vulnerabilities. This removes ~2,300 lines from
`yarn.lock`.
### Dependabot alerts resolved
**Fully resolved** (vulnerable package completely removed from
lockfile):
| Alert | Severity | Package | Summary |
|-------|----------|---------|---------|
| #217 | HIGH | `tar` | Symlink Path Traversal via Drive-Relative
Linkpath |
| #216 | HIGH | `tar` | Hardlink Path Traversal via Drive-Relative
Linkpath |
| #185 | HIGH | `tar` | Arbitrary File Read/Write via Hardlink Target
Escape Through Symlink Chain |
| #176 | HIGH | `tar` | Arbitrary File Creation/Overwrite via Hardlink
Path Traversal |
| #174 | HIGH | `tar` | Race Condition via Unicode Ligature Collisions
on macOS APFS |
| #172 | HIGH | `tar` | Arbitrary File Overwrite and Symlink Poisoning
via Insufficient Path Sanitization |
| #137 | HIGH | `axios` | SSRF and Credential Leakage via Absolute URL |
**Partially resolved** (some vulnerable entries removed, but the package
still exists via other dependency chains):
| Alert | Severity | Package | Remaining source |
|-------|----------|---------|-----------------|
| #213, #208, #207, #205 | HIGH | `minimatch` | `markdownlint-cli`,
`vite-plugin-dts` still pull in vulnerable versions |
| #161 | HIGH | `glob` | `markdownlint-cli`, `web-ext-run` still pull in
vulnerable versions |
| #136, #135 | CRITICAL | `form-data` | `jest` (via jsdom) still pulls
in `form-data@3.0.2` |
| #158, #157 | MEDIUM | `js-yaml` | `@changesets/cli`, `jest` still pull
in `js-yaml@3.14.1` |
The partially resolved alerts will be addressed in later phases (Phase
6: mop up remaining — bumping `markdownlint-cli`, `@changesets/cli`,
`jest`/rrvideo, etc.).
Part of the ongoing effort to resolve all Dependabot alerts on this
repo.
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

20 participants

@billyvg@KentoMoriwaki@eoghanmurray@benjackwhite@mydea@huangkairan@BelenLuo-tech@Juice10@mdellanoce@boehlerlukas@YunFeng0817@pauldambra@Cristy94@daibhin@patlopes@Yuyz0112@avillegasn@andrewpomeroy@xujiujiu@juliecheng
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Auto-enable theater mode on YouTube\n(function() {\n function tryTheater() {\n var btn = document.querySelector('button[aria-label=\"Theater mode\"], ytd-player #player button[title=\"Theater mode\"]');\n if (btn && !btn.classList.contains('activated')) {\n btn.click();\n }\n }\n \n // Try immediately\n tryTheater();\n \n // Try after navigation (SPA)\n var lastUrl = location.href;\n setInterval(function() {\n if (location.href !== lastUrl) {\n lastUrl = location.href;\n setTimeout(tryTheater, 500);\n }\n }, 1000);\n \n // Also try on player load\n var observer = new MutationObserver(tryTheater);\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "YouTube Theater Mode Default"); } } catch(__e) { console.warn('[Userscript:YouTube Theater Mode Default]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content

feat: merge upstream commits - #137

Merged
billyvg merged 44 commits into
getsentry:sentry-v2from
rrweb-io:master
Apr 30, 2024
Merged

feat: merge upstream commits#137
billyvg merged 44 commits into
getsentry:sentry-v2from
rrweb-io:master

Conversation

@billyvg

Copy link
Copy Markdown
Member

No description provided.

KentoMoriwakiand others added 30 commits October 6, 2023 10:42
…1311)
* Add config option to turn off all snapshotting and related observers
- allows RRWEB to be used for click/movement tracking alone, e.g. for a heatmaps use case
- could also be used if there was a separate process for recording the DOM (in which case a 3rd party library like https://github.com/antonmedv/finder could be added to record targets instead of the mirror)
---------
Authored-by: eoghanmurray <eoghanmurray@users.noreply.github.com>
Co-authored-by: Justin Halsall <Juice10@users.noreply.github.com>
* Extends maskTextFn to pass the HTMLElement to the deciding function
---------
Authored-by: benjackwhite <benjackwhite@users.noreply.github.com>
Co-authored-by: Justin Halsall <Juice10@users.noreply.github.com>
Co-authored-by: Eoghan Murray <eoghan@getthere.ie>
Co-authored-by: Yun Feng <yun.feng0817@gmail.com>
* export eventWithTime for consumption in typescript code
* Fix linting issues
* Apply formatting changes
Co-authored-by: Justin Halsall <Juice10@users.noreply.github.com>
* only call createHTMLDocument where it is needed
* Perf: create the mutation document once as a 'singleton' as it can be reused
---------
Co-authored-by: Michael Dellanoce <mdellanoce@pendo.io>
…nts (#1155)
* Feat: Add support for replaying :defined pseudo-class of custom elements
* add isCustom flag to serialized elements
Applying Justin's review suggestion
* fix code lint error
* add custom element event
* fix: tests (#1348)
* Update packages/rrweb/src/record/observer.ts
* Update packages/rrweb/src/record/observer.ts
---------
Co-authored-by: Nafees Nehar <nafees87n@gmail.com>
Co-authored-by: Justin Halsall <Juice10@users.noreply.github.com>
… the DOM (#1349)
* masking performance: avoid the repeated calls to `closest` when recursing through the DOM
- needsMask===true means that an ancestor has tested positively for masking, and so this node and all descendents should be masked
- needsMask===false means that no ancestors have tested positively for masking, we should check each node encountered
- needsMask===undefined means that we don't know whether ancestors are masked or not (e.g. after a mutation) and should look up the tree
* Add tests including an explicit characterData mutation tests * Further performance improvement: avoid calls to `el.matches` when on a leaf node, e.g. a `<br/>`
---------
Authored-by: eoghanmurray <eoghan@getthere.ie>
Based on initial PR #1338 by Alexey Babik <alexey.babik@noibu.com>
* Fix serialization and mutation of <textarea> elements taking account the duality that the value can be set in either the child node, or in the value _parameter_ (not attribute)
* Backwards compatibility: Bug fix and regression test for #112
- this is to fix up 'historical' recordings, as duplicate textarea content should no longer be being created at record time
- new test shows what the snapshot generated by previous versions of rrweb used to look like, hence 'bad'
- original 0efe23f fix either didn't work or no longer works due to childNodes being appended subsequent to this part of the code
- during review, we also verified that the `_cssText` case should still be handled okay, as there's currently no scenario where csstext is present with css child nodes of a <style>
* Masking: Fix that textarea values were being missed by the masking system if the value was recorded as a child node
- I didn't notice that form.html was used in other tests, so lucky that I noticed that those tests also should have the 'pre value' masked out
* Simplify by always storing the textarea value in the `.value` attribute (from it's DOM property) and not as a childNode. It should still be rebuilt as a childNode rather than a property
---------
Authored-by: eoghanmurray <eoghan@getthere.ie>
Co-authored-by: Justin Halsall <Juice10@users.noreply.github.com>
Co-authored-by: Yun Feng <yun.feng0817@gmail.com>
* Update Node version to LTS
* Create silver-windows-float.md
* Add UXWizz to Readme (CN)
* Add UXWizz to Readme
* Create hip-worms-relax.md
---------
Co-authored-by: Justin Halsall <Juice10@users.noreply.github.com>
* Add rrweb presentation
Add Justin Halsall open to rrweb consulting
* Create few-rockets-travel.md
* Update README.md
* Update README.md
* Fix alignment
* chore: export canvasMutation
* add changeset
* fix: console logger can serialize bigint values
* teach test jsdom is present
* add a changeset
* Update export-to-video.md
The file was pointing to the old Rrvideo repo The old repository soon is going to be closed as the Rrvideo was merged on Rrweb This change is pointing this recipe to the new and updated official doc.
* Update export-to-video.zh_CN.md
The file was pointing to the old Rrvideo repo The old repository soon is going to be closed as the Rrvideo was merged on Rrweb This change is pointing this recipe to the new and updated official doc.
Chinese version
* run tests without concurrency
* do not use cache in rpt2 during test
* Make properties x and y optional in mouseInteractionParam
The event representing a mouse interaction of focus an element does not include the properties x and y. Thus, they must be defined as optional.
* Fix typings
* feat(Snapshot): Capture stylesheets designated as `rel="preload"`
* fix(Snapshot): Harden asset file extension matching
* Add changeset
* chore: Lint
* Tweak regex, add try-catch block on URL constructor
* fix: scrolling can be incorrect when fast-forwarding
* add test case
* add changeset and remove duplicate diffProps process
---------
Co-authored-by: Yun Feng <yun.feng0817@gmail.com>
eoghanmurrayand others added 14 commits March 26, 2024 16:44
* We weren't recursing into media queries (or @supports etc.) to rewrite hover pseudoclasses
* The early return meant that the stylesWithHoverClass cache wasn't being populated if there were no hover selectors on the stylesheet
- not committing the test, but modifying the existing 'add a hover class to a previously processed css string' as follows shows the problem:
--- a/packages/rrweb-snapshot/test/rebuild.test.ts
+++ b/packages/rrweb-snapshot/test/rebuild.test.ts
@@ -151,6 +185,7 @@ describe('rebuild', function () {
path.resolve(__dirname, './css/benchmark.css'),
'utf8',
);
+ cssText = cssText.replace(/:hover/g, '');
const start = process.hrtime();
addHoverClass(cssText, cache);
* Replace `min-device-width` and similar with `min-width` as the former looks out at the browser viewport whereas we need it to look at the replayer iframe viewport
* Add some tests to show how the hover replacement works against selector lists. I believe these were failing in a previous version of rrweb as I had some local patches that no longer seem to be needed to handle these cases
* Update name of function to reflect that 'addHoverClass' does more than just :hover. I believe this function is only exported for the purposes of use in the tests
* Apply formatting changes
* Create rotten-spies-enjoy.md
* Apply formatting changes
* Add correct typing on `getSelectors`
* Refactor CSS interfaces to include optional rules
* Change `rules` to be non optional
---------
Co-authored-by: eoghanmurray <eoghanmurray@users.noreply.github.com>
Co-authored-by: Justin Halsall <Juice10@users.noreply.github.com>
* Add HowdyGo to Who's using rrweb
* Create twenty-goats-kneel.md
---------
Co-authored-by: Justin Halsall <Juice10@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
* try/catch injection of recording script in rrweb repl and stream
* Add empty changesets
* fix: createImageBitmap throws DOMException if source is 0
* code review
* fix
* Create breezy-cats-heal.md
* fix format
---------
Co-authored-by: Justin Halsall <Juice10@users.noreply.github.com>
* protect against a missing parent node during a mutation on an textNode
…layer (#1408)
Expose constant SKIP_TIME_THRESHOLD as `inactivePeriodThreshold` config setting in replayer
* Add support for capturing media attributes in rrweb-snapshot
* Add loop to mediaInteractionParam
* Add support for loop in RRMediaElement
* Add support for recording loop attribute on media elements
* Update video playback and fix bugs
* Update cross-origin iframe media attributes and player state
* Fix known issues
* Run format
* Fix linting errors
* Add comment in code for source of match logic
* Add changeset
…xt" (#1369)
* Add "types" field to fix error when using "moduleResolution": "NodeNext".
* Add changeset.
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
* better splitting of selectors - overlapping with #1401 * Add test from example at PostHog/posthog#21427
* ignore brackets inside selector strings
* Add another test as noticed that it's possible to escape strings
* Ensure we are ignoring commas within strings
Co-authored-by: Eoghan Murray <eoghan@getthere.ie>
…sion (#1441)
performance: remove a nested function call and an object clone during event emission
- rename `event` to `eventWithoutTime`, but maintain backwards compatibility
- `eventWithTime` (with time) could be renamed to `event` in a future version
This is an extension of PR #1339 authored by: mydea <mydea@users.noreply.github.com>
@billyvgbillyvg closed this Apr 19, 2024
@billyvgbillyvg reopened this Apr 19, 2024
@billyvg
billyvg merged commit 9e7381d into getsentry:sentry-v2Apr 30, 2024
chargome added a commit that referenced this pull request Mar 25, 2026
Remove lerna and replace its two uses with lighter alternatives:
- **`lerna version`** → `scripts/bump-version.js` — a ~80-line Node
script that updates all workspace `package.json` versions and
`@sentry-internal/*` cross-references to the exact new version. Modeled
after
[sentry-javascript#19325](getsentry/sentry-javascript#19325).
- **`lerna run build:tarball`** → `turbo run build:tarball` — Turborepo
is already used for all other cross-package tasks.
Lerna was pulling in a large transitive dependency tree including
packages with known vulnerabilities. This removes ~2,300 lines from
`yarn.lock`.
### Dependabot alerts resolved
**Fully resolved** (vulnerable package completely removed from
lockfile):
| Alert | Severity | Package | Summary |
|-------|----------|---------|---------|
| #217 | HIGH | `tar` | Symlink Path Traversal via Drive-Relative
Linkpath |
| #216 | HIGH | `tar` | Hardlink Path Traversal via Drive-Relative
Linkpath |
| #185 | HIGH | `tar` | Arbitrary File Read/Write via Hardlink Target
Escape Through Symlink Chain |
| #176 | HIGH | `tar` | Arbitrary File Creation/Overwrite via Hardlink
Path Traversal |
| #174 | HIGH | `tar` | Race Condition via Unicode Ligature Collisions
on macOS APFS |
| #172 | HIGH | `tar` | Arbitrary File Overwrite and Symlink Poisoning
via Insufficient Path Sanitization |
| #137 | HIGH | `axios` | SSRF and Credential Leakage via Absolute URL |
**Partially resolved** (some vulnerable entries removed, but the package
still exists via other dependency chains):
| Alert | Severity | Package | Remaining source |
|-------|----------|---------|-----------------|
| #213, #208, #207, #205 | HIGH | `minimatch` | `markdownlint-cli`,
`vite-plugin-dts` still pull in vulnerable versions |
| #161 | HIGH | `glob` | `markdownlint-cli`, `web-ext-run` still pull in
vulnerable versions |
| #136, #135 | CRITICAL | `form-data` | `jest` (via jsdom) still pulls
in `form-data@3.0.2` |
| #158, #157 | MEDIUM | `js-yaml` | `@changesets/cli`, `jest` still pull
in `js-yaml@3.14.1` |
The partially resolved alerts will be addressed in later phases (Phase
6: mop up remaining — bumping `markdownlint-cli`, `@changesets/cli`,
`jest`/rrvideo, etc.).
Part of the ongoing effort to resolve all Dependabot alerts on this
repo.
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

20 participants

@billyvg@KentoMoriwaki@eoghanmurray@benjackwhite@mydea@huangkairan@BelenLuo-tech@Juice10@mdellanoce@boehlerlukas@YunFeng0817@pauldambra@Cristy94@daibhin@patlopes@Yuyz0112@avillegasn@andrewpomeroy@xujiujiu@juliecheng
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Remove or un-stick sticky/fixed headers that block content\n(function() {\n function unstick() {\n document.querySelectorAll('header, nav, [role=\"banner\"], .header, .navbar, .sticky, .fixed-top, [style*=\"position: fixed\"], [style*=\"position:sticky\"]').forEach(function(el) {\n if (el.style.position === 'fixed' || el.style.position === 'sticky' || \n getComputedStyle(el).position === 'fixed' || getComputedStyle(el).position === 'sticky') {\n el.style.position = 'static';\n el.style.top = 'auto';\n el.style.zIndex = 'auto';\n }\n });\n }\n \n unstick();\n \n var observer = new MutationObserver(unstick);\n observer.observe(document.body, { childList: true, subtree: true, attributes: true, attributeFilter: ['style', 'class'] });\n})();", "Kill Sticky Headers"); } } catch(__e) { console.warn('[Userscript:Kill Sticky Headers]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content

feat: merge upstream commits - #137

Merged
billyvg merged 44 commits into
getsentry:sentry-v2from
rrweb-io:master
Apr 30, 2024
Merged

feat: merge upstream commits#137
billyvg merged 44 commits into
getsentry:sentry-v2from
rrweb-io:master

Conversation

@billyvg

Copy link
Copy Markdown
Member

No description provided.

KentoMoriwakiand others added 30 commits October 6, 2023 10:42
…1311)
* Add config option to turn off all snapshotting and related observers
- allows RRWEB to be used for click/movement tracking alone, e.g. for a heatmaps use case
- could also be used if there was a separate process for recording the DOM (in which case a 3rd party library like https://github.com/antonmedv/finder could be added to record targets instead of the mirror)
---------
Authored-by: eoghanmurray <eoghanmurray@users.noreply.github.com>
Co-authored-by: Justin Halsall <Juice10@users.noreply.github.com>
* Extends maskTextFn to pass the HTMLElement to the deciding function
---------
Authored-by: benjackwhite <benjackwhite@users.noreply.github.com>
Co-authored-by: Justin Halsall <Juice10@users.noreply.github.com>
Co-authored-by: Eoghan Murray <eoghan@getthere.ie>
Co-authored-by: Yun Feng <yun.feng0817@gmail.com>
* export eventWithTime for consumption in typescript code
* Fix linting issues
* Apply formatting changes
Co-authored-by: Justin Halsall <Juice10@users.noreply.github.com>
* only call createHTMLDocument where it is needed
* Perf: create the mutation document once as a 'singleton' as it can be reused
---------
Co-authored-by: Michael Dellanoce <mdellanoce@pendo.io>
…nts (#1155)
* Feat: Add support for replaying :defined pseudo-class of custom elements
* add isCustom flag to serialized elements
Applying Justin's review suggestion
* fix code lint error
* add custom element event
* fix: tests (#1348)
* Update packages/rrweb/src/record/observer.ts
* Update packages/rrweb/src/record/observer.ts
---------
Co-authored-by: Nafees Nehar <nafees87n@gmail.com>
Co-authored-by: Justin Halsall <Juice10@users.noreply.github.com>
… the DOM (#1349)
* masking performance: avoid the repeated calls to `closest` when recursing through the DOM
- needsMask===true means that an ancestor has tested positively for masking, and so this node and all descendents should be masked
- needsMask===false means that no ancestors have tested positively for masking, we should check each node encountered
- needsMask===undefined means that we don't know whether ancestors are masked or not (e.g. after a mutation) and should look up the tree
* Add tests including an explicit characterData mutation tests * Further performance improvement: avoid calls to `el.matches` when on a leaf node, e.g. a `<br/>`
---------
Authored-by: eoghanmurray <eoghan@getthere.ie>
Based on initial PR #1338 by Alexey Babik <alexey.babik@noibu.com>
* Fix serialization and mutation of <textarea> elements taking account the duality that the value can be set in either the child node, or in the value _parameter_ (not attribute)
* Backwards compatibility: Bug fix and regression test for #112
- this is to fix up 'historical' recordings, as duplicate textarea content should no longer be being created at record time
- new test shows what the snapshot generated by previous versions of rrweb used to look like, hence 'bad'
- original 0efe23f fix either didn't work or no longer works due to childNodes being appended subsequent to this part of the code
- during review, we also verified that the `_cssText` case should still be handled okay, as there's currently no scenario where csstext is present with css child nodes of a <style>
* Masking: Fix that textarea values were being missed by the masking system if the value was recorded as a child node
- I didn't notice that form.html was used in other tests, so lucky that I noticed that those tests also should have the 'pre value' masked out
* Simplify by always storing the textarea value in the `.value` attribute (from it's DOM property) and not as a childNode. It should still be rebuilt as a childNode rather than a property
---------
Authored-by: eoghanmurray <eoghan@getthere.ie>
Co-authored-by: Justin Halsall <Juice10@users.noreply.github.com>
Co-authored-by: Yun Feng <yun.feng0817@gmail.com>
* Update Node version to LTS
* Create silver-windows-float.md
* Add UXWizz to Readme (CN)
* Add UXWizz to Readme
* Create hip-worms-relax.md
---------
Co-authored-by: Justin Halsall <Juice10@users.noreply.github.com>
* Add rrweb presentation
Add Justin Halsall open to rrweb consulting
* Create few-rockets-travel.md
* Update README.md
* Update README.md
* Fix alignment
* chore: export canvasMutation
* add changeset
* fix: console logger can serialize bigint values
* teach test jsdom is present
* add a changeset
* Update export-to-video.md
The file was pointing to the old Rrvideo repo The old repository soon is going to be closed as the Rrvideo was merged on Rrweb This change is pointing this recipe to the new and updated official doc.
* Update export-to-video.zh_CN.md
The file was pointing to the old Rrvideo repo The old repository soon is going to be closed as the Rrvideo was merged on Rrweb This change is pointing this recipe to the new and updated official doc.
Chinese version
* run tests without concurrency
* do not use cache in rpt2 during test
* Make properties x and y optional in mouseInteractionParam
The event representing a mouse interaction of focus an element does not include the properties x and y. Thus, they must be defined as optional.
* Fix typings
* feat(Snapshot): Capture stylesheets designated as `rel="preload"`
* fix(Snapshot): Harden asset file extension matching
* Add changeset
* chore: Lint
* Tweak regex, add try-catch block on URL constructor
* fix: scrolling can be incorrect when fast-forwarding
* add test case
* add changeset and remove duplicate diffProps process
---------
Co-authored-by: Yun Feng <yun.feng0817@gmail.com>
eoghanmurrayand others added 14 commits March 26, 2024 16:44
* We weren't recursing into media queries (or @supports etc.) to rewrite hover pseudoclasses
* The early return meant that the stylesWithHoverClass cache wasn't being populated if there were no hover selectors on the stylesheet
- not committing the test, but modifying the existing 'add a hover class to a previously processed css string' as follows shows the problem:
--- a/packages/rrweb-snapshot/test/rebuild.test.ts
+++ b/packages/rrweb-snapshot/test/rebuild.test.ts
@@ -151,6 +185,7 @@ describe('rebuild', function () {
path.resolve(__dirname, './css/benchmark.css'),
'utf8',
);
+ cssText = cssText.replace(/:hover/g, '');
const start = process.hrtime();
addHoverClass(cssText, cache);
* Replace `min-device-width` and similar with `min-width` as the former looks out at the browser viewport whereas we need it to look at the replayer iframe viewport
* Add some tests to show how the hover replacement works against selector lists. I believe these were failing in a previous version of rrweb as I had some local patches that no longer seem to be needed to handle these cases
* Update name of function to reflect that 'addHoverClass' does more than just :hover. I believe this function is only exported for the purposes of use in the tests
* Apply formatting changes
* Create rotten-spies-enjoy.md
* Apply formatting changes
* Add correct typing on `getSelectors`
* Refactor CSS interfaces to include optional rules
* Change `rules` to be non optional
---------
Co-authored-by: eoghanmurray <eoghanmurray@users.noreply.github.com>
Co-authored-by: Justin Halsall <Juice10@users.noreply.github.com>
* Add HowdyGo to Who's using rrweb
* Create twenty-goats-kneel.md
---------
Co-authored-by: Justin Halsall <Juice10@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
* try/catch injection of recording script in rrweb repl and stream
* Add empty changesets
* fix: createImageBitmap throws DOMException if source is 0
* code review
* fix
* Create breezy-cats-heal.md
* fix format
---------
Co-authored-by: Justin Halsall <Juice10@users.noreply.github.com>
* protect against a missing parent node during a mutation on an textNode
…layer (#1408)
Expose constant SKIP_TIME_THRESHOLD as `inactivePeriodThreshold` config setting in replayer
* Add support for capturing media attributes in rrweb-snapshot
* Add loop to mediaInteractionParam
* Add support for loop in RRMediaElement
* Add support for recording loop attribute on media elements
* Update video playback and fix bugs
* Update cross-origin iframe media attributes and player state
* Fix known issues
* Run format
* Fix linting errors
* Add comment in code for source of match logic
* Add changeset
…xt" (#1369)
* Add "types" field to fix error when using "moduleResolution": "NodeNext".
* Add changeset.
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
* better splitting of selectors - overlapping with #1401 * Add test from example at PostHog/posthog#21427
* ignore brackets inside selector strings
* Add another test as noticed that it's possible to escape strings
* Ensure we are ignoring commas within strings
Co-authored-by: Eoghan Murray <eoghan@getthere.ie>
…sion (#1441)
performance: remove a nested function call and an object clone during event emission
- rename `event` to `eventWithoutTime`, but maintain backwards compatibility
- `eventWithTime` (with time) could be renamed to `event` in a future version
This is an extension of PR #1339 authored by: mydea <mydea@users.noreply.github.com>
@billyvgbillyvg closed this Apr 19, 2024
@billyvgbillyvg reopened this Apr 19, 2024
@billyvg
billyvg merged commit 9e7381d into getsentry:sentry-v2Apr 30, 2024
chargome added a commit that referenced this pull request Mar 25, 2026
Remove lerna and replace its two uses with lighter alternatives:
- **`lerna version`** → `scripts/bump-version.js` — a ~80-line Node
script that updates all workspace `package.json` versions and
`@sentry-internal/*` cross-references to the exact new version. Modeled
after
[sentry-javascript#19325](getsentry/sentry-javascript#19325).
- **`lerna run build:tarball`** → `turbo run build:tarball` — Turborepo
is already used for all other cross-package tasks.
Lerna was pulling in a large transitive dependency tree including
packages with known vulnerabilities. This removes ~2,300 lines from
`yarn.lock`.
### Dependabot alerts resolved
**Fully resolved** (vulnerable package completely removed from
lockfile):
| Alert | Severity | Package | Summary |
|-------|----------|---------|---------|
| #217 | HIGH | `tar` | Symlink Path Traversal via Drive-Relative
Linkpath |
| #216 | HIGH | `tar` | Hardlink Path Traversal via Drive-Relative
Linkpath |
| #185 | HIGH | `tar` | Arbitrary File Read/Write via Hardlink Target
Escape Through Symlink Chain |
| #176 | HIGH | `tar` | Arbitrary File Creation/Overwrite via Hardlink
Path Traversal |
| #174 | HIGH | `tar` | Race Condition via Unicode Ligature Collisions
on macOS APFS |
| #172 | HIGH | `tar` | Arbitrary File Overwrite and Symlink Poisoning
via Insufficient Path Sanitization |
| #137 | HIGH | `axios` | SSRF and Credential Leakage via Absolute URL |
**Partially resolved** (some vulnerable entries removed, but the package
still exists via other dependency chains):
| Alert | Severity | Package | Remaining source |
|-------|----------|---------|-----------------|
| #213, #208, #207, #205 | HIGH | `minimatch` | `markdownlint-cli`,
`vite-plugin-dts` still pull in vulnerable versions |
| #161 | HIGH | `glob` | `markdownlint-cli`, `web-ext-run` still pull in
vulnerable versions |
| #136, #135 | CRITICAL | `form-data` | `jest` (via jsdom) still pulls
in `form-data@3.0.2` |
| #158, #157 | MEDIUM | `js-yaml` | `@changesets/cli`, `jest` still pull
in `js-yaml@3.14.1` |
The partially resolved alerts will be addressed in later phases (Phase
6: mop up remaining — bumping `markdownlint-cli`, `@changesets/cli`,
`jest`/rrvideo, etc.).
Part of the ongoing effort to resolve all Dependabot alerts on this
repo.
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

20 participants

@billyvg@KentoMoriwaki@eoghanmurray@benjackwhite@mydea@huangkairan@BelenLuo-tech@Juice10@mdellanoce@boehlerlukas@YunFeng0817@pauldambra@Cristy94@daibhin@patlopes@Yuyz0112@avillegasn@andrewpomeroy@xujiujiu@juliecheng
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Universal Dark Mode - works on any site\n(function() {\n var enabled = true;\n \n function applyDarkMode() {\n if (!enabled) return;\n \n // Create style element if it doesn't exist\n var style = document.getElementById('universal-dark-mode-style');\n if (!style) {\n style = document.createElement('style');\n style.id = 'universal-dark-mode-style';\n document.head.appendChild(style);\n }\n \n // Dark mode CSS - inverts colors but preserves images/video\n style.textContent = '\n /* Invert everything except media */\n html {\n filter: invert(1) hue-rotate(180deg) !important;\n background: #1a1a2e !important;\n }\n \n /* Restore images, videos, iframes, canvas */\n img, video, iframe, canvas, svg, picture, [style*=\"background-image\"] {\n filter: invert(1) hue-rotate(180deg) !important;\n }\n \n /* Preserve specific elements that should not be inverted */\n .no-dark-mode, .no-dark-mode *,\n [data-theme=\"light\"], [data-theme=\"light\"],\n .ace_editor, .ace_editor *,\n .CodeMirror, .CodeMirror *,\n .monaco-editor, .monaco-editor *,\n .markdown-body pre, .markdown-body pre *,\n .highlight, .highlight *,\n pre code, pre code * {\n filter: none !important;\n }\n \n /* Fix common UI elements */\n .modal, .popup, .dropdown-menu, .tooltip, .popover {\n filter: invert(1) hue-rotate(180deg) !important;\n background: #2d2d44 !important;\n border-color: #444 !important;\n }\n \n /* Scrollbars */\n ::-webkit-scrollbar { background: #1a1a2e !important; }\n ::-webkit-scrollbar-thumb { background: #444 !important; }\n ::-webkit-scrollbar-thumb:hover { background: #555 !important; }\n \n /* Selection */\n ::selection { background: #4ecdc4 !important; color: #1a1a2e !important; }\n ::-moz-selection { background: #4ecdc4 !important; color: #1a1a2e !important; }\n ';\n }\n \n function removeDarkMode() {\n var style = document.getElementById('universal-dark-mode-style');\n if (style) style.remove();\n }\n \n // Toggle with Alt+Shift+D\n document.addEventListener('keydown', function(e) {\n if (e.altKey && e.shiftKey && e.key === 'D') {\n e.preventDefault();\n enabled = !enabled;\n if (enabled) {\n applyDarkMode();\n console.log('[Universal Dark Mode] Enabled');\n } else {\n removeDarkMode();\n console.log('[Universal Dark Mode] Disabled');\n }\n }\n });\n \n // Apply on load\n applyDarkMode();\n \n // Re-apply on dynamic content\n var observer = new MutationObserver(function(mutations) {\n if (enabled && !document.getElementById('universal-dark-mode-style')) {\n applyDarkMode();\n }\n });\n observer.observe(document.head, { childList: true });\n \n console.log('[Universal Dark Mode] Loaded - Press Alt+Shift+D to toggle');\n})();", "Universal Dark Mode"); } } catch(__e) { console.warn('[Userscript:Universal Dark Mode]', __e); } })(); })();
Skip to content

feat: merge upstream commits - #137

Merged
billyvg merged 44 commits into
getsentry:sentry-v2from
rrweb-io:master
Apr 30, 2024
Merged

feat: merge upstream commits#137
billyvg merged 44 commits into
getsentry:sentry-v2from
rrweb-io:master

Conversation

@billyvg

Copy link
Copy Markdown
Member

No description provided.

KentoMoriwakiand others added 30 commits October 6, 2023 10:42
…1311)
* Add config option to turn off all snapshotting and related observers
- allows RRWEB to be used for click/movement tracking alone, e.g. for a heatmaps use case
- could also be used if there was a separate process for recording the DOM (in which case a 3rd party library like https://github.com/antonmedv/finder could be added to record targets instead of the mirror)
---------
Authored-by: eoghanmurray <eoghanmurray@users.noreply.github.com>
Co-authored-by: Justin Halsall <Juice10@users.noreply.github.com>
* Extends maskTextFn to pass the HTMLElement to the deciding function
---------
Authored-by: benjackwhite <benjackwhite@users.noreply.github.com>
Co-authored-by: Justin Halsall <Juice10@users.noreply.github.com>
Co-authored-by: Eoghan Murray <eoghan@getthere.ie>
Co-authored-by: Yun Feng <yun.feng0817@gmail.com>
* export eventWithTime for consumption in typescript code
* Fix linting issues
* Apply formatting changes
Co-authored-by: Justin Halsall <Juice10@users.noreply.github.com>
* only call createHTMLDocument where it is needed
* Perf: create the mutation document once as a 'singleton' as it can be reused
---------
Co-authored-by: Michael Dellanoce <mdellanoce@pendo.io>
…nts (#1155)
* Feat: Add support for replaying :defined pseudo-class of custom elements
* add isCustom flag to serialized elements
Applying Justin's review suggestion
* fix code lint error
* add custom element event
* fix: tests (#1348)
* Update packages/rrweb/src/record/observer.ts
* Update packages/rrweb/src/record/observer.ts
---------
Co-authored-by: Nafees Nehar <nafees87n@gmail.com>
Co-authored-by: Justin Halsall <Juice10@users.noreply.github.com>
… the DOM (#1349)
* masking performance: avoid the repeated calls to `closest` when recursing through the DOM
- needsMask===true means that an ancestor has tested positively for masking, and so this node and all descendents should be masked
- needsMask===false means that no ancestors have tested positively for masking, we should check each node encountered
- needsMask===undefined means that we don't know whether ancestors are masked or not (e.g. after a mutation) and should look up the tree
* Add tests including an explicit characterData mutation tests * Further performance improvement: avoid calls to `el.matches` when on a leaf node, e.g. a `<br/>`
---------
Authored-by: eoghanmurray <eoghan@getthere.ie>
Based on initial PR #1338 by Alexey Babik <alexey.babik@noibu.com>
* Fix serialization and mutation of <textarea> elements taking account the duality that the value can be set in either the child node, or in the value _parameter_ (not attribute)
* Backwards compatibility: Bug fix and regression test for #112
- this is to fix up 'historical' recordings, as duplicate textarea content should no longer be being created at record time
- new test shows what the snapshot generated by previous versions of rrweb used to look like, hence 'bad'
- original 0efe23f fix either didn't work or no longer works due to childNodes being appended subsequent to this part of the code
- during review, we also verified that the `_cssText` case should still be handled okay, as there's currently no scenario where csstext is present with css child nodes of a <style>
* Masking: Fix that textarea values were being missed by the masking system if the value was recorded as a child node
- I didn't notice that form.html was used in other tests, so lucky that I noticed that those tests also should have the 'pre value' masked out
* Simplify by always storing the textarea value in the `.value` attribute (from it's DOM property) and not as a childNode. It should still be rebuilt as a childNode rather than a property
---------
Authored-by: eoghanmurray <eoghan@getthere.ie>
Co-authored-by: Justin Halsall <Juice10@users.noreply.github.com>
Co-authored-by: Yun Feng <yun.feng0817@gmail.com>
* Update Node version to LTS
* Create silver-windows-float.md
* Add UXWizz to Readme (CN)
* Add UXWizz to Readme
* Create hip-worms-relax.md
---------
Co-authored-by: Justin Halsall <Juice10@users.noreply.github.com>
* Add rrweb presentation
Add Justin Halsall open to rrweb consulting
* Create few-rockets-travel.md
* Update README.md
* Update README.md
* Fix alignment
* chore: export canvasMutation
* add changeset
* fix: console logger can serialize bigint values
* teach test jsdom is present
* add a changeset
* Update export-to-video.md
The file was pointing to the old Rrvideo repo The old repository soon is going to be closed as the Rrvideo was merged on Rrweb This change is pointing this recipe to the new and updated official doc.
* Update export-to-video.zh_CN.md
The file was pointing to the old Rrvideo repo The old repository soon is going to be closed as the Rrvideo was merged on Rrweb This change is pointing this recipe to the new and updated official doc.
Chinese version
* run tests without concurrency
* do not use cache in rpt2 during test
* Make properties x and y optional in mouseInteractionParam
The event representing a mouse interaction of focus an element does not include the properties x and y. Thus, they must be defined as optional.
* Fix typings
* feat(Snapshot): Capture stylesheets designated as `rel="preload"`
* fix(Snapshot): Harden asset file extension matching
* Add changeset
* chore: Lint
* Tweak regex, add try-catch block on URL constructor
* fix: scrolling can be incorrect when fast-forwarding
* add test case
* add changeset and remove duplicate diffProps process
---------
Co-authored-by: Yun Feng <yun.feng0817@gmail.com>
eoghanmurrayand others added 14 commits March 26, 2024 16:44
* We weren't recursing into media queries (or @supports etc.) to rewrite hover pseudoclasses
* The early return meant that the stylesWithHoverClass cache wasn't being populated if there were no hover selectors on the stylesheet
- not committing the test, but modifying the existing 'add a hover class to a previously processed css string' as follows shows the problem:
--- a/packages/rrweb-snapshot/test/rebuild.test.ts
+++ b/packages/rrweb-snapshot/test/rebuild.test.ts
@@ -151,6 +185,7 @@ describe('rebuild', function () {
path.resolve(__dirname, './css/benchmark.css'),
'utf8',
);
+ cssText = cssText.replace(/:hover/g, '');
const start = process.hrtime();
addHoverClass(cssText, cache);
* Replace `min-device-width` and similar with `min-width` as the former looks out at the browser viewport whereas we need it to look at the replayer iframe viewport
* Add some tests to show how the hover replacement works against selector lists. I believe these were failing in a previous version of rrweb as I had some local patches that no longer seem to be needed to handle these cases
* Update name of function to reflect that 'addHoverClass' does more than just :hover. I believe this function is only exported for the purposes of use in the tests
* Apply formatting changes
* Create rotten-spies-enjoy.md
* Apply formatting changes
* Add correct typing on `getSelectors`
* Refactor CSS interfaces to include optional rules
* Change `rules` to be non optional
---------
Co-authored-by: eoghanmurray <eoghanmurray@users.noreply.github.com>
Co-authored-by: Justin Halsall <Juice10@users.noreply.github.com>
* Add HowdyGo to Who's using rrweb
* Create twenty-goats-kneel.md
---------
Co-authored-by: Justin Halsall <Juice10@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
* try/catch injection of recording script in rrweb repl and stream
* Add empty changesets
* fix: createImageBitmap throws DOMException if source is 0
* code review
* fix
* Create breezy-cats-heal.md
* fix format
---------
Co-authored-by: Justin Halsall <Juice10@users.noreply.github.com>
* protect against a missing parent node during a mutation on an textNode
…layer (#1408)
Expose constant SKIP_TIME_THRESHOLD as `inactivePeriodThreshold` config setting in replayer
* Add support for capturing media attributes in rrweb-snapshot
* Add loop to mediaInteractionParam
* Add support for loop in RRMediaElement
* Add support for recording loop attribute on media elements
* Update video playback and fix bugs
* Update cross-origin iframe media attributes and player state
* Fix known issues
* Run format
* Fix linting errors
* Add comment in code for source of match logic
* Add changeset
…xt" (#1369)
* Add "types" field to fix error when using "moduleResolution": "NodeNext".
* Add changeset.
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
* better splitting of selectors - overlapping with #1401 * Add test from example at PostHog/posthog#21427
* ignore brackets inside selector strings
* Add another test as noticed that it's possible to escape strings
* Ensure we are ignoring commas within strings
Co-authored-by: Eoghan Murray <eoghan@getthere.ie>
…sion (#1441)
performance: remove a nested function call and an object clone during event emission
- rename `event` to `eventWithoutTime`, but maintain backwards compatibility
- `eventWithTime` (with time) could be renamed to `event` in a future version
This is an extension of PR #1339 authored by: mydea <mydea@users.noreply.github.com>
@billyvgbillyvg closed this Apr 19, 2024
@billyvgbillyvg reopened this Apr 19, 2024
@billyvg
billyvg merged commit 9e7381d into getsentry:sentry-v2Apr 30, 2024
chargome added a commit that referenced this pull request Mar 25, 2026
Remove lerna and replace its two uses with lighter alternatives:
- **`lerna version`** → `scripts/bump-version.js` — a ~80-line Node
script that updates all workspace `package.json` versions and
`@sentry-internal/*` cross-references to the exact new version. Modeled
after
[sentry-javascript#19325](getsentry/sentry-javascript#19325).
- **`lerna run build:tarball`** → `turbo run build:tarball` — Turborepo
is already used for all other cross-package tasks.
Lerna was pulling in a large transitive dependency tree including
packages with known vulnerabilities. This removes ~2,300 lines from
`yarn.lock`.
### Dependabot alerts resolved
**Fully resolved** (vulnerable package completely removed from
lockfile):
| Alert | Severity | Package | Summary |
|-------|----------|---------|---------|
| #217 | HIGH | `tar` | Symlink Path Traversal via Drive-Relative
Linkpath |
| #216 | HIGH | `tar` | Hardlink Path Traversal via Drive-Relative
Linkpath |
| #185 | HIGH | `tar` | Arbitrary File Read/Write via Hardlink Target
Escape Through Symlink Chain |
| #176 | HIGH | `tar` | Arbitrary File Creation/Overwrite via Hardlink
Path Traversal |
| #174 | HIGH | `tar` | Race Condition via Unicode Ligature Collisions
on macOS APFS |
| #172 | HIGH | `tar` | Arbitrary File Overwrite and Symlink Poisoning
via Insufficient Path Sanitization |
| #137 | HIGH | `axios` | SSRF and Credential Leakage via Absolute URL |
**Partially resolved** (some vulnerable entries removed, but the package
still exists via other dependency chains):
| Alert | Severity | Package | Remaining source |
|-------|----------|---------|-----------------|
| #213, #208, #207, #205 | HIGH | `minimatch` | `markdownlint-cli`,
`vite-plugin-dts` still pull in vulnerable versions |
| #161 | HIGH | `glob` | `markdownlint-cli`, `web-ext-run` still pull in
vulnerable versions |
| #136, #135 | CRITICAL | `form-data` | `jest` (via jsdom) still pulls
in `form-data@3.0.2` |
| #158, #157 | MEDIUM | `js-yaml` | `@changesets/cli`, `jest` still pull
in `js-yaml@3.14.1` |
The partially resolved alerts will be addressed in later phases (Phase
6: mop up remaining — bumping `markdownlint-cli`, `@changesets/cli`,
`jest`/rrvideo, etc.).
Part of the ongoing effort to resolve all Dependabot alerts on this
repo.
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

20 participants

@billyvg@KentoMoriwaki@eoghanmurray@benjackwhite@mydea@huangkairan@BelenLuo-tech@Juice10@mdellanoce@boehlerlukas@YunFeng0817@pauldambra@Cristy94@daibhin@patlopes@Yuyz0112@avillegasn@andrewpomeroy@xujiujiu@juliecheng