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

fix: remove String.replaceAll polyfill #632

Merged
merged 2 commits into from
Jan 15, 2024

Conversation

aswin-s
Copy link
Contributor

@aswin-s aswin-s commented Jan 15, 2024

This PR removes the String.replaceAll ployfill in an attempt to reduce the bundle size. String.replaceAll method is natively supported from NodeJS v15 onwards. So the polyfill is not needed any more. This removes appoximately 30KB from overall bundle size.

Fixed Issues

$ GH_LINK Expensify/App#31183

Tests

  1. What unit/integration tests cover your change? What autoQA tests cover your change?
    No new test cases required. Str.replaceAll method now makes use of built-in String.replace method. So all existing test cases should pass.

  2. What tests did you perform that validates your changed worked?

    • Verified that all existing testcases pass
    • Verified all functionalities are working as expected by linking into New-Expensify

QA

  1. What does QA need to do to validate your changes?
    Same as tests

  2. What areas to they need to test for regressions?
    Str.replaceAll is used in Emoji and comment parsing in Expensify app. Test by adding/removing emojis in chats.

@aswin-s aswin-s requested a review from a team as a code owner January 15, 2024 05:25
Copy link

github-actions bot commented Jan 15, 2024

CLA Assistant Lite bot All contributors have signed the CLA ✍️ ✅

@melvin-bot melvin-bot bot requested review from neil-marcellini and removed request for a team January 15, 2024 05:25
@aswin-s
Copy link
Contributor Author

aswin-s commented Jan 15, 2024

I have read the CLA Document and I hereby sign the CLA

@aswin-s

This comment was marked as off-topic.

Copy link
Contributor

@neil-marcellini neil-marcellini left a comment

Choose a reason for hiding this comment

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

Looks good, thanks

@neil-marcellini
Copy link
Contributor

I also confirmed that all our repos using expensify-common are using a node version >= 15

@neil-marcellini neil-marcellini merged commit 1ffd6bc into Expensify:main Jan 15, 2024
5 checks passed
@aswin-s aswin-s deleted the fix/remove-replace-all branch January 23, 2024 05:05
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