But if the API offered a function called .countBy but then renamed that function to be .countAllBy, now I can't run my application anymore, causing my service to go down if I upgrade the version without testing it, is that a DoS now?
no. is it really that complex of a concept that intent of a change matters too, and introducing an endless loop to cause trouble to users is different from a legitimate API change that does a useful thing?
Who are you to decide what is useful/legitimate or not? As a user of $ExampleLibrary, I surely know best what's useful rather than the maintainer.
> Who are you to decide what is useful/legitimate or not?
Common sense.
I think it's safe to say that people who download a data-generation library intended for testing are not looking for infinite loops.
NPM expects packages to follow semantic versioning. If a package contained a breaking change like that, there would be a major version bump, and you'd have to upgrade manually.
If the maintainers wasn't acting maliciously, they could change this new version to count as a major release, and then it wouldn't be a DoS.
This change introduced an infinite loop upon import. It is nothing like changing an identifier which would've provided an error message about where the issue occurred.