Skip to content

feat: migrate to es-toolkit#16836

Draft
MounirDhahri wants to merge 1 commit intoclaude/fix-lodash-imports-wvjbxfrom
migrate-to-es-toolkit
Draft

feat: migrate to es-toolkit#16836
MounirDhahri wants to merge 1 commit intoclaude/fix-lodash-imports-wvjbxfrom
migrate-to-es-toolkit

Conversation

@MounirDhahri
Copy link
Member

@MounirDhahri MounirDhahri commented Feb 19, 2026

DO NOT MERGE - Experiment

The type of this PR is: feat

Description

This PR migrates to es-toolkit instead of lodash

Replace lodash with es-toolkit across ~190 files to reduce bundle size
and modernize the codebase. lodash remains available via transitive
dependencies but is removed as a direct dependency.

- Migrate all lodash imports to es-toolkit barrel imports (tree-shaken
  via sideEffects: false)
- Use es-toolkit/compat for functions needing lodash-compatible behavior
  (variadic merge, loose pick/omit types, isEmpty, times, throttle)
- Replace lodash utilities with native JS where appropriate
  (Object.entries, Array.isArray, .find, .filter, .map, .every, etc.)
- Add truncateText utility to replace lodash truncate
- Add nativeHelpers.js for CommonJS passport files
- Remove lodash and @types/lodash from direct dependencies

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@MounirDhahri MounirDhahri self-assigned this Feb 19, 2026
@MounirDhahri MounirDhahri changed the base branch from main to claude/fix-lodash-imports-wvjbx February 19, 2026 11:35
@artsyit
Copy link
Contributor

artsyit commented Feb 19, 2026

New dependencies added: es-toolkit.

es-toolkit

Used in package.json
Author: Unknown Description: A state-of-the-art, high-performance JavaScript utility library with a small bundle size and strong type annotations.
License: MIT Homepage: https://es-toolkit.dev
Updated: 13 days ago Created: over 1 year ago
Releases: 1458 Maintainers: 3

Generated by 🚫 dangerJS against 4d2943e

@relativeci
Copy link

relativeci bot commented Feb 19, 2026

#6831 Bundle Size — 8.6MiB (-0.19%).

4d2943e(current) vs 20b4798 claude/fix-lodash-imports-wvjbx#6825(baseline)

Important

Bundle introduced 1 duplicate package – View changed duplicate packages

Bundle metrics  Change 7 changes Regression 3 regressions Improvement 1 improvement
                 Current
#6831
     Baseline
#6825
Regression  Initial JS 2.78MiB(~+0.01%) 2.78MiB
No change  Initial CSS 0B 0B
Change  Cache Invalidation 86.29% 84.79%
No change  Chunks 111 111
No change  Assets 114 114
Change  Modules 5635(-1.04%) 5694
Improvement  Duplicate Modules 655(-1.36%) 664
Change  Duplicate Code 5.08%(-3.05%) 5.24%
Regression  Packages 251(+0.4%) 250
Regression  Duplicate Packages 31(+3.33%) 30
Bundle size by type  Change 2 changes Improvement 2 improvements
                 Current
#6831
     Baseline
#6825
Improvement  JS 8.45MiB (-0.18%) 8.46MiB
Improvement  Other 153.58KiB (-0.88%) 154.94KiB

Bundle analysis reportBranch migrate-to-es-toolkitProject dashboard


Generated by RelativeCIDocumentationReport issue

@MounirDhahri MounirDhahri marked this pull request as draft February 19, 2026 11:44
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