I am building an Angular Library to be used in other Angular Applications. I want to create a build pipeline in DevOps (VSTS) so after each commit to git, the library will be built and published as Artefacts to be used.
Till now everything works fine, my problem is with Angular Library version. If I tried to publish the Library with the same version, I receive this error:
Forbidden The feed already contains the package 'my-lib' at version '0.0.1': my-lib
My build pipeline:
To solve this problem, I have either to change the Version in the package.json before every builds 
Or through the cli: npm version 0.0.2
Can I do it automatically? which means, no need for extra actions except commit/push? I had searched for a long time, but couldn't find a solution. Thanks

To update your version you need to run
npm versioncommand by passing one of the following:patch, minorormajor->npm version patchwould update your package version from1.3.0to1.3.1npm version minorwould update your package version from1.3.0to1.4.0npm version majorwould update your package version from1.3.0to2.3.0You can add this command to your pipeline to be run when you merge to
masteror however you pipeline is set up.Please see: https://docs.npmjs.com/cli/version