fix: remove lodash dependency and replace with native utilities#339
Merged
MarshallOfSound merged 2 commits intomainfrom Apr 8, 2026
Merged
fix: remove lodash dependency and replace with native utilities#339MarshallOfSound merged 2 commits intomainfrom
MarshallOfSound merged 2 commits intomainfrom
Conversation
Replace lodash usage with native equivalents (structuredClone, isDeepStrictEqual, String#trimEnd/repeat, Object.assign/entries, array spread/flatMap) and small local helpers for upperFirst, lowerFirst, and camelCase.
dsanders11
requested changes
Apr 8, 2026
Member
dsanders11
left a comment
There was a problem hiding this comment.
Tests for the helpers added to src/utils.ts?
dsanders11
approved these changes
Apr 8, 2026
|
🎉 This PR is included in version 9.1.6 🎉 The release is available on: Your semantic-release bot 📦🚀 |
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.
This PR removes the lodash dependency from the codebase and replaces all lodash utility functions with native JavaScript equivalents or custom implementations.
Summary
Lodash has been completely removed as a dependency. All lodash function calls have been replaced with:
_.repeat()→String.prototype.repeat(),_.trimEnd()→String.prototype.trimEnd())utils.ts(e.g.,upperFirst,lowerFirst,camelCase)isDeepStrictEqualfromnode:util)structuredClone(),Object.entries())Key Changes
utils.ts:upperFirst(): Capitalizes first characterlowerFirst(): Lowercases first charactercamelCase(): Converts strings to camelCase format_.upperFirst()→upperFirst()_.lowerFirst()→lowerFirst()_.camelCase()→camelCase()_.repeat()→String.prototype.repeat()_.trimEnd()→String.prototype.trimEnd()_.concat()→ spread operator[...]_.cloneDeep()→structuredClone()_.isEqual()→isDeepStrictEqual()fromnode:util_.forIn()→Object.entries()with for-of loop_.map()→Array.prototype.map()_.assign()→Object.assign()package.json:lodashand@types/lodashImplementation Details
camelCase()implementation handles word boundaries and maintains compatibility with the original lodash behaviorisDeepStrictEqual()from Node.jsutilmodule provides deep equality checking previously done by_.isEqual()https://preview.claude.ai/code/session_0169kyjeRxGb9JNHUwqTHgTf