peritus / bumpversion

Version-bump your software with a single command
https://pypi.python.org/pypi/bumpversion
MIT License
1.5k stars 147 forks source link

bumpVersion replaces all the versions in package.json file, not just the "version": #174

Closed shrutipatankar closed 6 years ago

shrutipatankar commented 6 years ago

When I set up bumpVersion to update package.json file, it updates every entry with the current "version": "major.minor.patch"

For example, if I have dependencies in package.json with the same version number as "version": "major.minor.patch", bumpVersion will update all.

For example (package.json):

"version": "v1.0.0", "dependencies": { "xyz": "^1.0.0", }

then running bumpVersion patch will make the file appear: "version": "v1.0.1", "dependencies": { "xyz": "^1.0.1", }

It is not desirable to see the other dependencies getting changed.

peritus commented 6 years ago

@shrutipatankar

If you're using npm, please use npm version: https://docs.npmjs.com/cli/version — it is much smarter and tailored to your environment.

If you need to use bumpversion because you need to update the version string in other places too (not just package.json), then have a look at the search = and replace = parameters and configuration, they can make sure only the right occurrence is replaced.

shrutipatankar commented 6 years ago

Thank you.