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-6875] Use BigInteger from big-integer instead of bigint #765

Merged
merged 1 commit into from
Jan 7, 2025

Conversation

marco-saia-datadog
Copy link
Member

@marco-saia-datadog marco-saia-datadog commented Jan 6, 2025

What does this PR do?

Refactors all usages of bigint to use the BigInteger type from big-integer instead.

Motivation

Support for bigint is not stable across all versions of React Native and Hermes. It was officially introduced with RN 0.70.0 for Hermes, and our polyfills were not accurate. Instead of modifying the polyfills, this PR opts to directly use the big-integer library by default. This library will just act as a wrapper for the native implementation if possible.

Additional Notes

Other changes

  • Adds the dependency in the 3rd party licenses
  • Removes our polyfills (packages/core/src/polyfills.js)

Impact

https://bundlephobia.com/package/[email protected]

  • File Size:
    • 21.2kB Minified
    • 6.7kB Minified + Gzipped

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 marked this pull request as ready for review January 6, 2025 15:32
@marco-saia-datadog marco-saia-datadog requested a review from a team as a code owner January 6, 2025 15:32
@marco-saia-datadog marco-saia-datadog merged commit 97f26f3 into develop Jan 7, 2025
9 checks passed
@marco-saia-datadog marco-saia-datadog deleted the marcosaia/RUM-6875/big-integer branch January 7, 2025 08:50
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.

3 participants