Skip to content

v2.0.0

Compare
Choose a tag to compare
@kornelski kornelski released this 11 Jun 16:16
· 804 commits to master since this release

Breaking changes

Breaking changes are in rarely used functionality, so we hope upgrade will be smooth for most users.

  • Browser: The .parse() method has been renamed to .serialize() to avoid inconsistency with NodeJS version (v1.8.3 supports .serialize() too)
  • Browser: Query string keys without a value used to be parsed as 'undefined', now their value is '' (empty string) (shura, Kornel Lesiński).
  • NodeJS: The redirect event is called after new query string and headers have been set and is allowed to override the request URL (Kornel Lesiński)
  • .then() returns a real Promise. Note that use of superagent with promises now requires a global Promise object.
    If you target Internet Explorer or Node 0.10, you'll need require('es6-promise').polyfill() or similar.
  • Upgraded all dependencies (Peter Lyons)
  • Renamed properties documented as @api private to have _prefixed names (Kornel Lesiński)

Probably not breaking changes:

  • Extracted common functions to request-base (Peter Lyons)
  • Fixed race condition in pipe tests (Peter Lyons)
  • Handle FormData error events (scriptype)
  • Fixed wrong jsdoc of Request#attach (George Chung)
  • Updated and improved tests (Peter Lyons)