Skip to content
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

[RUM-5258] RN 0.63 BigInt support #686

Merged
merged 1 commit into from
Jul 8, 2024

Conversation

marco-saia-datadog
Copy link
Contributor

What does this PR do?

Includes a conditional BigInt polyfill, applied for RN 63 when BigInt is undefined.

Motivation

React Native 0.63 does not support BigInt, forcing SDK consumers to apply a polyfill on their side to make the SDK work properly.

Additional Notes

The error that is thrown when the polyfill fails has been introduced for precaution, but it will not be thrown unless executed on a strongly unusual environment.

The reason is that the module big-integer - used for the polyfill - is a dependency of the xcode package, used by React Native CLI.

Therefore, it will be available in pretty much every RN project setup.

Review checklist (to be filled by reviewers)

  • Feature or bugfix MUST have appropriate tests
  • Make sure you discussed the feature or bugfix with the maintaining team in an Issue
  • Make sure each commit and the PR mention the Issue number (cf the CONTRIBUTING doc)
  • If this PR is auto-generated, please make sure also to manually update the code related to the change

@marco-saia-datadog marco-saia-datadog force-pushed the marcosaia/RUM-5258/bigint-polyfill branch from 2830c53 to 26c6a16 Compare July 5, 2024 15:54
@marco-saia-datadog marco-saia-datadog marked this pull request as ready for review July 5, 2024 16:20
@marco-saia-datadog marco-saia-datadog requested a review from a team as a code owner July 5, 2024 16:20
@marco-saia-datadog marco-saia-datadog changed the title Added RN 63 BigInt polyfill [RUM-5258] RN 0.63 BigInt support Jul 5, 2024
@marco-saia-datadog marco-saia-datadog merged commit 1927121 into develop Jul 8, 2024
6 checks passed
@marco-saia-datadog marco-saia-datadog deleted the marcosaia/RUM-5258/bigint-polyfill branch July 8, 2024 12:36
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.

2 participants