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), usegot.stream(โฆ).setEncoding(encoding)
instead (to prevent confusion). - ๐ Renamed
GotError
toRequestError
. options.agent
can no longer be an instance ofhttp.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 toRequestError
s (why:RequestError
provides much more useful information (e.g. Got options) than the usual TypeError etc.).options._pagination
has been renamed tooptions.pagination
.The
options.url
property will no longer be visible ininit
hooks (design limitation).The
error.request
property is no longer aClientRequest
instance. Instead, it gives a Got stream.
Types
- ๐ The
ResponseObject
type has been merged into theResponse
type. - 0๏ธโฃ Renamed the
Defaults
type toInstanceDefaults
. - 0๏ธโฃ Renamed the
DefaultOptions
type toDefaults
. - 0๏ธโฃ Renamed the
DefaultRetryOptions
type toRequiredRetryOptions
. - ๐ Renamed the
GotOptions
type toOptions
. - ๐ Renamed the
GotRequestMethod
type toGotRequestFunction
.
โจ 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
- Errors now have a
request
property (it's a Got stream).
Known bugs
- The
timings
indicate that the request was successful (even though it errored). - 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
- โช