chore(rrweb): Replace fast-mhtml with inline MHTML parser#274
Open
chore(rrweb): Replace fast-mhtml with inline MHTML parser#274
Conversation
6d1bb58 to
4d604c3
Compare
4d604c3 to
2001158
Compare
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Remove the fast-mhtml dependency and replace it with a lightweight inline parser in test utils. Trim QP-decoded output rather than raw body to avoid corrupting trailing soft breaks, and fall back to 'frame' prefix when Content-Location is absent to produce distinct snapshot labels like file-frame-0 instead of file-null-0. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Ignore compiled vitest/vite config outputs (vitest.config.js, vitest.config.d.ts, vitest.config.js.map) and rrvideo temp directory. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
7c4c608 to
013ceed
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Remove the
fast-mhtmldependency which was only used in one test utility function (packages/rrweb/test/utils.ts) for parsing MHTML snapshots in replayer E2E tests.Replace with a minimal inline parser (~30 lines) that handles multipart MIME boundary splitting and quoted-printable content decoding. All 47 replayer tests pass.
fast-mhtmlpulled incheerio,express,undici,qs,bluebird, andcookie— a massive transitive tree for a simple test helper. This removes ~584 lines fromyarn.lock.Dependabot alerts resolved
Fully resolved (vulnerable package completely removed from lockfile):
qsqsPartially resolved (some entries removed, but package still exists via other dependency chains):
undicipuppeteer(Phase 3)cookie@sveltejs/kit(Phase 5)closes https://linear.app/getsentry/issue/SDK-1097/replace-fast-mhtml-9-alerts