2

I made a silly mistake, I wanted to update the version of my npm library by X.X.1 - basically I should have used npm version patch but because I am stupid I ran npm version minor. So my library version is 0.3.0 instead of 0.2.1. How do I undo the minor update so I can apply the patch?

I would rather do this through the terminal / command line as it would also update my lock file too.

I am currently looking through the docs but you often get a straight answer here and I find your comments most useful. Any help would be appreciated.

NewToAngular
  • 975
  • 2
  • 13
  • 23

1 Answers1

1

After searching I just did a soft reset $ git reset --soft HEAD~1 and then applied the correct update command

NewToAngular
  • 975
  • 2
  • 13
  • 23
  • Unfortunately a soft reset would leave the tag. A more complete answer has been given here: https://stackoverflow.com/questions/32583667/revert-version-of-unpublished-node-js-package You have to hard reset and delete the tag. – Sovattha Sok Nov 05 '21 at 08:24