github sindresorhus/got v10.0.0-beta.1

latest releases: v14.2.1, v14.2.0, v14.1.0...
pre-release4 years ago

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) 518f0f5
  • Rename the stream option to isStream 518f0f5
  • 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() 518f0f5
    • You can achieve the same thing with got.extend() now.
  • Remove got.mergeInstances() 518f0f5
    • Use gotInstance.extend(...gotInstances) instead.
  • Use undefined instead of null to omit a header (https://github.com/sindresorhus/got#headers) 518f0f5

Enhancements

Fixes

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

Docs

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

v10.0.0-alpha.3...v10.0.0-beta.1

Don't miss a new got release

NewReleases is sending notifications on new releases.