Software Engineering
testing node.js semantic-versioning
Updated Fri, 20 May 2022 23:47:02 GMT

Update semver minor version on test updates?

I always try to adhere the semver spec when I commit changes. This time though I was wondering what to do when I update my tests: I'm working on an API client that includes a simplified API server running locally for testing the client (since many API methods are irreversibly changing data).
Now, what to do when I add routes to the test API or add new tests to my test suite?

My first line of thought was to not change the version at all, since there are no modifications done to my actual code, but that would mean the public NPM package would not include the new tests, which would annoy me.

On the other hand, changing the minor version (since new functionality has been implemented) would also indicate the wrong thing.
How do you handle this?


I think you're overthinking it. Look at it from the perspective of the user of your package, upgrading. Is it safe for them to do with no code changes? Then bumping the 'z' version of x.y.z is entirely appropriate.

The alternative here is to not release an updated version at all, since you can't (or shouldn't be able to) release new code that has the same version as an existing release