Code Monkey home page Code Monkey logo

updates's Introduction

updates

Flexible npm dependency update tool

updates is a CLI tool which checks for npm dependency updates of the current project and optionally updates package.json. It is highly configurable and is typically able to complete in less than a second.

Usage

$ npm i -g updates

Then, check for new updates:

$ updates

When changes are satisfactory, update package.json and re-install modules:

$ updates -u && rm -rf node_modules && npm i

Options

See --help or below for the available options. Option that take multiple arguments can take them either via comma-separated value or by specifying the option multiple times. If an option has a optional pkg argument but none is given, the option will be applied to all packages instead.

usage: updates [options]

  Options:
    -u, --update                  Update versions and write package.json
    -p, --prerelease [<pkg,...>]  Consider prerelease versions
    -R, --release [<pkg,...>]     Only use release versions, may downgrade
    -g, --greatest [<pkg,...>]    Prefer greatest over latest version
    -i, --include <pkg,...>       Include only given packages
    -e, --exclude <pkg,...>       Exclude given packages
    -t, --types <type,...>        Check only given dependency types
    -P, --patch [<pkg,...>]       Consider only up to semver-patch
    -m, --minor [<pkg,...>]       Consider only up to semver-minor
    -E, --error-on-outdated       Exit with error code 2 on outdated packages
    -r, --registry <url>          Use given registry URL
    -f, --file <path>             Use given package.json file or module directory
    -j, --json                    Output a JSON object
    -c, --color                   Force-enable color output
    -n, --no-color                Disable color output
    -v, --version                 Print the version
    -h, --help                    Print this help

  Examples:
    $ updates
    $ updates -u
    $ updates -u -m
    $ updates -u -e chalk
    $ updates -u -t devDependencies

JSON Output

The JSON output is an object with possible properties results, message and error:

$ updates -j | jq
{
  "results": {
    "string-width": {
      "old": "2.1.1",
      "new": "3.0.0",
      "info": "https://github.com/sindresorhus/string-width"
    },
    "eslint": {
      "old": "5.9.0",
      "new": "5.10.0",
      "info": "https://github.com/eslint/eslint"
    },
    "eslint-config-silverwind": {
      "old": "2.0.11",
      "new": "2.0.12",
      "info": "https://github.com/silverwind/eslint-config-silverwind"
    }
  }
}

© silverwind, distributed under BSD licence

updates's People

Contributors

silverwind avatar jgierer12 avatar rupesh1 avatar wind0r avatar

Watchers

James Cloos 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.