npm-fix-versions

This module provide fixing versions for npm modules in your project

Usage no npm install needed!

<script type="module">
  import npmFixVersions from 'https://cdn.skypack.dev/npm-fix-versions';
</script>

README

Build Status NPM version

npm-fix-versions

This module scan node_modules directory and update current versions for npm modules into your project package.json.

Installation

$ sudo npm install npm-fix-versions -g

Usage

  Usage: npm-fix-versions [options]

  Options:

    -h, --help        output usage information
    -V, --version     output the version number
    -c, --comparator  Add comparator
    -p, --production  Add production dependencies
    -d, --dev         Add dev dependencies
    -o, --optional    Add optional dependencies

Get started!

$ cd /project_directory
$ npm-fix-versions -p -d -c ^

before:

    "dependencies": {
        "semver": "*",
        "commander": "latest"
    },
    "devDependencies": {
        "mocha": "*",
        "chai": "*"
    }

after:

    "dependencies": {
        "semver": "^1.0.0",
        "commander": "^2.0.0"
    },
    "devDependencies": {
        "mocha": "^3.5.0",
        "chai": "^2.33.11"
    }