If I modify my readme for an npm package I maintain, do I need to bump the version in package.json and do another npm publish? or is there another way to update the readme without a version bump.
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Depending on your definition of “need to”, this could be two very different questions:
[Is it ok to publish readme changes without bumping the version number?]
[Is it technically possible to publish changes without incrementing the version]
The accepted answer (updating via
npm publish --force, i.e. without incrementing any part of the version number) is a good answer to Q2. But I want to address Q1.Use of
npm publish --forceis discouraged. Instead, authors are encouraged to use semantic versioning aka semver, which prescribes:So my answer is:
While there is technically a way to publish changes without a version bump, you shouldn’t do that. For minor edits that don’t affect the package’s API, you should bump the “patch” version, e.g. from 1.2.0 to 1.2.1.