For paradigm shifts, you really can not do much other than look out for breaking changes in the beta builds as Sebastian pointed out.
For libraries, I tend to create my own abstraction over them, so that whenever I call my own CustomRequestClass.get() from other part of the code, I don't have to bother about whether I'm using XMLHttpRequest or superagent. So if something is wrong in an internal library or need to use another for more features, I have to change it at one place.
I guess, always create a shell around the code you don't own.