Skip to content

fix: remove String.replaceAll polyfill - #632

Merged
neil-marcellini merged 2 commits into
Expensify:mainfrom
aswin-s:fix/remove-replace-all
Jan 15, 2024
Merged

neil-marcellini merged 2 commits into
Expensify:mainfrom
aswin-s:fix/remove-replace-all

Conversation

@aswin-s

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

Copy link
Copy Markdown
Contributor

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
@github-actions

github-actions Bot commented Jan 15, 2024 •

Copy link
Copy Markdown

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

aswin-s commented Jan 15, 2024

Copy link
Copy Markdown
Contributor Author

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

@aswin-s

This comment was marked as off-topic.

@neil-marcellini neil-marcellini left a comment

Copy link
Copy Markdown
Contributor

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
Copy Markdown
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
@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