version bump when updating readme for npm package?

npm publish --force will overwrite if version number already exists in registry.

https://npmjs.org/doc/publish.html


Depending on your definition of "need to", this could be two very different questions:

  1. [Is it ok to publish readme changes without bumping the version number?]

  2. [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 --force is discouraged. Instead, authors are encouraged to use semantic versioning aka semver, which prescribes:

... version format of X.Y.Z (Major.Minor.Patch). Bug fixes not affecting the API increment the patch version, backwards compatible API additions/changes increment the minor version, and backwards incompatible API changes increment the major version.

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.

Tags:

Node.Js

Npm