got v11.0.0-beta.1 Release Notes

Release Date: 2020-04-12 // about 4 years ago
  • $ npm install [email protected]
    

    ๐Ÿš€ The release notes will be improved in the final v11 release.

    ๐Ÿ”„ Changes in beta 1:

    ๐Ÿ’ฅ Breaking

    API
    • โช options.encoding will no longer affect streams (reverting back to the Got 9 behavior), use got.stream(โ€ฆ).setEncoding(encoding) instead (to prevent confusion).
    • ๐Ÿ“‡ Renamed GotError to RequestError.
    • options.agent can no longer be an instance of http.Agent. Instead you need to pass:

      { http: new http.Agent(โ€ฆ), https: new https.Agent(โ€ฆ), http2: new http2wrapper.Agent(โ€ฆ) }

    • ๐Ÿ‘€ The deprecated useElectronNet option has been removed.

    • 0๏ธโƒฃ dnsCache is now enabled by default.

    • dnsCache no longer can be a Map or a Keyv instance, instead you need to pass a CacheableLookup instance.

    • Errors thrown in init hooks will be converted to RequestErrors (why: RequestError provides much more useful information (e.g. Got options) than the usual TypeError etc.).

    • options._pagination has been renamed to options.pagination.

    • The options.url property will no longer be visible in init hooks (design limitation).

    • The error.request property is no longer a ClientRequest instance. Instead, it gives a Got stream.

    Types
    • ๐Ÿ”€ The ResponseObject type has been merged into the Response type.
    • 0๏ธโƒฃ Renamed the Defaults type to InstanceDefaults.
    • 0๏ธโƒฃ Renamed the DefaultOptions type to Defaults.
    • 0๏ธโƒฃ Renamed the DefaultRetryOptions type to RequiredRetryOptions.
    • ๐Ÿ“‡ Renamed the GotOptions type to Options.
    • ๐Ÿ“‡ Renamed the GotRequestMethod type to GotRequestFunction.

    โœจ Enhancements

    ๐Ÿ›  1. Fixes #1016 ๐Ÿ›  2. Fixes #981 ๐Ÿ›  3. Fixes #932 ๐Ÿ›  4. Fixes #929 ๐Ÿ›  5. Fixes #1058 ๐Ÿ›  6. Fixes #167 ๐Ÿ›  7. Fixes #1138 ๐Ÿ›  8. Fixes #1113 ๐Ÿ›  9. Fixes #1129

    1. Errors now have a request property (it's a Got stream).

    Known bugs

    1. The timings indicate that the request was successful (even though it errored).
    2. The downloadProgress object may show incorrect data if the request has errored.

    ๐Ÿ› Bug fixes

    ๐Ÿ›  1. Fixes #1036 ๐Ÿ›  2. Fixes #994 ๐Ÿ›  3. Fixes #1026 ๐Ÿ›  4. Fixes #1021 ๐Ÿ›  5. Fixes #1057 ๐Ÿ›  6. Fixes #1050 ๐Ÿ›  7. Fixes #954 ๐Ÿ›  8. Fixes #1011 ๐Ÿ›  9. Fixes #1090 ๐Ÿ›  10. Fixes #1140 ๐Ÿ›  11. Fixes #1118

    v10.7.0...v11.0.0-beta.1