Skip to content

Conversation

@manudeli
Copy link

@manudeli manudeli commented Jun 6, 2025

What:

Replaced usages of lodash utility functions with their equivalents from es-toolkit, and removed lodash from dependencies. Storybook also use es-toolkit

Why:

es-toolkit offers modern, modular alternatives that align with the library's lightweight philosophy.

How:

Identified and replaced individual lodash imports with equivalent functions from es-toolkit/compat.

Adjusted imports accordingly.

Updated unit tests to confirm behavior remains unchanged.

Removed lodash from package.json.

Checklist:

  • Documentation
  • Tests
  • Updated Type Definitions
  • Ready to be merged

@manudeli manudeli marked this pull request as ready for review June 6, 2025 07:07
@manudeli manudeli force-pushed the fix/lodash-to-es-toolkit branch from 0b44e2c to c721767 Compare June 28, 2025 16:32
@okinawaa
Copy link

@gnapse Hello.
I'm sorry while you're busy.
Can you check this PR? The context is well written in the description.

Copy link
Contributor

@wojtekmaj wojtekmaj left a comment

Choose a reason for hiding this comment

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

LGTM, and it looks like choosing compat function is the right choice here. From what I see, every isEqualWith call is being made with a third argument being compareArraysAsSet util, which might return undefined when we're not comparing two arrays, which would trigger the compat behavior that comes after this line evaluates to false: https://github.com/toss/es-toolkit/blob/main/src/compat/predicate/isEqualWith.ts#L48

@MichaelDeBoey
Copy link
Member

Superseded by #676

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.

4 participants