-
Notifications
You must be signed in to change notification settings - Fork 67
chore(deps): update dependency got to v14 #1282
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
renovate
wants to merge
1
commit into
main
Choose a base branch
from
renovate/got-14.x
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
✅ Deploy Preview for netlify-plugins ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
e50107e to
b02040e
Compare
b02040e to
8d48147
Compare
8d48147 to
f18abd2
Compare
f18abd2 to
69d1d78
Compare
69d1d78 to
872b705
Compare
872b705 to
3d487d9
Compare
3d487d9 to
be94158
Compare
be94158 to
9fe6ebb
Compare
9fe6ebb to
739b99c
Compare
739b99c to
4f04633
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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:
^11.8.0->^14.0.0Release Notes
sindresorhus/got (got)
v14.4.9Compare Source
content-encodingheaders but no bodycc434bcv14.4.8Compare Source
request.optionsinafterResponsehookdad6a91v14.4.7Compare Source
06029e0v14.4.6Compare Source
7a92064v14.4.5Compare Source
c079b93v14.4.4Compare Source
AbortSignal#timeout()(#2388)92b378ev14.4.3Compare Source
f2f8cb2v14.4.2Compare Source
f44ef43v14.4.1Compare Source
dfc54d9v14.4.0Compare Source
15ca4a0v14.3.0Compare Source
dbab6c3v14.2.1Compare Source
c81a611v14.2.0Compare Source
causeproperty with the original error toRequestError(#2327)4cbd01dv14.1.0Compare Source
RequestErrorresponse (#2325)5e4f6ffv14.0.0Compare Source
Breaking
a004263Improvements
followRedirectoption accept a function (#2306)7c3f147v13.0.0Compare Source
As a reminder, Got continues to require ESM. For TypeScript users, this includes having
"module": "node16", "moduleResolution": "node16"in your tsconfig.Breaking
52a1063enableUnixSocketsoption to befalseby default852c312Improvements
undefinedfor options (#2258)1cefe8bv12.6.1Compare Source
get-streamimport statement (#2266)67d5039v12.6.0Compare Source
88c88fb979272e0ca0b7fv12.5.3Compare Source
3cc40b5v12.5.2Compare Source
39f83b6v12.5.1Compare Source
3b3ea673e9d3afv12.5.0Compare Source
e049e948630815f0ac0b34c3762av12.4.1Compare Source
Fixes
options.contextbeing not extensibleb671480uploadProgressafter promise cancelation693de21v12.4.0Compare Source
Improvements
850773cFixes
beforeErrorhooks withHTTPErrorif thethrowHttpErrorsoption isfalse(#2104)3927348v12.3.1Compare Source
43b1467v12.3.0Compare Source
.off()method for events (#2092)88056bev12.2.0Compare Source
AbortController(#2020)6a6d2a9enableUnixSocketsoption (#2062)461b3d4v12.1.0Compare Source
Improvements
response.ok(#2043)22d58fb{throwHttpErrors: false}Fixes
861ccd9v12.0.4Compare Source
bb8eca9v12.0.3Compare Source
jsonoption (#2015)eb045bfv12.0.2Compare Source
encodingoption with{responseType: 'json'}(#1996)0703318v12.0.1Compare Source
nockcompatibility (#1959)bf39d2cRequestTypeScript type (#1940)0f9f2b8v12.0.0Compare Source
Introducing Got v12.0.0 🎉
Long time no see! The latest Got version (v11.8.2) was released just in February ❄️
We have been working hard on squashing bugs and improving overall experience.
If you find Got useful, you might want to sponsor the Got maintainers.
This package is now pure ESM
Please read this. Also see #1789.
[ERR_REQUIRE_ESM]andMust use import to load ES Moduleerrors. This is a problem with your setup, not Got.Required Node.js >=14
While working with streams, we encountered more Node.js bugs that needed workarounds.
In order to keep our code clean, we had to drop Node.js v12 as the code would get more messy.
We strongly recommend that you update Node.js to v14 LTS.
HTTP/2 support
Every Node.js release, the native
http2module gets more stable.Unfortunately there are still some issues on the Node.js side, so we decided to keep HTTP/2 disabled for now.
We may enable it by default in Got v13. It is still possible to turn it on via the
http2option.To run HTTP/2 requests, it is required to use Node.js v15.10 or above.
Bug fixes
Woah, we possibly couldn't make a release if we didn't fix some bugs!
49c16eecontent-lengthon ReadStream (#1510)472b8efff918fb1107cc6methodRewritingoption51d88a0urlnot being reused on retry in rare case (#1487)462bc63a59fac477df9c362305d706a2d3d1e1e506response.completewhen using cache9e15d88Cannot call enderror whenrequestreturns aWritable226cc393c23eea3c23eeagot.paginate does not call init hooks(#1574)3c23eeahttpsmodule (#1567)3c23eea9ecc5eesearchParams(#1814)1018c20732e9bd2453e5e439fb82eda69ffusernameandpasswordencoding in URL (#1169 #1317)d65d0ca1c4cefcafterResponsereturn checkcbc8902https.alpnProtocolsnot having an effecte1099fbImprovements
contextoption mergeable (#1459)2b8ed1f6fc04a9e943672(blocked by nodejs/node#35923)267504611203704f21eb3retry.backoffLimitoption41c4136noiseretry optione83007783575d5fe723a0(thanks @Giotino)error.codef27e8d3options.urleven if some options are invalid8d6a6802db5ec5854430f3df52f3oncetypes for Stream API3c23eeaRetryErrorwhich always triggers a new retry when thrown3c23eeaerror.optionsis now enumerable3c23eeadefaults.handlersdon't need a default handler now3c23eeaLinkheader3c23eeaa5dd9aaBreaking changes
Improved option normalization
Optionclass that is specifically designed to parse and validate Got options.It is made of setters and getters that provide fast normalization and more consistent behavior.
When passing an option does not exist, Got will throw an error. In order to retrieve the options before the error, use
error.options.inithook now accepts a second argument:self, which points to anOptionsinstance.In order to define your own options, you have to move them to
options.contextin aninithook or store them inoptions.contextdirectly.inithooks are ran only when passing an options object explicitly.options.merge()replacedgot.mergeOptionsandRequest.normalizeArgumentsThis fixes issues like #1450
Urlinstances are not supported anymore. You need to use WHATWG URL instead.dnsLookupIpVersionis now a number (4 or 6) or undefinedredirectUrlsandrequestUrlnow give URL instancesrequest.abortedtorequest.isAbortedReason: consistency with
options.isStream.lookupoption todnsLookupbeforeRetryhook now accepts only two arguments:errorandretryCountawait got('https://example.com', { hooks: { beforeRetry: [ - (options, error, retryCount) => { - console.log(options, error, retryCount); - } + (error, retryCount) => { + console.log(error.options, error, retryCount); + } ] } })The
optionsargument has been removed, however it's still accessible viaerror.options. All modifications onerror.optionswill be reflected in the next requests (no behavior change, same as with Got 11).beforeRedirecthook's first argument (options) is now a cloned instance of the Request options.This was done to make retrieving the original options possible:
plainResponse.request.options.await got('http://szmarczak.com', { hooks: { beforeRedirect: [ (options, response) => { - console.log(options === response.request.options); //=> true [invalid! our original options were overriden] + console.log(options === response.request.options); //=> false [we can access the original options now] } ] } })redirectevent now takes two arguments in this order:updatedOptionsandplainResponse.Reason: consistency with the
beforeRedirecthook.socketPathoption has been removed. Use theunix:protocol instead.retryWithMergedOptionsfunction in anafterResponsehook no longer returns aPromise.It now throws
RetryError, so this should this should be the last function being executed.This was done to allow
beforeRetryhooks getting called.options.agenttofalse.To do so, you need to define all the
options.agentproperties:http,httpsandhttp2.await got('https://example.com', { - agent: false + agent: { + http: false, + https: false, + http2: false + } })urloption when paginating, it now needs to be an absolute URL - theprefixUrloption is always reset from now on. The same when retrying in anafterResponsehook.There was confusion around the
prefixUrloption. It was counterintuitive if used with the Pagination API. For example, it worked fine if the server replied with a relative URL, but if it was an absolute URL then theprefixUrlwould end up duplicated. In order to fix this, Got now requires an absolute URL - noprefixUrlwill be applied.got.extend(…)will throw when passing some options that don't accept undefined - undefined no longer retains the old value, as setting undefined explicitly may reset the optionDocumentation
We have redesigned the documentation so it's easier to navigate and find exactly what you are looking for. We hope you like it ❤️
Configuration
📅 Schedule: Branch creation - Between 12:00 AM and 03:59 AM, only on Monday ( * 0-3 * * 1 ) (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.