If the library follows semantic versioning, then you can always declare that you work with everything from the current version to before the next major version.
That's what I usually do (although I pin minor, because you never know). I should also be better about following semver, but it just feels wrong to have your library be at version 5.43.55 :/