-
Notifications
You must be signed in to change notification settings - Fork 3.5k
Prefer fast-equals over lodash/isEqual. #62227
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
Prefer fast-equals over lodash/isEqual. #62227
Conversation
Signed-off-by: krishna2323 <belivethatkg@gmail.com>
Signed-off-by: krishna2323 <belivethatkg@gmail.com>
Signed-off-by: krishna2323 <belivethatkg@gmail.com>
|
Hey! I see that you made changes to our Form component. Make sure to update the docs in FORMS.md accordingly. Cheers! |
|
@eVoloshchak Please copy/paste the Reviewer Checklist from here into a new comment on this PR and complete it. If you have the K2 extension, you can simply click: [this button] |
Signed-off-by: krishna2323 <belivethatkg@gmail.com>
|
There are some ESLint issues, I'll address them tomorrow. |
Signed-off-by: krishna2323 <belivethatkg@gmail.com>
Signed-off-by: krishna2323 <belivethatkg@gmail.com>
|
@Krishna2323 lint and tests are failing here |
|
I'd be ok ignoring unrelated ESLint changed files failures because this PR touches a lot of files and I don't want to increase the risk of this change by making unrelated changes. But jest tests should be fixed. We should see if the Reassure failure is reproducible locally, but my guess is that it's a false negative, since apples-to-apples |
|
@eVoloshchak @roryabraham, after some investigation, I found that the Jest Unit Tests fails because of using App/src/components/PopoverWithMeasuredContent.tsx Lines 194 to 201 in 7e167cc
The issue you're encountering — "RangeError: Maximum call stack size exceeded" — when using RCA from chatGPTBreakdown of Why
|
|
Ah, yes so |
roryabraham
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe we should also upgrade fast-equals to latest. It looks like there are some bug fixes there, but also a >100% speed improvement for maps and sets
Signed-off-by: krishna2323 <belivethatkg@gmail.com>
|
|
|
@roryabraham, all tests are passing now (except for a few unrelated ESLint issues). @eVoloshchak, could you please review this comment and review the changes? Thanks! |
|
@Krishna2323, could you please open a separate PR for the |
|
@eVoloshchak, the fast-equals update is on staging. Do we need to wait for it to be deployed to production, or are we good to move forward? |
Signed-off-by: krishna2323 <belivethatkg@gmail.com>
@Krishna2323, we are good to move forward |
|
@Krishna2323, some checks are failing
|
Signed-off-by: krishna2323 <belivethatkg@gmail.com>
|
@eVoloshchak ESLint is fixed. |
Reviewer Checklist
Screenshots/VideosAndroid: HybridAppAndroid: mWeb ChromeiOS: HybridAppiOS: mWeb SafariMacOS: Chrome / SafariMacOS: Desktop |
eVoloshchak
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
|
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
|
Hi @Krishna2323 If we don't need QA for this, can I check it off?
|
|
🚀 Deployed to staging by https://github.com/roryabraham in version: 9.1.67-0 🚀
|
|
🚀 Deployed to production by https://github.com/lakchote in version: 9.1.67-2 🚀
|

Explanation of Change
Fixed Issues
$ #61751
PROPOSAL: #61751 (comment)
Tests
Import
isEqualfromlodashRun
npm run lintVerify error is shown in terminal:
Please use 'deepEqual' from 'fast-equals' instead.Verify that no errors appear in the JS console
Offline tests
N/A
QA Steps
N/A
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectiontoggleReportand notonIconClick)src/languages/*files and using the translation methodSTYLE.md) were followedAvatar, I verified the components usingAvatarare working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG))Avataris modified, I verified thatAvataris working as expected in all cases)Designlabel and/or tagged@Expensify/designso the design team can review the changes.ScrollViewcomponent to make it scrollable when more elements are added to the page.mainbranch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTeststeps.Screenshots/Videos
Android: Native
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari
MacOS: Desktop