New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(replay): Fix incorrect uncompressed recording size due to encoding #6740
Conversation
size-limit report 📦
|
1a9a5a7
to
bd1bb06
Compare
@@ -17,6 +18,10 @@ useFakeTimers(); | |||
let replay: ReplayContainer; | |||
|
|||
describe('Integration | coreHandlers | handleGlobalEvent', () => { | |||
beforeAll(() => { | |||
(global as any).TextEncoder = TextEncoder; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could we move this into jest.setup.ts
or similar? Just an idea?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1
Does this include the |
bd1bb06
to
ce59300
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM and +1 on moving this(global as any).TextEncoder = TextEncoder
line to somewhere where we don't have to add it to every integration test.
@@ -17,6 +18,10 @@ useFakeTimers(); | |||
let replay: ReplayContainer; | |||
|
|||
describe('Integration | coreHandlers | handleGlobalEvent', () => { | |||
beforeAll(() => { | |||
(global as any).TextEncoder = TextEncoder; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1
For uncompressed payloads, we were potentially sending the incorrect size due to encoding issues. Instead encode to UTF8 when determining the payload size. Note that `TextEncoder` mostly overlaps with `MutationObserver` support *except* for IE11. So we will not be supporting IE11.
This reverts commit 7157ef2.
40e3e06
to
129820f
Compare
I will go ahead and merge this so we get this into todays release! |
For uncompressed payloads, we were potentially sending the incorrect size due to encoding issues. Instead encode to UTF8 when determining the payload size. Note that
TextEncoder
mostly overlaps withMutationObserver
support except for IE11. So we will not be supporting IE11.