Open greenkeeper[bot] opened 6 years ago
Update to this version instead π
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.
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.{ retries: 4 }
β { retry: 4 }
{ retries: () => { β¦ } }
β { retry: { retries: () => { β¦ } } }
.canceled
property to .isCanceled
. 00fdeeabody
option being an Array when form: true
. dfe5b1cnew 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.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. da4f236got.extend()
which lets you easily create instances of Got with some options overriden. bc41a49got.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. bc41a49beforeRequest
hook. 107756frequest
and response
events to the Promise API. e86aad7content-length
header is now also automatically set if the body
option is set to a fs.createReadStream
instance. 6e7a455user-agent
header by passing in 'user-agent': null
as a header. e473a26body
option can now be any kind of object, not just a plain object. 7a49ce7query
option. 07a91ccgot.stream()
. 83bc44cWelcome @szmarczak and @brandon93s as maintainers
Special shoutout to @jstewmon for helping us with many of the above improvements and fixes
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
Update to this version instead π
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
Update to this version instead π
cookieJar
option. (#596) eedebc9content-length
header to zero when doing a PUT request with no body. (#584) 9a966ecquery
option when it's a string. (#589) f23f350response
object. (#592) 267cb66HTTP trailers are not supported
error. (#598) e66a6b6The 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
dependency
got was updated from 8.3.1
to 9.3.0
.Update to this version instead π
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
dependency
got was updated from 8.3.1
to 9.3.1
.Update to this version instead π
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
dependency
got was updated from 8.3.1
to 9.3.2
.Update to this version instead π
dependency
got was updated from 8.3.1
to 9.4.0
.Update to this version instead π
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
dependency
got was updated from 8.3.1
to 9.5.0
.Update to this version instead π
dependency
got was updated from 8.3.1
to 9.5.1
.Update to this version instead π
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
dependency
got was updated from 8.3.1
to 9.6.0
.Update to this version instead π
dependency
got was updated from 8.3.1
to 10.0.0
.Update to this version instead π
We're excited to announce Got 10!
If you find Got useful, you might want to sponsor the Got maintainers.
Note: Some HTTP agents like https-proxy-agent
and agentkeepalive
are not compatible with Node.js 10 and hence not compatible with Got as Got takes advantage of some Node.js 10-only APIs.
stream.pipeline
for more reliable stream handling. Node.js 8 will be out of LTS at the end of this month anyway.url
argument 92bc808
- got('sindresorhus.com');
+ got('https://sindresorhus.com');
query
option to searchParams
and make it stricter b223663 5376216 518f0f5
window.fetch
naming in the browser.- got(β¦, {query: β¦});
+ got(β¦, {searchParams: β¦});
baseUrl
option with prefixUrl
(#829) 0d534ed
url
argument now cannot be prefixed with a slash when this option is used.- got('/foo', {baseUrl: 'https://x.com'});
+ got('foo', {prefixUrl: 'https://x.com'});
json
option to accept an object instead of a boolean and to only be responsible for the request, not the response (#704) a6a7d5a
body
option 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 the responseType
option for that.{json: true}
worked and they also complained that they could not set the request/response type individually.- got(url, {body: {x: true}, json: true});
+ got.post(url, {json: {x: true}}).json();
responseType
option instead of encoding
to get a Buffer (#940) 6cc3d9f
{encoding: null}
to get a Buffer, but this was confusing. You now use {responseType: 'buffer'}
instead.got(β¦).buffer();
.- got(β¦, {encoding: null});
+ got(β¦, {responseType: 'buffer'});
POST
automatically when specifying body
(#756) e367bdb
- got(β¦, {body: 'foo'});
+ got.post(β¦, {body: 'foo'});
retries.retry
option was split into retries.limit
and retries.calculateDelay
b15ce1d
got(β¦, {
retry: {
- retries: 2
+ limit: 2
}
});
got(β¦, {
retry: {
- retries: iteration => iteration < 2
+ calculateDelay: ({attemptCount}) => attemptCount < 2
}
});
undefined
instead of null
to omit a header (https://github.com/sindresorhus/got#headers) 518f0f5
null
. got(β¦, {
headers: {
- 'user-agent': null
+ 'user-agent': undefined
}
});
.fromCache
to .isFromCache
(#768) b5e443bstream
option to isStream
518f0f5
- got(β¦, {stream: true});
+ got(β¦, {isStream: true});
user-agent
header (#911) 95bed1e
got/9.6.0 (https://github.com/sindresorhus/got)
β got (https://github.com/sindresorhus/got)
user-agent
header anyway.got.create()
518f0f5
got.extend()
now.got.mergeInstances()
518f0f5
gotInstance.extend(...gotInstances)
instead..options
and .response
property (#773) 6eaa81b
- error.gotOptions
+ error.options
- error.headers
+ error.response.headers
- error.statusCode
+ error.response.statusCode
- error.statusMessage
+ error.response.statusMessage
- error.body
+ error.response.body
- error.redirectUrls
+ error.response.redirectUrls
- error.host
+ error.options.host
- error.hostname
+ error.options.hostname
- error.method
+ error.options.method
- error.protocol
+ error.options.protocol
- error.url
+ error.options.url
- error.path
+ error.options.path
got.mergeInstances(...instances)
is deprecated. Use instanceA.extend(instanceB)
instead.# Merging instances
- got.mergeInstances(instanceA, instanceB, instanceC, β¦);
+ instanceA.extend(instanceB, instanceC, β¦);
# Merging options
- instanceA.extend(optionsB).extend(optionsC).extend(β¦);
+ instanceA.extend(optionsB, optionsC, β¦);
# Merging instances and options
- got.mergeInstances(instanceA.extend(optionsB), instanceC);
+ instanceA.extend(optionsB, instanceC, β¦);
# Extending handlers
- got.mergeInstances(instanceA, got.create({handler: handlerB}));
+ instanceA.extend({handlers: [handlerB]});
context
option for storing custom metadata across request and hooks (#777) 3bb5aa7maxRedirects
option (#914) 0c505b0methodRewriting
option (#942) b82358ftough-cookie
for handling cookies (#882) 518f0f5beforeRedirect
hook (#812) 3557896.isFromCache
property to the stream API (#768) b5e443btimeout
option can now be modified in hooks d520a3aprefixUrl
option can now be modified in hooks (#867) 518f0f5URLSearchParams
instances mergeable (#734) 95c7c2cafterResponse
hook (#775) e2054cdport
not being reset on redirect (#729) ada5861retry
option value when specifying a number (#809) 9c04a7cbeforeError
hook 134c9b7204 No Content
when parsing response (#925) 518f0f5afterResponse
hook should trigger beforeRetry
hook (#918) 518f0f5retry
behavior 5e6782aprefixUrl
behavior (#943) f008bc9retry
option doesn't work with streams 9088866Stream.pipeline()
when using the stream API 06afb27global-agent
(#822) ca8c560TimeoutError.timings
property 8fa18f4The new version differs by 163 commits.
abdfee2
10.0.0
aae7b89
Improve readme
71b8452
Improve types (#946)
f008bc9
Clarify prefixUrl
behavior (#943)
d968e49
Upgrade dependencies
b82358f
Add methodRewriting
option (#942)
966e7ff
10.0.0-beta.2
c537dee
Make TypeScript types conforms to strict mode (#928)
d9a3273
Clarify retry
behavior (#944)
6cc3d9f
Use responseType
instead of options.encoding
to get a Buffer (#940)
3acdb69
Update a comment
d0f2dfd
Mention that progress.total
can be undefined
8874a45
Preserve stacktrace when wrapping errors (#935)
b7a356a
Fix .json()
usage in readme.md
2c5d0c0
Follow-up to cd11a5092972c16e5295f4d13dee20c228dcb19c
There are 163 commits in total.
See the full diff
dependency
got was updated from 8.3.1
to 10.0.1
.dependency
got was updated from 8.3.1
to 10.0.2
.dependency
got was updated from 8.3.1
to 10.0.3
.dependency
got was updated from 8.3.1
to 10.0.4
.dependency
got was updated from 8.3.1
to 10.1.0
.dependency
got was updated from 8.3.1
to 10.2.0
.dependency
got was updated from 8.3.1
to 10.2.1
.dependency
got was updated from 8.3.1
to 10.2.2
.dependency
got was updated from 8.3.1
to 10.3.0
.dependency
got was updated from 8.3.1
to 10.4.0
.dependency
got was updated from 8.3.1
to 10.5.0
.dependency
got was updated from 8.3.1
to 10.5.1
.dependency
got was updated from 8.3.1
to 10.5.2
.dependency
got was updated from 8.3.1
to 10.5.3
.dependency
got was updated from 8.3.1
to 10.5.4
.dependency
got was updated from 8.3.1
to 10.5.5
.dependency
got was updated from 8.3.1
to 10.5.6
.dependency
got was updated from 8.3.1
to 10.5.7
.dependency
got was updated from 8.3.1
to 10.6.0
.dependency
got was updated from 8.3.1
to 10.7.0
.dependency
got was updated from 8.3.1
to 11.0.0
.dependency
got was updated from 8.3.1
to 11.0.1
.dependency
got was updated from 8.3.1
to 11.0.2
.dependency
got was updated from 8.3.1
to 11.0.3
.dependency
got was updated from 8.3.1
to 11.1.0
.π¨ 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
dependency
got was updated from 8.3.1
to 11.1.1
.π¨ 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
dependency
got was updated from 8.3.1
to 11.1.2
.π¨ 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
dependency
got was updated from 8.3.1
to 11.1.3
.π¨ 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
dependency
got was updated from 8.3.1
to 11.1.4
.π¨ 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
dependency
got was updated from 8.3.1
to 11.2.0
.
Version 8.3.2 of got was just published.
The version 8.3.2 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
v8.3.2Fix Got throwing an error in some cases when trying to pipe one
got.stream
into another one. 7ac705fCommits
The new version differs by 2 commits.
ad7b361
8.3.2
7ac705f
fix Buffer.byteLength(req._header) throwing error (#490)
See the full diff
FAQ and help
There is a collection of [frequently asked questions](https://greenkeeper.io/faq.html). If those donβt help, you can always [ask the humans behind Greenkeeper](https://github.com/greenkeeperio/greenkeeper/issues/new).Your Greenkeeper bot :palm_tree: