Increase patch number by command in npm

Increase patch number by command in npm

To increase the patch version number using npm, you can use the npm version command with the patch argument. This command automatically increments the patch version and updates the version in your package.json file.

Here's the command:

npm version patch

After running this command, npm will increase the patch version in your package.json, create a new commit, and tag the commit with the updated version. Make sure to push the changes to your repository afterward:

git push && git push --tags

This assumes that your project is using git for version control. If you are using a different version control system, adjust the commands accordingly.