-
Notifications
You must be signed in to change notification settings - Fork 1
Update got to the latest version 🚀 #50
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
base: master
Are you sure you want to change the base?
Conversation
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
🚨 Reminder! Less than one month left to migrate your repositories over to Snyk before Greenkeeper says goodbye on June 3rd! 💜 🚚💨 💚 Find out how to migrate to Snyk at greenkeeper.io
|
|
🚨 Reminder! Less than one month left to migrate your repositories over to Snyk before Greenkeeper says goodbye on June 3rd! 💜 🚚💨 💚 Find out how to migrate to Snyk at greenkeeper.io
|
|
🚨 Reminder! Less than one month left to migrate your repositories over to Snyk before Greenkeeper says goodbye on June 3rd! 💜 🚚💨 💚 Find out how to migrate to Snyk at greenkeeper.io
|
|
🚨 Reminder! Less than one month left to migrate your repositories over to Snyk before Greenkeeper says goodbye on June 3rd! 💜 🚚💨 💚 Find out how to migrate to Snyk at greenkeeper.io
|
|
🚨 Reminder! Less than one month left to migrate your repositories over to Snyk before Greenkeeper says goodbye on June 3rd! 💜 🚚💨 💚 Find out how to migrate to Snyk at greenkeeper.io
|
The devDependency got was updated from
9.6.0to10.0.0.This version is not covered by your current version range.
If you don’t accept this pull request, your project will work just like it did before. However, you might be missing out on a bunch of new features, fixes and/or performance improvements from the dependency update.
Publisher: sindresorhus
License: MIT
Release Notes for v10.0.0
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
stream.pipelinefor more reliable stream handling. Node.js 8 will be out of LTS at the end of this month anyway.urlargument 92bc808queryoption tosearchParamsand make it stricter b223663 5376216 518f0f5window.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) 6eaa81bgot.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. 🙌
contextoption for storing custom metadata across request and hooks (#777) 3bb5aa7maxRedirectsoption (#914) 0c505b0methodRewritingoption (#942) b82358ftough-cookiefor handling cookies (#882) 518f0f5beforeRedirecthook (#812) 3557896.isFromCacheproperty to the stream API (#768) b5e443btimeoutoption can now be modified in hooks d520a3aprefixUrloption can now be modified in hooks (#867) 518f0f5URLSearchParamsinstances mergeable (#734) 95c7c2cFixes
afterResponsehook (#775) e2054cdportnot being reset on redirect (#729) ada5861retryoption value when specifying a number (#809) 9c04a7cbeforeErrorhook 134c9b7204 No Contentwhen parsing response (#925) 518f0f5afterResponsehook should triggerbeforeRetryhook (#918) 518f0f5Docs
retrybehavior 5e6782aprefixUrlbehavior (#943) f008bc9retryoption doesn't work with streams 9088866Stream.pipeline()when using the stream API 06afb27global-agent(#822) ca8c560TimeoutError.timingsproperty 8fa18f4All commits
v9.6.0...v10.0.0
Commits
The new version differs by 163 commits.
abdfee210.0.0aae7b89Improve readme71b8452Improve types (#946)f008bc9ClarifyprefixUrlbehavior (#943)d968e49Upgrade dependenciesb82358fAddmethodRewritingoption (#942)966e7ff10.0.0-beta.2c537deeMake TypeScript types conforms to strict mode (#928)d9a3273Clarifyretrybehavior (#944)6cc3d9fUseresponseTypeinstead ofoptions.encodingto get a Buffer (#940)3acdb69Update a commentd0f2dfdMention thatprogress.totalcan beundefined8874a45Preserve stacktrace when wrapping errors (#935)b7a356aFix.json()usage inreadme.md2c5d0c0Follow-up to cd11a5092972c16e5295f4d13dee20c228dcb19cThere are 163 commits in total.
See the full diff
FAQ and help
There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.
Your Greenkeeper bot 🌴