https://github.com/akullpp/pjson-versionizer
Sets the versions of all dependencies inside the package.json to match the versions of the installed dependencies
https://github.com/akullpp/pjson-versionizer
Last synced: 3 months ago
JSON representation
Sets the versions of all dependencies inside the package.json to match the versions of the installed dependencies
- Host: GitHub
- URL: https://github.com/akullpp/pjson-versionizer
- Owner: akullpp
- License: mit
- Created: 2015-04-18T15:38:14.000Z (about 11 years ago)
- Default Branch: master
- Last Pushed: 2015-05-28T20:39:35.000Z (about 11 years ago)
- Last Synced: 2025-03-06T05:33:11.152Z (over 1 year ago)
- Language: JavaScript
- Size: 262 KB
- Stars: 3
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# pjson-versionizer
[](https://travis-ci.org/akullpp/pjson-versionizer) [](https://npmjs.org/package/pjson-versionizer)
Sets the versions of all dependencies in the `package.json` to match the versions of the installed dependencies located in the `node_modules`.
## Installation
`npm i -g pjson-versionizer`
## Usage
pjv [options]
Options:
-h, --help output usage information
-V, --version output the version number
--ddeps Only sets development dependencies
--deps Only sets production dependencies
--prefix [semver] Semver prefix for all dependencies
--dry Only logs to console
## Motivation
Use case for me were scenarios in which [npm-check-update](https://github.com/tjunnone/npm-check-updates) didn't work. For example if you were trying to update the `package.json` to replace all asterisks `*` with the actual version:
dependencies: {
"a": "*"
}
becomes
dependencies: {
"a": "^1.0.0"
}
Also it is useful to update the version to the latest installed made available by semver, e.g. `^1.0.0` to `^1.1.0`. Or to set the semver of all packages via the prefix flag.