Question

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?

Was it helpful?

Solution

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

OTHER TIPS

I think it's quite alright to just bump your patch version component if you want to make a new package with no changes other than additional tests. In a way you've just improved your "documentation" a bit.

Licensed under: CC-BY-SA with attribution
scroll top