This repository has been archived by the owner on Oct 5, 2022. It is now read-only.
Update dependency got to v11 - autoclosed #145
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR contains the following updates:
^9.6.0
->^11.0.0
Release Notes
sindresorhus/got
v11.8.3
Compare Source
9463bb6
HTTPError
missing.code
property (#1739)0e167b8
v11.8.2
Compare Source
dnsCache
option lazy (#1529)3bd245f
This slightly improves Got startup performance and fixes an issue with Jest.
v11.8.1
Compare Source
4c815c3
v11.8.0
Compare Source
0
onstat
(#1488)7acd380
beforeRetry
allows stream body if different from original (#1501)3dd2273
390b145
v11.7.0
Compare Source
Improvements
pfx
HTTPS option (#1364)c33df7f
body
afterbeforeRequest
(#1453)e1c1844
7bc69d9
Fixes
88b32ea
promise.json()
c97ce7c
52de13b
v11.6.2
Compare Source
Bug fixes
prefixUrl
option from parent if it'sundefined
(#1448)a3da70a
29d4e32
c126ff1
Docs
2b352d3
f248618
RequestError
links3ed4af6
Tests
27470b5
v11.6.1
Compare Source
Fixes
options.port
on redirect (#1439)408e22a
Meta
5031843
d12d6af
v11.6.0
Compare Source
Improvements
retry
stream event (#1384)7072198
http-cache-semantics
options2e2295f
CancelError
inheritRequestError
1f132e8
retryAfter
toRetryObject
643a305
eaf1e02
cacheOptions
property9c16d90
Bug fixes
6e1aeae
Docs
f7bbc37
CancelError
docs28c400f
README
(#1425)38bbb04
v11.5.2
Compare Source
Docs
a3e171c
request
migration guide (#1387)a748343
9a309bd
Bug fixes
e02845f
dnsCache: true
having no effect043c950
v11.5.1
Compare Source
Enhancements
http2-wrapper
to1.0.0-beta.5.0
16e7f03
f7a1379
61d6f61
Bug fixes
2d96679
1ef053d
Docs
readme.md
4ebd26a
bd2d532
c833939
559526e
4083347
v11.5.0
Compare Source
Improvements
backoff
option to pagination (#1182)4be7446
b9a855d
476c026
8d697bc
b51d836
Fixes
676be6d
ac5f67d
response
event not being emitted on cache verify request (#1305)da4769e
f33e8bc
e1afe82
aeb2e07
Docs
beforeRequest
hook779062a
044767e
v11.4.0
Compare Source
934211f
7dcd145
5028c11
04f3ea4
The server aborted pending request
rejection728aef9
ECONNRESET
code to an abort errord325d35
prefixUrl
not working when theurl
argument is empty8d3412a
searchParams
option4dbada9
8f775c7
v11.3.0
Compare Source
https
options (#1304)c98f0d7
cb4da8d
dnsLookupIpVersion
option (#1264)7f643bb
v11.2.0
Compare Source
responseType
(#1276)b9ba18a
beforeRequest
hook (#1293)d8c00cf
2ccc4c2
ready
event if the file descriptor is already opened (#1289)2c8fe19
697de37
v11.1.4
Compare Source
3f125f1
cacheable-lookup
to 5.0.39770e54
48bbb36
options.rejectUnauthorized
in the documentation9b04963
responseType
set toundefined
0e8582f
6f84051
got.paginate()
an alias forgot.paginate.each()
5480b31
761b8e0
decompress-response
to6.0.0
c2bc014
lolex
to@sinonjs/fake-timers
(#1270)df333dd
calculateDelay
promisable (#1266)3745efc
v11.1.3
Compare Source
request.abort()
(#1242)ab338a7
host
header on redirect (#1241)8ff71d9
7dbb9ee
91aa0ac
searchParams
in merge (#1208)7d7361c
8862270
47c1afe
5131dc2
v11.1.2
Compare Source
Bug fixes
options.dnsCache
by default79507c2
Enhancements
822bfa7
05ff878
v11.1.1
Compare Source
50ef99a
got.mergeOptions()
regression157e02b
7b19e8f
options.responseType
optional when using a template9ed0a39
v11.1.0
Compare Source
pagination.stackAllItems
option (#1214)c1208d1
c127f5b
278c421
v11.0.3
Compare Source
Fixes
4344c3a
b927e2d
options.searchParams
duplicates429db40
.abort()
on a destroyed request63c1b72
Docs
16ff82f
cache
anddnsCache
can befalse
7c5290d
v11.0.2
Compare Source
response.statusMessage
being null965bd03
http2-wrapper
dependency to1.0.0-beta.4.4
4e8de8e
Merge
as it's stricter than the intersection operatord3b972e
8501c69
options.body
835c70b
v11.0.1
Compare Source
Fixed two regressions:
HTTPError
s have unspecified response body (#1162)Improved TypeScript types for errors inherited from
RequestError
v11.0.0
Compare Source
Introducing Got 11! 🎉 The last major version was in December last year. ❄️ Since then, a huge amount of bugs has been fixed. There are also many new features, for example, HTTP2 support is finally live! 🌐
If you find Got useful, you might want to sponsor the Got maintainers.
Breaking changes
Removed support for
electron.net
Due to the inconsistencies between the Electron's
net
module and the Node.jshttp
module, we have decided to officially drop support for it. Therefore, theuseElectronNet
option has been removed.You'll still be able to use Got in the Electron main process and in the renderer process through the
electron.remote
module or if you use Node.js shims.The Pagination API is now stable
We haven't seen any bugs yet, so please give it a try!
If you want to leave some feedback, you can do it here. Any suggestion is greatly appreciated!
API
options.encoding
behavior has been reverted back to the Got 9 behavior.In other words, the options is only meant for the Got promise API.
To set the encoding for streams, simply call
stream.setEncoding(encoding)
.GotError
has been renamed toRequestError
for better readability and to comply with the documentation.agent
option now accepts only an object withhttp
,https
andhttp2
properties.While the
http
andhttps
properties accept nativehttp(s).Agent
instances, thehttp2
property must be an instance ofhttp2wrapper.Agent
or be undefined.dnsCache
option is now set to a default instance ofCacheableLookup
. It cannot be aMap
-like instance anymore. The underlyingcacheable-lookup
package has received many improvements, for example, it has receivedhosts
file support! Additionally, thecacheAdapter
option has been renamed tocache
. Note that it's no longer passed to Keyv, so you need to pass a Keyv instance it if you want to save the data for later.init
hooks will be converted to instances ofRequestError
.RequestError
s provide much more useful information, for example, you can access the Got options (througherror.options
), which is very useful when debugging.init
hook may not have aurl
property. To modify the request URL you should use abeforeRequest
hook instead.Note that this example shows a simple use case. In more complicated algorithms, you need to split the
init
hook into anotherinit
hook and abeforeRequest
hook.error.request
property is no longer aClientRequest
instance. Instead, it gives a Got stream, which provides a set of useful properties.Renamed TypeScript types
Some of the TypeScript types have been renamed to improve the readability:
ResponseObject
Response
Defaults
InstanceDefaults
DefaultOptions
Defaults
DefaultRetryOptions
RequiredRetryOptions
GotOptions
Options
GotRequestMethod
GotRequestFunction
Enhancements
HTTP2 support is here! Excited? Yay! Unfortunately, it's off by default to make the migration smoother. Many Got users have set up their own Agents and we didn't want to break them. But fear no more, it will come enabled by default in Got 12.
merge
function is slow (#1016)error.code
instead oferror.message
to compare errors (#981)init
hook tobeforeError
hook (#929)+
in query strings (#1113)got.stream(...)
(#1129)error.request
a Got stream (af0b147
).Known bugs
timings
may indicate that the request was successful although it failed.downloadProgress
object may show incorrect data.Bug fixes
beforeRequest
hooks aren't called on redirects (#994)stream.pipeline(got.stream(...), ...)
(#1026)cache
along with thebody
option (#1021)got.mergeOptions(...)
doesn't mergeURLSearchParams
instances (#1011)authorization
header is leaking (#1090)resolveBodyOnly
option (#1140)beforeRetry
hooks are missingoptions.context
(#1141)promise.json()
doesn't throwParseError
(#1069)[email protected]
(#1131)cache
option in a Got instance (#1098)cache
(#1128)All changes
v10.7.0
Compare Source
got.paginate(…)
TypeScript typings (#1099)0b798ea
allItems
andcurrentItems
to_pagination.paginate()
(#1100)1cddd52
decompress-response
when bundling (#1105)88f973f
_pagination.transform
(#1102)cf4fdad
v10.6.0
Compare Source
allowGetBody
option to allow GET requests with payload (#1081)526b4bb
v10.5.7
Compare Source
acefaa4
v10.5.6
Compare Source
64aeb40
32e609f
v10.5.5
Compare Source
1f363b9
v10.5.4
Compare Source
_pagination
not falling back to defaultsff1dba1
v10.5.3
Compare Source
518d95a
v10.5.2
Compare Source
p-event
dependency8373112
v10.5.1
Compare Source
453a3a3
v10.5.0
Compare Source
761c7c6
We're looking for feedback on how it works.
v10.4.0
Compare Source
@szmarczak/cacheable-lookup
dependencyd527dae
ParseError
s (#1044)2813b73
got.stream(...)
not throwingReadError
s1f6ca6b
v10.3.0
Compare Source
17d629a
fddecab
GotRequestMethod
TypeScript type (#1017)f02694e
ReadError
TypeScript type (#1027)d222164
v10.2.2
Compare Source
request
option in normalizedhttp
options61009b3
v10.2.1
Compare Source
got.mergeOptions(...)
can be assigned to defaults (#1008)1360a1b
url
option is mutually exclusive with theurl
input argumente0f8aab
RetryObject['error']
TypeScript types5008bf7
@szmarczak/http-timer
dependencya1b8ffc
v10.2.0
Compare Source
electron.net
support (#995)b2f8ace
electron.remote
module or if you use Node.js shims.hostname
is not presentdc53747
Premature close
errorsfa60b5f
v10.1.0
Compare Source
Enhancements
0569d45
Fixes
content-length
header not being set when using customcontent-type
3149340
912c2e5
7bf92f4
v10.0.4
Compare Source
URL
andURLSearchParams
types (#983)cd4226d
Just working around yet another TypeScript bug: [node] Missing global URL and URLSearchParams typings DefinitelyTyped/DefinitelyTyped#34960
v10.0.3
Compare Source
responseType
option (071bf5e
)Premature close
andRequest timed out
errors (7b2ccb0
)options.path
backwards-compatible (b3f1ac9
)v10.0.2
Compare Source
URL
andURLSearchParams
globals (#969)2d5e28d
got.mergeOptions(...)
TypeScript type (#953)b962d08
5a8f461
v10.0.1
Compare Source
json
option withgot.stream.post
2ec5c4d
v10.0.0
Compare Source
We're excited to announce Got 10! 🎉 This release has been in the works for almost a year and has been a major undertaking. Got was fully rewritten in TypeScript, which helped us catch many bugs and will give us more confidence in the codebase going forward. Got is now faster and much more stable. We also fixed a huge amount of bugs. Big thanks to everyone that helped make this release possible. 🙌
If you find Got useful, you might want to sponsor the Got maintainers.
Note: Some HTTP agents like
https-proxy-agent
andagentkeepalive
are not compatible with Node.js 10 and hence not compatible with Got as Got takes advantage of some Node.js 10-only APIs.Breaking
633651f
stream.pipeline
for more reliable stream handling. Node.js 8 will be out of LTS at the end of this month anyway.url
argument92bc808
query
option tosearchParams
and make it stricterb223663
5376216
518f0f5
window.fetch
naming in the browser.baseUrl
option withprefixUrl
(#829)0d534ed
url
argument now cannot be prefixed with a slash when this option is used.json
option to accept an object instead of a boolean and to only be responsible for the request, not the response (#704)a6a7d5a
body
option when you want to send JSON. This option also no longer sets the response type to JSON. You either call the.json()
method or specify theresponseType
option for that.{json: true}
worked and they also complained that they could not set the request/response type individually.responseType
option instead ofencoding
to get a Buffer (#940)6cc3d9f
{encoding: null}
to get a Buffer, but this was confusing. You now use{responseType: 'buffer'}
instead.got(…).buffer();
.POST
automatically when specifyingbody
(#756)e367bdb
retries.retry
option was split intoretries.limit
andretries.calculateDelay
b15ce1d
undefined
instead ofnull
to omit a header (https://github.com/sindresorhus/got#headers)518f0f5
null
..fromCache
to.isFromCache
(#768)b5e443b
stream
option toisStream
518f0f5
user-agent
header (#911)95bed1e
got/9.6.0 (https://github.com/sindresorhus/got)
→got (https://github.com/sindresorhus/got)
user-agent
header anyway.got.create()
518f0f5
got.extend()
now.got.mergeInstances()
518f0f5
gotInstance.extend(...gotInstances)
instead..options
and.response
property (#773)6eaa81b
8eaef94
got.mergeInstances(...instances)
is deprecated. UseinstanceA.extend(instanceB)
instead.Enhancements
Huge thanks to @pmmmwh, @LinusU, @vladfrangu, @mastermatt, and everyone else that helped us with this rewrite. 🙌
d5d2e6f
cd12351
context
option for storing custom metadata across request and hooks (#777)3bb5aa7
e9c01e0
maxRedirects
option (#914)0c505b0
b7ead5f
methodRewriting
option (#942)b82358f
tough-cookie
for handling cookies (#882)518f0f5
8874a45
00e5fd5
beforeRedirect
hook (#812)3557896
92b1005
.isFromCache
property to the stream API (#768)b5e443b
timeout
option can now be modified in hooksd520a3a
prefixUrl
option can now be modified in hooks (https://github.com/sindresorhus/got/issues/867)518f0f5
URLSearchParams
instances mergeable (#734)95c7c2c
Fixes
afterResponse
hook (#775)e2054cd
port
not being reset on redirect (#729)ada5861
0501e00
retry
option value when specifying a number (#809)9c04a7c
beforeError
hook134c9b7
4faf5c7
b0dfc95
518f0f5
204 No Content
when parsing response (#925)518f0f5
518f0f5
afterResponse
hook should triggerbeforeRetry
hook (#918)518f0f5
518f0f5
518f0f5
cd11a50
Docs
retry
behavior5e6782a
prefixUrl
behavior ([#943](https:Configuration
📅 Schedule: "every weekday" (UTC).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR has been generated by WhiteSource Renovate. View repository job log here.