Skip to content

Migrate from lodash to es-toolkit#596

Merged
RichDom2185 merged 17 commits intomasterfrom
migrate-es-toolkit
Mar 9, 2026
Merged

Migrate from lodash to es-toolkit#596
RichDom2185 merged 17 commits intomasterfrom
migrate-es-toolkit

Conversation

@AaravMalani
Copy link
Contributor

@AaravMalani AaravMalani commented Feb 12, 2026

Description

Migrate from lodash to es-toolkit

Type of change

Please delete options that are not relevant.

  • 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

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • 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
  • Any dependent changes have been merged and published in downstream modules

Note: A couple of Github Actions tests fail, hence I'm making a draft PR till it gets resolved Fixed, making it a normal PR

Copy link
Contributor

@leeyi45 leeyi45 left a comment

Choose a reason for hiding this comment

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

Left some comments. Also please address some of the linting errors. Otherwise, thanks for doing the migration work

@leeyi45
Copy link
Contributor

leeyi45 commented Feb 12, 2026

Will close #557

@leeyi45
Copy link
Contributor

leeyi45 commented Feb 13, 2026

Btw, was there any particular reason why you're performing this migration? @AaravMalani

@AaravMalani
Copy link
Contributor Author

Btw, was there any particular reason why you're performing this migration? @AaravMalani

I wanted to increase build times for py-slang. With the current setup, py-slang provides the entire lodash to the modules which it loads, so Rollup has to bundle it at build-time. It'd be more efficient for the modules to contain the functions they require, especially since most modules use one or two functions at max, and es-toolkit functions have a significantly tinier footprint than lodash functions (I think lodash-es bundled more than 10 different functions with just merge)

@RichDom2185 RichDom2185 marked this pull request as ready for review February 18, 2026 17:05
Copy link
Member

@RichDom2185 RichDom2185 left a comment

Choose a reason for hiding this comment

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

If @leeyi45 has further comments please do comment

Comment on lines +77 to +78
"react": "^18.3.1",
"react-dom": "^18.3.1",
Copy link
Member

Choose a reason for hiding this comment

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

Revert

Suggested change
"react": "^18.3.1",
"react-dom": "^18.3.1",

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think the tests were failing without react in package.json for some reason

AaravMalani and others added 2 commits March 2, 2026 15:35
Co-authored-by: Richard Dominick <34370238+RichDom2185@users.noreply.github.com>
Co-authored-by: Richard Dominick <34370238+RichDom2185@users.noreply.github.com>
return defaultConfig;
}
return _.merge({ ...defaultConfig }, userConfig);
return merge({ ...defaultConfig }, userConfig);

This comment was marked as outdated.

@leeyi45
Copy link
Contributor

leeyi45 commented Mar 9, 2026

Added some extra fixes on my end. If there are no further changes @AaravMalani, it LGTM

@AaravMalani
Copy link
Contributor Author

Added some extra fixes on my end. If there are no further changes @AaravMalani, it LGTM

Awesome, thanks! There aren't any further changes on my end unless @RichDom2185 has anything to comment

Copy link
Member

@RichDom2185 RichDom2185 left a comment

Choose a reason for hiding this comment

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

LGTM, thanks!

@RichDom2185 RichDom2185 merged commit da2700e into master Mar 9, 2026
66 checks passed
@RichDom2185 RichDom2185 deleted the migrate-es-toolkit branch March 9, 2026 19:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants