Update dependency got to v11 [SECURITY] #81
  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:
^8.0.1->^11.0.0GitHub Vulnerability Alerts
CVE-2022-33987
The got package before 11.8.5 and 12.1.0 for Node.js allows a redirect to a UNIX socket.
Release Notes
sindresorhus/got (got)
v11.8.5Compare Source
861ccd9v11.8.3Compare Source
9463bb6HTTPErrormissing.codeproperty (#1739)0e167b8v11.8.2Compare Source
dnsCacheoption lazy (#1529)3bd245fThis slightly improves Got startup performance and fixes an issue with Jest.
v11.8.1Compare Source
4c815c3v11.8.0Compare Source
0onstat(#1488)7acd380beforeRetryallows stream body if different from original (#1501)3dd2273390b145v11.7.0Compare Source
Improvements
pfxHTTPS option (#1364)c33df7fbodyafterbeforeRequest(#1453)e1c18447bc69d9Fixes
88b32eapromise.json()c97ce7c52de13bv11.6.2Compare Source
Bug fixes
prefixUrloption from parent if it'sundefined(#1448)a3da70a29d4e32c126ff1Docs
2b352d3f248618RequestErrorlinks3ed4af6Tests
27470b5v11.6.1Compare Source
Fixes
options.porton redirect (#1439)408e22aMeta
5031843d12d6afv11.6.0Compare Source
Improvements
retrystream event (#1384)7072198http-cache-semanticsoptions2e2295fCancelErrorinheritRequestError1f132e8retryAftertoRetryObject643a305eaf1e02cacheOptionsproperty9c16d90Bug fixes
6e1aeaeDocs
f7bbc37CancelErrordocs28c400fREADME(#1425)38bbb04v11.5.2Compare Source
Docs
a3e171crequestmigration guide (#1387)a7483439a309bdBug fixes
e02845fdnsCache: truehaving no effect043c950v11.5.1Compare Source
Enhancements
http2-wrapperto1.0.0-beta.5.016e7f03f7a137961d6f61Bug fixes
2d966791ef053dDocs
readme.md4ebd26abd2d532c833939559526e4083347v11.5.0Compare Source
Improvements
backoffoption to pagination (#1182)4be7446b9a855d476c0268d697bcb51d836Fixes
676be6dac5f67dresponseevent not being emitted on cache verify request (#1305)da4769ef33e8bce1afe82aeb2e07Docs
beforeRequesthook779062a044767ev11.4.0Compare Source
934211f7dcd1455028c1104f3ea4The server aborted pending requestrejection728aef9ECONNRESETcode to an abort errord325d35prefixUrlnot working when theurlargument is empty8d3412asearchParamsoption4dbada98f775c7v11.3.0Compare Source
httpsoptions (#1304)c98f0d7cb4da8ddnsLookupIpVersionoption (#1264)7f643bbv11.2.0Compare Source
responseType(#1276)b9ba18abeforeRequesthook (#1293)d8c00cf2ccc4c2readyevent if the file descriptor is already opened (#1289)2c8fe19697de37v11.1.4Compare Source
3f125f1cacheable-lookupto 5.0.39770e5448bbb36options.rejectUnauthorizedin the documentation9b04963responseTypeset toundefined0e8582f6f84051got.paginate()an alias forgot.paginate.each()5480b31761b8e0decompress-responseto6.0.0c2bc014lolexto@sinonjs/fake-timers(#1270)df333ddcalculateDelaypromisable (#1266)3745efcv11.1.3Compare Source
request.abort()(#1242)ab338a7hostheader on redirect (#1241)8ff71d97dbb9ee91aa0acsearchParamsin merge (#1208)7d7361c886227047c1afe5131dc2v11.1.2Compare Source
Bug fixes
options.dnsCacheby default79507c2Enhancements
822bfa705ff878v11.1.1Compare Source
50ef99agot.mergeOptions()regression157e02b7b19e8foptions.responseTypeoptional when using a template9ed0a39v11.1.0Compare Source
pagination.stackAllItemsoption (#1214)c1208d1c127f5b278c421v11.0.3Compare Source
Fixes
4344c3ab927e2doptions.searchParamsduplicates429db40.abort()on a destroyed request63c1b72Docs
16ff82fcacheanddnsCachecan befalse7c5290dv11.0.2Compare Source
response.statusMessagebeing null965bd03http2-wrapperdependency to1.0.0-beta.4.44e8de8eMergeas it's stricter than the intersection operatord3b972e8501c69options.body835c70bv11.0.1Compare Source
Fixed two regressions:
HTTPErrors have unspecified response body (#1162)Improved TypeScript types for errors inherited from
RequestErrorv11.0.0Compare 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.netDue to the inconsistencies between the Electron's
netmodule and the Node.jshttpmodule, we have decided to officially drop support for it. Therefore, theuseElectronNetoption has been removed.You'll still be able to use Got in the Electron main process and in the renderer process through the
electron.remotemodule 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!
{ - _pagination: {...} + pagination: {...} }API
options.encodingbehavior 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).GotErrorhas been renamed toRequestErrorfor better readability and to comply with the documentation.agentoption now accepts only an object withhttp,httpsandhttp2properties.While the
httpandhttpsproperties accept nativehttp(s).Agentinstances, thehttp2property must be an instance ofhttp2wrapper.Agentor be undefined.{ - agent: new https.Agent({keepAlive: true}) } { + agent: { + http: new http.Agent({keepAlive: true}), + https: new https.Agent({keepAlive: true}), + http2: new http2wrapper.Agent() + } }dnsCacheoption is now set to a default instance ofCacheableLookup. It cannot be aMap-like instance anymore. The underlyingcacheable-lookuppackage has received many improvements, for example, it has receivedhostsfile support! Additionally, thecacheAdapteroption 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.{ - dnsCache: new CacheableLookup({ - cacheAdapter: new Map() - }) } { + dnsCache: new CacheableLookup({ + cache: new Keyv({ + cacheAdapter: new Map() + }) + }) } // Default: { dnsCache: new CacheableLookup() }inithooks will be converted to instances ofRequestError.RequestErrors provide much more useful information, for example, you can access the Got options (througherror.options), which is very useful when debugging.inithook may not have aurlproperty. To modify the request URL you should use abeforeRequesthook instead.{ hooks: { - init: [ + beforeRequest: [ options => { options.url = 'https://sindresorhus.com'; } ] } }Note that this example shows a simple use case. In more complicated algorithms, you need to split the
inithook into anotherinithook and abeforeRequesthook.error.requestproperty is no longer aClientRequestinstance. 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:
ResponseObjectResponseDefaultsInstanceDefaultsDefaultOptionsDefaultsDefaultRetryOptionsRequiredRetryOptionsGotOptionsOptionsGotRequestMethodGotRequestFunctionOther
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.
mergefunction is slow (#1016)error.codeinstead oferror.messageto compare errors (#981)inithook tobeforeErrorhook (#929)+in query strings (#1113)got.stream(...)(#1129)error.requesta Got stream (af0b147).Known bugs
timingsmay indicate that the request was successful although it failed.downloadProgressobject may show incorrect data.Bug fixes
beforeRequesthooks aren't called on redirects (#994)stream.pipeline(got.stream(...), ...)(#1026)cachealong with thebodyoption (#1021)got.mergeOptions(...)doesn't mergeURLSearchParamsinstances (#1011)authorizationheader is leaking (#1090)resolveBodyOnlyoption (#1140)beforeRetryhooks are missingoptions.context(#1141)promise.json()doesn't throwParseError(#1069)[email protected](#1131)cacheoption in a Got instance (#1098)cache(#1128)All changes
v10.7.0Compare Source
got.paginate(…)TypeScript typings (#1099)0b798eaallItemsandcurrentItemsto_pagination.paginate()(#1100)1cddd52decompress-responsewhen bundling (#1105)88f973f_pagination.transform(#1102)cf4fdadv10.6.0Compare Source
allowGetBodyoption to allow GET requests with payload (#1081)526b4bbv10.5.7Compare Source
acefaa4v10.5.6Compare Source
64aeb4032e609fv10.5.5Compare Source
1f363b9v10.5.4Compare Source
_paginationnot falling back to defaultsff1dba1v10.5.3Compare Source
518d95av10.5.2Compare Source
p-eventdependency8373112v10.5.1Compare Source
453a3a3v10.5.0Compare Source
761c7c6We're looking for feedback on how it works.
v10.4.0Compare Source
@szmarczak/cacheable-lookupdependencyd527daeParseErrors (#1044)2813b73got.stream(...)not throwingReadErrors1f6ca6bv10.3.0Compare Source
17d629afddecabGotRequestMethodTypeScript type (#1017)f02694eReadErrorTypeScript type (#1027)d222164v10.2.2Compare Source
requestoption in normalizedhttpoptions61009b3v10.2.1Compare Source
got.mergeOptions(...)can be assigned to defaults (#1008)1360a1burloption is mutually exclusive with theurlinput argumente0f8aabRetryObject['error']TypeScript types5008bf7@szmarczak/http-timerdependencya1b8ffcv10.2.0Compare Source
electron.netsupport (#995)b2f8aceelectron.remotemodule or if you use Node.js shims.hostnameis not presentdc53747Premature closeerrorsfa60b5fv10.1.0Compare Source
Enhancements
0569d45Fixes
content-lengthheader not being set when using customcontent-type3149340912c2e57bf92f4v10.0.4Compare Source
URLandURLSearchParamstypes (#983)cd4226dJust working around yet another TypeScript bug: DefinitelyTyped/DefinitelyTyped#34960
v10.0.3Compare Source
responseTypeoption (071bf5e)Premature closeandRequest timed outerrors (7b2ccb0)options.pathbackwards-compatible (b3f1ac9)v10.0.2Compare Source
URLandURLSearchParamsglobals (#969)2d5e28dgot.mergeOptions(...)TypeScript type (#953)b962d085a8f461v10.0.1Compare Source
jsonoption withgot.stream.post2ec5c4dv10.0.0Compare 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-agentandagentkeepaliveare not compatible with Node.js 10 and hence not compatible with Got as Got takes advantage of some Node.js 10-only APIs.Breaking
633651fstream.pipelinefor more reliable stream handling. Node.js 8 will be out of LTS at the end of this month anyway.urlargument92bc808queryoption tosearchParamsand make it stricterb2236635376216518f0f5window.fetchnaming in the browser.baseUrloption withprefixUrl(#829)0d534edurlargument now cannot be prefixed with a slash when this option is used.jsonoption to accept an object instead of a boolean and to only be responsible for the request, not the response (#704)a6a7d5abodyoption 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 theresponseTypeoption for that.{json: true}worked and they also complained that they could not set the request/response type individually.responseTypeoption instead ofencodingto get a Buffer (#940)6cc3d9f{encoding: null}to get a Buffer, but this was confusing. You now use{responseType: 'buffer'}instead.got(…).buffer();.POSTautomatically when specifyingbody(#756)e367bdbretries.retryoption was split intoretries.limitandretries.calculateDelayb15ce1dgot(…, { retry: { - retries: 2 + limit: 2 } });got(…, { retry: { - retries: iteration => iteration < 2 + calculateDelay: ({attemptCount}) => attemptCount < 2 } });undefinedinstead ofnullto omit a header (https://github.com/sindresorhus/got#headers)518f0f5null.got(…, { headers: { - 'user-agent': null + 'user-agent': undefined } });.fromCacheto.isFromCache(#768)b5e443bstreamoption toisStream518f0f5user-agentheader (#911)95bed1egot/9.6.0 (https://github.com/sindresorhus/got)→got (https://github.com/sindresorhus/got)user-agentheader anyway.got.create()518f0f5got.extend()now.got.mergeInstances()518f0f5gotInstance.extend(...gotInstances)instead..optionsand.responseproperty (#773)6eaa81b8eaef94got.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. 🙌
d5d2e6fcd12351contextoption for storing custom metadata across request and hooks (#777)3bb5aa7e9c01e0maxRedirectsoption (#914)0c505b0Configuration
📅 Schedule: Branch creation - "" (UTC), Automerge - At any time (no schedule defined).
🚦 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 was generated by Mend Renovate. View the repository job log.