github sindresorhus/got v10.0.0-beta.1

While this is an beta release, the code is well-tested and fairly stable. We encourage you to test it out and report any issues.

$ npm install got@10.0.0-beta.1

Make sure you also read the alpha.1, alpha.2, and alpha.3 release notes.

Changes in beta 1:

Breaking

  • Remove the query option in favor of the searchParams option (It was previously deprecated) 518f0f5906e1fcd38691555b17fb91db643f3d47
  • Rename the stream option to isStream 518f0f5906e1fcd38691555b17fb91db643f3d47
  • Don't include the Got version in the default user-agent header (#911) 95bed1e
    • got/9.6.0 (https://github.com/sindresorhus/got)got (https://github.com/sindresorhus/got)
    • Why: Importing package.json to get the version caused a lot of problems.
  • Remove got.create() 518f0f5906e1fcd38691555b17fb91db643f3d47
    • You can achieve the same thing with got.extend() now.
  • Remove got.mergeInstances() 518f0f5906e1fcd38691555b17fb91db643f3d47
    • Use gotInstance.extend(...gotInstances) instead.
  • Use undefined instead of null to omit a header (https://github.com/sindresorhus/got#headers) 518f0f5906e1fcd38691555b17fb91db643f3d47

Enhancements

  • Add maxRedirects option (#914) 0c505b0
  • Add ability to use something other than tough-cookie for handling cookies (#882) 518f0f5906e1fcd38691555b17fb91db643f3d47
  • Allow method rewriting on redirects (#913) b7ead5f
  • options.timeout can now be modified in hooks d520a3a
  • options.prefixUrl can now be modified in hooks (https://github.com/sindresorhus/got/issues/867) 518f0f5906e1fcd38691555b17fb91db643f3d47
  • Only allow supported event names when using TypeScript (#877) 518f0f5906e1fcd38691555b17fb91db643f3d47

Fixes

  • Fix Node.js 13 compatibility (#915) b0dfc95
  • Fix memory leak when using cache feature (#792) 518f0f5906e1fcd38691555b17fb91db643f3d47
  • Don't throw on 204 No Content when parsing response (#925) 518f0f5906e1fcd38691555b17fb91db643f3d47
  • When redirect fails, don't retry from scratch (#930) 518f0f5906e1fcd38691555b17fb91db643f3d47
  • Retrying inside afterResponse hook should trigger beforeRetry hook (#918) 518f0f5906e1fcd38691555b17fb91db643f3d47
  • Fix a bug that sometimes caused the Node process to hang 518f0f5906e1fcd38691555b17fb91db643f3d47
  • Fix a bug where cookies weren't reset on redirect between two different sites 518f0f5906e1fcd38691555b17fb91db643f3d47

Docs

  • Clarify retry behavior 5e6782a
  • Mention how to abort the request using hooks 96ea75f

https://github.com/sindresorhus/got/compare/v10.0.0-alpha.3...v10.0.0-beta.1

latest releases: v11.7.0, v11.6.2, v11.6.1...
pre-release20 months ago