Closed
Conversation
Copilot
AI
changed the title
[WIP] Replace lodash with es-toolkit for utility functions
feat(TEC-225): replace lodash with es-toolkit
Mar 30, 2026
Member
|
@copilot Rebase the branch on |
Contributor
Author
50ddf87 to
9035dba
Compare
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.
Lodash is no longer actively maintained; es-toolkit is its modern replacement with a smaller bundle, better tree-shaking, and built-in TypeScript types (no
@types/*needed).Dependency changes
es-toolkit: ^1.45.1to the pnpm workspace cataloglodash.*and@types/lodash.*catalog entries and per-package deps acrossapps/admin,apps/website,apps/show, andlibs/search-params-ioImport migration
All
import X from "lodash.X"(default exports from individual packages) become named exports:Compat layer usage (
es-toolkit/compat)Two functions use the lodash-compatible shim rather than the strict main export:
orderBy— the maines-toolkitsignature requires an array of iteratees, an explicit orders array, andT extends object(no primitives). The codebase uses lodash's flexible form throughout (single function iteratee, optional order string, arrays of enum strings), soes-toolkit/compatis the correct drop-in.mergein the Prisma select helpers — the main export is 2-arg only; these call sites usemerge({}, internalSelect, params.select)to deep-merge nested Prismaselectobjects (a shallow spread would lose nested fields).es-toolkit/compatsupports the variadic signature.Original prompt