Skip to content

Replaces the lodash library with es-toolkit #2977

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

kms0219kms
Copy link

@kms0219kms kms0219kms commented Jul 11, 2025

This PR replaces lodash dependencies with es-toolkit to improve performance and fix some potential security risks as lodash no longer being maintained.

Description

es-toolkit is a modern alternative to lodash that's significantly faster and lighter, which could potentially boost concurrently's overall performance (#). It's been tested using lodash's actual test suite and we are guarantee 100% compatiable with lodash (#).

It's already being adopted by major projects like Storybook, Recharts, Ink, and CKEditor with 2.8M downloads a week on NPM, and supports compatible layer with lodash.

You can learn more at https://es-toolkit.dev/intro.html.

IMPORTANT: This PR uses es-toolkit/compat which is compatible layer with lodash, and we are not expecting for any side-effects.

Motivation and Context

lodash is no longer be maintained, and it has some potential security risks. Also, es-toolkit improved the overall performance (#), while it 100% compatible from lodash (#). This migration will also reduces the bulid size (#).

How Has This Been Tested?

This PR simply replaces all 'lodash' imports to 'es-toolkit/compat'. I ran the npm run test and it worked well. You are still welcomed to cross-check this by running CI test pipeline.

Copy link

linux-foundation-easycla bot commented Jul 11, 2025

CLA Signed


The committers listed above are authorized under a signed CLA.

@murgatroid99
Copy link
Member

This repository uses lodash in example code and test code, and in the code generator in @grpc/proto-loader. Overall, the reasons you provide for switching don't really seem applicable, so I would prefer not to change this unless there's a specific reason to do so for the usage in this repository.

@kms0219kms
Copy link
Author

kms0219kms commented Jul 12, 2025

@murgatroid99 I have updated the original post to provide more information and a reason. If you need more information, please wait until the weekdays and our team will provide you with the appropriate information.

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