refactor: replace all lodash.* dependencies with es-toolkit/compat#4734
Merged
escapedcat merged 1 commit intoconventional-changelog:masterfrom Apr 27, 2026
Conversation
Drops six per-function lodash.* packages in favor of a single es-toolkit dependency, using the lodash-compatible /compat surface so behavior matches the existing tests — including the non-Latin subject-case regressions added after the kasi revert (conventional-changelog#4621). Replacements: - lodash.camelcase / kebabcase / snakecase / startcase / upperfirst → es-toolkit/compat in @commitlint/ensure (case helpers) - lodash.mergewith → es-toolkit/compat: - mergeWith (with customizer) in @commitlint/resolve-extends - merge (no customizer) in @commitlint/load, @commitlint/config-patternplate, and the cli test helper es-toolkit/compat's mergeWith always treats the last positional argument as the customizer, unlike lodash's createAssigner which detects function-typed customizers. Call sites that passed objects (no customizer) are switched to es-toolkit's variadic merge to preserve behavior. Test results: 1185/1185 tests across 90 files pass, including the Cyrillic / Chinese / Arabic / Hebrew / mixed-script subject-case cases that broke under kasi.
Member
|
Thanks! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Replacing
lodash.*withes-toolkit/compatReplacements:
Notes:
use of compat mode
es-toolkit/compatshould pass themMotivation and Context
For improving performance, minimizing dependencies and supply chain attack vectors.
Reference: https://e18e.dev/docs/replacements/lodash-underscore
How Has This Been Tested?
Test results: 1185/1185 tests across 90 files pass, including the Cyrillic / Chinese / Arabic / Hebrew / mixed-script subject-case cases that broke under kasi.
Types of changes
Checklist: