jQuery 3 deferreds finally follow Promises/A+

A jQuery Deferred used to swallow exceptions thrown in a then callback and call its handlers synchronously if already resolved. Version 3 made both behave the way native promises do, which is a breaking change that looks like a bug fix.

// 2.x: this exception vanished
// 3.x: it rejects the chain, and .catch sees it
$.get('/api/orders')
  .then(data => { throw new Error('boom'); })
  .catch(e => report(e));

Code that had been quietly relying on a swallowed exception now surfaces it — which is the point, and it will look like the upgrade introduced errors that were there all along. The synchronous-resolution change is the other one to watch: an already-resolved deferred now defers its callbacks to the microtask queue, so ordering between jQuery and non-jQuery code shifts.