Skip to content
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

Update got to the latest version 🚀 #26

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

greenkeeper[bot]
Copy link

@greenkeeper greenkeeper bot commented Aug 4, 2018

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.0

This 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 from retries to retry and 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 .canceled property to .isCanceled. 00fdeea
  • Dropped support for the body option being an Array when form: true. dfe5b1c
    The built-in new URLSearchParams() API doesn't support this either and it's a weird use-case. If you need support for this, just don't set form: true and handle stringifying yourself.

Improvements

  • Less dependencies!
  • The timeout option 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 of got.extend(). With this API, you can create your own niche-specific instance of Got, for example, a HTTP-client for GitHub. bc41a49
  • Added a beforeRequest hook. 107756f
  • Added request and response events to the Promise API. e86aad7
  • The content-length header is now also automatically set if the body option is set to a fs.createReadStream instance. 6e7a455
  • You can now remove the default user-agent header by passing in 'user-agent': null as a header. e473a26
  • The body option 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 query option. 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

v8.3.2...v9.0.0

Commits

The new version differs by 74 commits ahead by 74, behind by 2.

  • 3a145c0 9.0.0
  • bf3c463 Fix readme Highlights link to retry option
  • ba0cb0d Unify calculating content-length (#544)
  • 5c3adba Increase coverage (#543)
  • 10d22b7 Increase coverage (#542)
  • 99dbd97 Fix the behaviour of proxying headers
  • 4d92eb6 Ignore JSON option when using got.stream() (#541)
  • 6ba9e68 Fix the description of the next() function
  • bf206ca Don't recommend setting user-agent to undefined
  • 80a02fe Update readme links to Electron-related issues
  • af5c3fd Improve merging options (#539)
  • d369b08 Make got.mergeOptions() behavior more obvious and document its behavior (#538)
  • 6d654fa Drop ESOCKETTIMEDOUT error
  • da7f055 Add timeout for secureConnect event for HTTPS requests (#536)
  • 9d87e9f Document TimeoutError

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 🌴

greenkeeper bot added a commit that referenced this pull request Aug 23, 2018
@greenkeeper
Copy link
Author

greenkeeper bot commented Aug 23, 2018

Version 9.1.0 just got published.

Update to this version instead 🚀

Release Notes v9.1.0

v9.0.0...v9.1.0

Commits

The new version differs by 24 commits.

  • 1c54a03 9.1.0
  • c901c46 Normalize the URL in the baseUrl option (#579)
  • f241936 Remove AppVeyor
  • 3d98b9b Follow redirects with encoded URI (#564)
  • 45d3a60 Bump get-stream to 0.4.0 (#578)
  • 2ffcd49 Don't freeze any other values than plain objects and arrays (#577)
  • a7cd35a Tiny readme formatting tweak
  • b8a086f Allow the query option to be a URLSearchParams instance (#565)
  • 97533e5 Fix AWS example in readme (#575)
  • 8f30f1f Add note about global-tunnel package
  • eb652f8 Ignore empty query objects (#572)
  • ca2675e Upgrade to ava@1.0.0-beta.7
  • f30b623 Mention browser and Electron support in the comparison table (#556)
  • a3e77de Support retrying on HTTP 500
  • 2cdb3ed Fix a typo in the readme (#553)

There are 24 commits in total.

See the full diff

greenkeeper bot added a commit that referenced this pull request Aug 31, 2018
@greenkeeper
Copy link
Author

greenkeeper bot commented Aug 31, 2018

Version 9.2.0 just got published.

Update to this version instead 🚀

Release Notes v9.2.0

v9.1.0...v9.2.0

Commits

The new version differs by 19 commits.

  • aec95d2 9.2.0
  • f8af5b0 Update http-timer dependency to 1.1.0
  • e66a6b6 Fix Electron throwing HTTP trailers are not supported error (#598)
  • eedebc9 Add cookieJar option (#596)
  • ab0d24b Add "Bugs" to the comparsion table
  • 887f02d Improve code readability
  • a8eb41b Proper fix for #469 (#594)
  • 78a56ec Provide timings (#590)
  • bb8175b Correct the comparison table
  • 7910e14 Unify calling mergeOptions
  • 488ac7e Remove redundant code
  • 21bef3c Update readme.md (#593)
  • 267cb66 Document the response object (#592)
  • d0757da Add tests for stripping port in host header (#591)
  • dda1ce9 Use correct package/module wording in the readme

There are 19 commits in total.

See the full diff

greenkeeper bot added a commit that referenced this pull request Sep 6, 2018
@greenkeeper
Copy link
Author

greenkeeper bot commented Sep 6, 2018

Version 9.2.1 just got published.

Update to this version instead 🚀

Release Notes v9.2.1
  • Don't cache response when HTTP error was received. #597 b8480f3
  • Fix merging default & custom handlers. 5f191b9

v9.2.0...v9.2.1

Commits

The new version differs by 7 commits.

See the full diff

greenkeeper bot added a commit that referenced this pull request Sep 17, 2018
@greenkeeper
Copy link
Author

greenkeeper bot commented Sep 17, 2018

  • The devDependency got was updated from 8.3.2 to 9.2.2.

Update to this version instead 🚀

Release Notes for v9.2.2
  • Gracefully handle invalid Location redirect URLs. (#605) 7ae6939
  • Don't override hooks when merging arguments. 3ad3950
  • Merge hooks on got.extend(). (#608) 292f78a

v9.2.1...v9.2.2

Commits

The new version differs by 4 commits.

  • 248d68c 9.2.2
  • 3ad3950 Don't override hooks when merging arguments
  • 292f78a Merge hooks on got.extend() (#608)
  • 7ae6939 Gracefully handle invalid Location redirect URLs (#605)

See the full diff

greenkeeper bot added a commit that referenced this pull request Oct 30, 2018
@greenkeeper
Copy link
Author

greenkeeper bot commented Oct 30, 2018

  • The devDependency got was updated from 8.3.2 to 9.3.0.

Update to this version instead 🚀

Commits

The new version differs by 18 commits.

  • 232e0f3 9.3.0
  • c5bfad5 Add npm release script
  • b50d76c Upgrade dependencies
  • ea41bdc Change the way to retry using the afterResponse hook (#647)
  • 5adfc27 Improve docs for the query option (#643)
  • b392f60 Allow defaults to be mutable (#645)
  • 180cbd5 Add missing test for retrying using the afterResponse hook
  • 01e9cd8 Move setting redirectUrls to request-as-event-emitter.js
  • 3a50d8b Mention node-fetch Node.js stream API in comparison table (#644)
  • 325409c Add more hooks (#640)
  • af341ca Code cleanup and bug fixes (#635)
  • 8d2e911 Fix tunnel package reference in the docs (#627)
  • 25f18be Support electron renderer timings
  • fbaaa2a Retry on a few more errors
  • fdc0fa6 Include body property in HTTPError (#622)

There are 18 commits in total.

See the full diff

greenkeeper bot added a commit that referenced this pull request Nov 3, 2018
@greenkeeper
Copy link
Author

greenkeeper bot commented Nov 3, 2018

  • The devDependency got was updated from 8.3.2 to 9.3.1.

Update to this version instead 🚀

Release Notes for v9.3.1
  • Don't override headers defined in the url argument when it's an object. 191e00a
  • Don't set content-length header when upload body size is null. 311b184

v9.3.0...v9.3.1

Commits

The new version differs by 6 commits.

  • 50fdab3 9.3.1
  • 191e00a Don't override headers defined in the url argument when it's an object (#633)
  • 311b184 Don't set content-length header when uploadBodySize is null (#651)
  • 46c0951 Document the .defaults property (#649)
  • 84a9534 Mention how to access the defaults
  • 3af3616 Update docs according to the new defaults

See the full diff

greenkeeper bot added a commit that referenced this pull request Nov 8, 2018
@greenkeeper
Copy link
Author

greenkeeper bot commented Nov 8, 2018

  • The devDependency got was updated from 8.3.2 to 9.3.2.

Update to this version instead 🚀

Release Notes for v9.3.2

v9.3.1...v9.3.2

Commits

The new version differs by 3 commits.

See the full diff

greenkeeper bot added a commit that referenced this pull request Dec 10, 2018
@greenkeeper
Copy link
Author

greenkeeper bot commented Dec 10, 2018

  • The devDependency got was updated from 8.3.2 to 9.4.0.

Update to this version instead 🚀

Release Notes for v9.4.0
  • Add ability to specify which network error codes to retry on. 9f3a099
  • Add Got options onto responses and errors. 33b838f
  • Correctly clear socket timeout on error. c8e358f

v9.3.2...v9.4.0

Commits

The new version differs by 11 commits.

  • 533d7e5 9.4.0
  • 9f3a099 Add ability to specify which network error codes to retry on (#660)
  • 33b838f Add Got options onto responses and errors (#663)
  • 8848a7a Add migration guides (#595)
  • 4a8722b Minor code style tweaks
  • c8e358f Clear socket timeout on error (#659)
  • 3229448 Create issue templates (#655)
  • ef1494c Remove unnecessary check for options
  • 5367228 Remove unnecessary if block
  • 64f0adc Update node-fetch in the readme comparison table (#658)
  • 7f18ef3 Mention a few more Node errors when Got will retry

See the full diff

greenkeeper bot added a commit that referenced this pull request Dec 18, 2018
@greenkeeper
Copy link
Author

greenkeeper bot commented Dec 18, 2018

  • The devDependency got was updated from 8.3.2 to 9.5.0.

Update to this version instead 🚀

Release Notes for v9.5.0
  • Remove error thrown for URLs with auth component (#676) 5d20a43
  • Upgrade dependencies a1eadfe

v9.4.0...v9.5.0

Commits

The new version differs by 5 commits.

  • 91c0607 9.5.0
  • a1eadfe Upgrade dependencies
  • 5d20a43 Remove error thrown for URLs with auth component (#676)
  • 3e0edd8 Mention HTTPError body property in docs
  • aa4c9a6 Clarify error docs (#670)

See the full diff

greenkeeper bot added a commit that referenced this pull request Jan 13, 2019
@greenkeeper
Copy link
Author

greenkeeper bot commented Jan 13, 2019

  • The devDependency got was updated from 8.3.2 to 9.5.1.

Update to this version instead 🚀

Commits

The new version differs by 8 commits.

  • 6ce603e 9.5.1
  • 203dadc Fix memory leak when using socket timeout and keepalive agent (#694)
  • 73428f9 Add superagent to the comparison table (#691)
  • d136e61 Update dependencies
  • 877a6c1 Remove badge labels from the Comparison section
  • 5653c1a Add failing test for #687 (#688)
  • 8341fba Consistent use of emphasis in readme (#684)
  • 0bb9fa6 Fix 'Migration guides' json example

See the full diff

greenkeeper bot added a commit that referenced this pull request Jan 17, 2019
@greenkeeper
Copy link
Author

greenkeeper bot commented Jan 17, 2019

  • The devDependency got was updated from 8.3.2 to 9.6.0.

Update to this version instead 🚀

Release Notes for v9.6.0

v9.5.1...v9.6.0

Commits

The new version differs by 4 commits.

See the full diff

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

0 participants