Skip to content

feat(core): Use global TextEncoder and TextDecoder #10701

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

Merged
merged 9 commits into from
Feb 20, 2024

Conversation

timfish
Copy link
Collaborator

@timfish timfish commented Feb 16, 2024

Closes #10694

Use global TextEncoder and TextDecoder now that they are supported by all platforms that will be supported by v8 of the SDKs.

Copy link
Member

@AbhiPrasad AbhiPrasad left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

feels freeing to not care about ie11 anymore

@timfish
Copy link
Collaborator Author

timfish commented Feb 16, 2024

And Node v8!

@timfish

This comment was marked as outdated.

@timfish timfish requested a review from AbhiPrasad February 19, 2024 20:27
@AbhiPrasad AbhiPrasad merged commit fe41836 into getsentry:develop Feb 20, 2024
krystofwoldrich added a commit that referenced this pull request Mar 26, 2024
…__ (#11283)

The TextEncoder option was removed in
#10701 because all of
the newly supported platforms support TextEncoder/Decoder.

Sadly that's not true for React Native, yet. TextEncoder will be
included in the next release of RN with Hermes. See the PR
facebook/hermes@3863a36#diff-4bf4a4ab271f254baf2097be87be98333ec69eb2d41e074b81147656c33145eb

We can not drop support of all the previous RN versions in the RN SDK v6
(the next major).

To avoid passing the encoder option around the SDK, I propose adding
polyfill properties to the global __SENTRY__ object which RN can use.
cadesalaberry pushed a commit to cadesalaberry/sentry-javascript that referenced this pull request Apr 19, 2024
…__ (getsentry#11283)

The TextEncoder option was removed in
getsentry#10701 because all of
the newly supported platforms support TextEncoder/Decoder.

Sadly that's not true for React Native, yet. TextEncoder will be
included in the next release of RN with Hermes. See the PR
facebook/hermes@3863a36#diff-4bf4a4ab271f254baf2097be87be98333ec69eb2d41e074b81147656c33145eb

We can not drop support of all the previous RN versions in the RN SDK v6
(the next major).

To avoid passing the encoder option around the SDK, I propose adding
polyfill properties to the global __SENTRY__ object which RN can use.
Sign up for free to 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.

[v8] Remove explicit passing of TextEncoder and TextDecoder
2 participants