This repository has been archived by the owner on Dec 5, 2021. It is now read-only.
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:
^9.6.0
->^10.7.0
Release Notes
sindresorhus/got
v10.7.0
Compare Source
got.paginate(…)
TypeScript typings (#1099)0b798ea
allItems
andcurrentItems
to_pagination.paginate()
(#1100)1cddd52
decompress-response
when bundling (#1105)88f973f
_pagination.transform
(#1102)cf4fdad
v10.6.0
Compare Source
allowGetBody
option to allow GET requests with payload (#1081)526b4bb
v10.5.7
Compare Source
acefaa4
v10.5.6
Compare Source
64aeb40
32e609f
v10.5.5
Compare Source
1f363b9
v10.5.4
Compare Source
_pagination
not falling back to defaultsff1dba1
v10.5.3
Compare Source
518d95a
v10.5.2
Compare Source
p-event
dependency8373112
v10.5.1
Compare Source
453a3a3
v10.5.0
Compare Source
761c7c6
We're looking for feedback on how it works.
v10.4.0
Compare Source
@szmarczak/cacheable-lookup
dependencyd527dae
ParseError
s (#1044)2813b73
got.stream(...)
not throwingReadError
s1f6ca6b
v10.3.0
Compare Source
17d629a
fddecab
GotRequestMethod
TypeScript type (#1017)f02694e
ReadError
TypeScript type (#1027)d222164
v10.2.2
Compare Source
request
option in normalizedhttp
options61009b3
v10.2.1
Compare Source
got.mergeOptions(...)
can be assigned to defaults (#1008)1360a1b
url
option is mutually exclusive with theurl
input argumente0f8aab
RetryObject['error']
TypeScript types5008bf7
@szmarczak/http-timer
dependencya1b8ffc
v10.2.0
Compare Source
electron.net
support (#995)b2f8ace
- See #899 (comment). When the support is removed, you'll still be able to use Got in the Electron main process and in the renderer process through the
electron.remote
module or if you use Node.js shims.hostname
is not presentdc53747
Premature close
errorsfa60b5f
v10.1.0
Compare Source
Enhancements
0569d45
Fixes
content-length
header not being set when using customcontent-type
3149340
912c2e5
7bf92f4
v10.0.4
Compare Source
URL
andURLSearchParams
types (#983)cd4226d
Just working around yet another TypeScript bug: DefinitelyTyped/DefinitelyTyped#34960
v10.0.3
Compare Source
responseType
option (071bf5e
)Premature close
andRequest timed out
errors (7b2ccb0
)options.path
backwards-compatible (b3f1ac9
)v10.0.2
Compare Source
URL
andURLSearchParams
globals (#969)2d5e28d
got.mergeOptions(...)
TypeScript type (#953)b962d08
5a8f461
v10.0.1
Compare Source
json
option withgot.stream.post
2ec5c4d
v10.0.0
Compare Source
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-agent
andagentkeepalive
are not compatible with Node.js 10 and hence not compatible with Got as Got takes advantage of some Node.js 10-only APIs.Breaking
633651f
- Why: This is so that we can use
stream.pipeline
for more reliable stream handling. Node.js 8 will be out of LTS at the end of this month anyway.url
argument92bc808
- Why: To reduce ambiguity. It was not clear from just reading the code what it would default to.
- Migrate:
query
option tosearchParams
and make it stricterb223663
5376216
518f0f5
- Why: To get closer to the
window.fetch
naming in the browser.- Migrate:
baseUrl
option withprefixUrl
(#829)0d534ed
- Note: We also made it stricter to reduce ambiguity. The Got
url
argument now cannot be prefixed with a slash when this option is used.- Why: We renamed it to make it clear that it doesn't do any URL resolution.
- Migrate:
json
option to accept an object instead of a boolean and to only be responsible for the request, not the response (#704)a6a7d5a
- Note: You now set the request body in this option instead of the
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 theresponseType
option for that.- Why: Many people were confused how
{json: true}
worked and they also complained that they could not set the request/response type individually.- Migrate:
responseType
option instead ofencoding
to get a Buffer (#940)6cc3d9f
- Why: Previously, you would pass
{encoding: null}
to get a Buffer, but this was confusing. You now use{responseType: 'buffer'}
instead.- Tip: You can also use
got(…).buffer();
.- Migrate:
POST
automatically when specifyingbody
(#756)e367bdb
- Why: We're trying to reduce the amount of magic behavior.
- Migrate:
retries.retry
option was split intoretries.limit
andretries.calculateDelay
b15ce1d
- Migrate:
undefined
instead ofnull
to omit a header (https://github.com/sindresorhus/got#headers)518f0f5
- Why: We're trying to reduce the use of
null
.- Migrate:
.fromCache
to.isFromCache
(#768)b5e443b
stream
option toisStream
518f0f5
- Why: To make it clearer that it's a boolean and that it doesn't expect a stream to be passed in.
- Migrate:
user-agent
header (#911)95bed1e
-
got/9.6.0 (https://github.com/sindresorhus/got)
→got (https://github.com/sindresorhus/got)
- Why: Importing package.json to get the version caused a lot of problems. And you should ideally set your own
user-agent
header anyway.got.create()
518f0f5
- You can achieve the same thing with
got.extend()
now.got.mergeInstances()
518f0f5
- Use
gotInstance.extend(...gotInstances)
instead..options
and.response
property (#773)6eaa81b
- Migrate:
8eaef94
- Note:
got.mergeInstances(...instances)
is deprecated. UseinstanceA.extend(instanceB)
instead.- Migrate:
Enhancements
- Why: This means we can provide our own type definitions and we can be more confident when working on the Got codebase and produce less bugs.
Huge thanks to @pmmmwh, @LinusU, @vladfrangu, @mastermatt, and everyone else that helped us with this rewrite. 🙌
d5d2e6f
cd12351
context
option for storing custom metadata across request and hooks (#777)3bb5aa7
e9c01e0
maxRedirects
option (#914)0c505b0
b7ead5f
methodRewriting
option (#942)b82358f
tough-cookie
for handling cookies (#882)518f0f5
8874a45
00e5fd5
beforeRedirect
hook (#812)3557896
92b1005
.isFromCache
property to the stream API (#768)b5e443b
timeout
option can now be modified in hooksd520a3a
prefixUrl
option can now be modified in hooks (#867)518f0f5
URLSearchParams
instances mergeable (#734)95c7c2c
Fixes
afterResponse
hook (#775)e2054cd
port
not being reset on redirect (#729)ada5861
0501e00
retry
option value when specifying a number (#809)9c04a7c
beforeError
hook134c9b7
4faf5c7
b0dfc95
518f0f5
204 No Content
when parsing response (#925)518f0f5
518f0f5
afterResponse
hook should triggerbeforeRetry
hook (#918)518f0f5
518f0f5
518f0f5
cd11a50
Docs
retry
behavior5e6782a
prefixUrl
behavior (#943)f008bc9
retry
option doesn't work with streams9088866
Stream.pipeline()
when using the stream API06afb27
global-agent
(#822)ca8c560
TimeoutError.timings
property8fa18f4
96ea75f
All commits
Renovate configuration
📅 Schedule: 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 has been generated by WhiteSource Renovate. View repository job log here.