Git Product home page Git Product logo

lodash-codemods's Introduction

lodash-codemods Build Status

Codemods for Lodash that simplifies upgrading to newer versions

Codemods are small programs that help you automate changes to your codebase. Think of them as search and replace on steroids.

This module contains a set of codemods that enable you to upgrade your code between various Lodash releases.

WARNING

This tool should help migrate your codebase from one version of Lodash to another. That said, it may not be 100% complete or able to apply all the necessary changes. You should NOT rely on the fact that this will work entirely, and you therefore NEED to review the changes made and test that your code is still working.

In cases where static analysis is not enough to figure whether a change should be made, instructions will be printed to the console, and you should follow them to complete the migration.

Install

$ npm install --global lodash-codemods

Usage

$ lodash-codemods --help

  Codemods to simplify upgrading Lodash versions

  Usage
    $ lodash-codemods [<file|glob> ...]

  Options
    --from <version> Specify the version of Lodash currently used
    --to <version>   Specify the version of Lodash to move to
    --force, -f      Bypass safety checks and forcibly run codemods
    --silent, -S     Disable log output

  Available upgrades
    - [] → 4.0.0

Simply run lodash-codemods in your terminal and answer a few questions. You can pass one or more filenames directly to the CLI. If you do not, you will be prompted for it.

Ensure you have a backup of your tests or commit the latest changes before running this.

Supported codemods

  • Upgrading to 4

License

MIT © Jeroen Engels

lodash-codemods's People

Contributors

jfmengels avatar kamranasif avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.