Skip to content

Support codemod for individual lodash package imports (e.g., lodash.sortby) #6

Open
@dayongkr

Description

@dayongkr
Collaborator

📝 Issue Description

Some projects import lodash functions via individual packages, such as:

import sortBy from "lodash.sortby";

We should support codemodding these cases by converting them to the corresponding es-toolkit compat import:

import sortBy from "es-toolkit/compat/sortBy";

Tasks:

  1. Detect individual lodash.* package imports (e.g., lodash.clonedeep, lodash.uniqby, etc.)
  2. Map them to es-toolkit/compat/<functionName> paths
  3. Ensure the import name and path are transformed correctly
  4. Add tests to validate transformation for various function packages

Goal:
Ensure seamless migration for projects using function-level lodash packages, improving compatibility and adoption of es-toolkit.

Activity

hyesungoh

hyesungoh commented on Jun 15, 2025

@hyesungoh
Contributor

I can handle this too! please assigned me 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Participants

      @hyesungoh@dayongkr

      Issue actions

        Support codemod for individual lodash package imports (e.g., lodash.sortby) · Issue #6 · toss/es-toolkit-codemod