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

LF-4164 Import from and install types for lodash-es instead of lodash #3394

Merged
merged 1 commit into from
Aug 26, 2024

Conversation

kathyavini
Copy link
Collaborator

@kathyavini kathyavini commented Aug 26, 2024

Description

Deploy and Cypress failed on pnpm install due to the import of groupBy from lodash. Why does build not fail here but not locally? I don't know!

But the other groupBy was imported from lodash-es (es for ES modules, not for Spanish) so I'll try the same here.

Also uninstalled the lodash types and installed lodash-es types, so that the type error might, in the future, be a reminder to use lodash-es 🤷

Jira link: https://lite-farm.atlassian.net/browse/LF-4164

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration

  • Passes test case
  • UI components visually reviewed on desktop view
  • UI components visually reviewed on mobile view
  • Other (please explain)

Checklist:

  • I have commented my code, particularly in hard-to-understand areas
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • The precommit and linting ran successfully
  • I have added or updated language tags for text that's part of the UI
  • I have added "MISSING" for all new language tags to languages I don't speak
  • I have added the GNU General Public License to all new files

@kathyavini kathyavini added the bug Something isn't working label Aug 26, 2024
@kathyavini kathyavini self-assigned this Aug 26, 2024
@kathyavini kathyavini requested review from a team as code owners August 26, 2024 19:12
@kathyavini kathyavini requested review from Duncan-Brain and SayakaOno and removed request for a team August 26, 2024 19:12
@@ -14,7 +14,7 @@
*/
import { UseFieldArrayReplace, useFormContext } from 'react-hook-form';
import { useEffect } from 'react';
import { groupBy } from 'lodash';
import groupBy from 'lodash-es/groupBy';
Copy link
Collaborator

Choose a reason for hiding this comment

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

small thing -- might be good to use format of naming _groupBy(lodashgroupBy) it seems to be common probably since the function names are pretty generic and overlappy.

Copy link
Collaborator

@SayakaOno SayakaOno left a comment

Choose a reason for hiding this comment

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

🤞 !

@SayakaOno SayakaOno added this pull request to the merge queue Aug 26, 2024
Merged via the queue into integration with commit fed6eca Aug 26, 2024
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants