create-test-server
create-test-server copied to clipboard
Update got to the latest version π
Version 9.0.0 of got was just published.
| Dependency | got |
|---|---|
| Current Version | 8.3.2 |
| Type | devDependency |
The version 9.0.0 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.
It might be worth looking into these changes and trying to get this project onto the latest version of got.
If you have a solid test suite and good coverage, a passing build is a strong indicator that you can take advantage of these changes directly by merging the proposed change into your project. If the build fails or you donβt have such unconditional trust in your tests, this branch is a great starting point for you to work on the update.
Release Notes
v9.0.0This is a huge release! Many new awesome features and we have pretty much fixed all the open issues regarding Got bugs on the issue tracker.
Breaking changes
- Requires Node.js 8.
You might ask, why not follow the Node.js LTS cycle and target Node.js 6. In short, async/await and WHATWG URL, which enabled us to considerably simplify the codebase and reduce the dependency-tree. Got v8 is a stable release and you can continue using that if you need to support Node.js 6. - The retry functionality was rewritten to improve its reliability and to support retrying on HTTP status codes. Previously, it only retried on some network failures. 98b5664
The option was renamed fromretriestoretryand it now accepts either a number of retries or an object with ability to specify number of retries, HTTP status codes and methods to retry on, and a function to decide how to retry. See the docs for more.
Migration:
-{ retries: 4 }β{ retry: 4 }
-{ retries: () => { β¦ } }β{ retry: { retries: () => { β¦ } } } - Renamed the
.canceledproperty to.isCanceled. 00fdeea - Dropped support for the
bodyoption being an Array whenform: true. dfe5b1c
The built-innew URLSearchParams()API doesn't support this either and it's a weird use-case. If you need support for this, just don't setform: trueand handle stringifying yourself.
Improvements
- Less dependencies!
- The
timeoutoption was rewritten to be more reliable and flexible. You can now set a timeout for every phase of the request if you want, or just for the whole request. That's up to you. da4f236 - Added
got.extend()which lets you easily create instances of Got with some options overriden. bc41a49 - Added
got.create()which is a more advanced and powerful version ofgot.extend(). With this API, you can create your own niche-specific instance of Got, for example, a HTTP-client for GitHub. bc41a49 - Added a
beforeRequesthook. 107756f - Added
requestandresponseevents to the Promise API. e86aad7 - The
content-lengthheader is now also automatically set if thebodyoption is set to afs.createReadStreaminstance. 6e7a455 - You can now remove the default
user-agentheader by passing in'user-agent': nullas a header. e473a26 - The
bodyoption can now be any kind of object, not just a plain object. 7a49ce7
Bug fixes
- Fixed a problem with the cache not working when using the
queryoption. 07a91cc - Less unhandled errors (Hopefully none!). f621184
- Headers are now correctly proxied when you pipe
got.stream(). 83bc44c - Lots of more bug fixesβ¦
Other
- 100% code coverage! Doing this caught a couple of bugs, so totally worth doing even if 100% doesn't mean bug-free.
- The codebase was greatly refactored for better readability and maintainability. b54b680
Team
Welcome @szmarczak and @brandon93s as maintainers
Special shoutout to @jstewmon for helping us with many of the above improvements and fixes
All changes
Commits
The new version differs by 74 commits ahead by 74, behind by 2.
3a145c09.0.0bf3c463Fix readme Highlights link toretryoptionba0cb0dUnify calculating content-length (#544)5c3adbaIncrease coverage (#543)10d22b7Increase coverage (#542)99dbd97Fix the behaviour of proxying headers4d92eb6Ignore JSON option when usinggot.stream()(#541)6ba9e68Fix the description of thenext()functionbf206caDon't recommend settinguser-agentto undefined80a02feUpdate readme links to Electron-related issuesaf5c3fdImprove merging options (#539)d369b08Makegot.mergeOptions()behavior more obvious and document its behavior (#538)6d654faDropESOCKETTIMEDOUTerrorda7f055Add timeout for secureConnect event for HTTPS requests (#536)9d87e9fDocumentTimeoutError
There are 74 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 :palm_tree:
Version 9.1.0 just got published.
Update to this version instead π
Release Notes
v9.1.0- Add ability to merge instances. (#510) f0b190a
- Normalize the URL in the
baseUrloption. (#579) c901c46 - Follow redirects with encoded URI. (#564) 3d98b9b
- Allow the
queryoption to be aURLSearchParamsinstance. (#565) b8a086f - Support retrying on 500 HTTP status code. a3e77de
- Bump
get-streamto 0.4.0 for improved handling of stream edge-cases. (#578) 45d3a60 - Normalize the casing of the
methodoption. (#547) ecf3180 - Fix the
agentoption withgot.extend(). (#577) 2ffcd49 - Fix throwing errors when using
got.stream(). (#550) ae5b114 - Ignore empty query objects. (#572) eb652f8
Commits
The new version differs by 24 commits.
1c54a039.1.0c901c46Normalize the URL in thebaseUrloption (#579)f241936Remove AppVeyor3d98b9bFollow redirects with encoded URI (#564)45d3a60Bumpget-streamto 0.4.0 (#578)2ffcd49Don't freeze any other values than plain objects and arrays (#577)a7cd35aTiny readme formatting tweakb8a086fAllow thequeryoption to be a URLSearchParams instance (#565)97533e5Fix AWS example in readme (#575)8f30f1fAdd note aboutglobal-tunnelpackageeb652f8Ignore empty query objects (#572)ca2675eUpgrade to [email protected]f30b623Mention browser and Electron support in the comparison table (#556)a3e77deSupport retrying on HTTP5002cdb3edFix a typo in the readme (#553)
There are 24 commits in total.
See the full diff
Version 9.2.0 just got published.
Update to this version instead π
Release Notes
v9.2.0- Experimental HTTP2 support. (#583) 8191daf
- Add
cookieJaroption. (#596) eedebc9 - Provide timings. (#590) 78a56ec
- Set
content-lengthheader to zero when doing a PUT request with no body. (#584) 9a966ec - Don't parse the
queryoption when it's a string. (#589) f23f350 - Document the
responseobject. (#592) 267cb66 - Fix Electron throwing
HTTP trailers are not supportederror. (#598) e66a6b6
Commits
The new version differs by 19 commits.
aec95d29.2.0f8af5b0Updatehttp-timerdependency to 1.1.0e66a6b6Fix Electron throwingHTTP trailers are not supportederror (#598)eedebc9AddcookieJaroption (#596)ab0d24bAdd "Bugs" to the comparsion table887f02dImprove code readabilitya8eb41bProper fix for #469 (#594)78a56ecProvide timings (#590)bb8175bCorrect the comparison table7910e14Unify calling mergeOptions488ac7eRemove redundant code21bef3cUpdate readme.md (#593)267cb66Document theresponseobject (#592)d0757daAdd tests for stripping port inhostheader (#591)dda1ce9Use correct package/module wording in the readme
There are 19 commits in total.
See the full diff
Version 9.2.1 just got published.
- The
devDependencygot was updated from8.3.2to9.2.2.
- The
devDependencygot was updated from8.3.2to9.3.0.
Update to this version instead π
Commits
The new version differs by 18 commits.
232e0f39.3.0c5bfad5Add npm release scriptb50d76cUpgrade dependenciesea41bdcChange the way to retry using the afterResponse hook (#647)5adfc27Improve docs for thequeryoption (#643)b392f60Allow defaults to be mutable (#645)180cbd5Add missing test for retrying using the afterResponse hook01e9cd8Move setting redirectUrls to request-as-event-emitter.js3a50d8bMentionnode-fetchNode.js stream API in comparison table (#644)325409cAdd more hooks (#640)af341caCode cleanup and bug fixes (#635)8d2e911Fixtunnelpackage reference in the docs (#627)25f18beSupport electron renderer timingsfbaaa2aRetry on a few more errorsfdc0fa6Includebodyproperty inHTTPError(#622)
There are 18 commits in total.
See the full diff
- The
devDependencygot was updated from8.3.2to9.3.1.
Update to this version instead π
Release Notes for v9.3.1
Commits
The new version differs by 6 commits.
50fdab39.3.1191e00aDon't override headers defined in theurlargument when it's an object (#633)311b184Don't set content-length header when uploadBodySize is null (#651)46c0951Document the.defaultsproperty (#649)84a9534Mention how to access the defaults3af3616Update docs according to the new defaults
See the full diff
- The
devDependencygot was updated from8.3.2to9.3.2.
Update to this version instead π
Release Notes for v9.3.2
- The
devDependencygot was updated from8.3.2to9.4.0.
Update to this version instead π
Release Notes for v9.4.0
Commits
The new version differs by 11 commits.
533d7e59.4.09f3a099Add ability to specify which network error codes to retry on (#660)33b838fAdd Got options onto responses and errors (#663)8848a7aAdd migration guides (#595)4a8722bMinor code style tweaksc8e358fClearsockettimeout on error (#659)3229448Create issue templates (#655)ef1494cRemove unnecessary check foroptions5367228Remove unnecessaryifblock64f0adcUpdate node-fetch in the readme comparison table (#658)7f18ef3Mention a few more Node errors when Got will retry
See the full diff
- The
devDependencygot was updated from8.3.2to9.5.0.
Update to this version instead π
Release Notes for v9.5.0
- The
devDependencygot was updated from8.3.2to9.5.1.
Update to this version instead π
Commits
The new version differs by 8 commits.
6ce603e9.5.1203dadcFix memory leak when using socket timeout and keepalive agent (#694)73428f9Addsuperagentto the comparison table (#691)d136e61Update dependencies877a6c1Remove badge labels from the Comparison section5653c1aAdd failing test for #687 (#688)8341fbaConsistent use of emphasis in readme (#684)0bb9fa6Fix 'Migration guides' json example
See the full diff
- The
devDependencygot was updated from8.3.2to9.6.0.
Update to this version instead π