Package compatibility when upgrading Cloudcode Libraries

I upgraded a cloudcode task to 1.11.2 which, unknown to me at the time, was no longer compatible with the associated postgres node library version 7.6. By upgrading the postgres node library to the latest version the issue resolved itself. We however only identified the cause and fix by trial and error, and only after we had pushed to production.

Is there a way of knowing in advance what effect upgrading a cloudtask version will have on the associated libraries?

You can look at the CloudCode change log to see when the node version got updated.

Ultimately, the only real way to be sure your code works with the updated CloudCode version, is to test it in a testing or staging environment.