I am versioning a library with SemVer, and distibuting it with NuGet.
I am making some bugfixes and performance-related changes that do not modify the public API of the library in any way, but do involve adding a new dependency.
Usually I’d just increment the patch or minor versions when bugfixing or changing private code. Is this still appropriate when adding a new dependency as well? Or should I increment the major version, despite there being no changes in the public API? Are there any concrete guidelines for issues like this?
You almost certainly should use a minor version change.
The Wikipedia article on version numbers states:
I would consider a dependency a minor feature. Also, performance is a minor feature unless it is both a substantial limitation that the users encounter and you are making a large improvement.