Open
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #508 +/- ##
=======================================
Coverage 99.23% 99.23%
=======================================
Files 127 127
Lines 6404 6404
Branches 1227 1227
=======================================
Hits 6355 6355
Misses 49 49 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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:
14.6.6→15.0.0Release Notes
sindresorhus/got (got)
v15.0.0Compare Source
Breaking changes
b933476a06ac6cpromise.cancel()is gone. Use thesignaloption withAbortControllerinstead.isStreamoptionc241c6cgot.stream()directly.FormDataglobal670b228FormDataglobal directly (available in Node.js 18+).responseType: 'buffer'returnsUint8Arrayinstead ofBuffer309e36dresponse.rawBodyandpromise.buffer()now return aUint8Array.Bufferis a subclass ofUint8Array, so most code will continue to work, but strict type checks will need updating.strictContentLengthdefaults totrue08e9dffContentLengthMismatchErrorby default ifContent-Lengthdoesn't match the actual body size. Set{strictContentLength: false}to restore the old behavior.retry.enforceRetryRulesdefaults totrue9bc8dfbcalculateDelayfunctions are now only called when a retry is actually allowed bylimit,methods,statusCodes, anderrorCodes. If yourcalculateDelaywas previously used to override retry eligibility unconditionally, set{retry: {enforceRetryRules: false}}.8e392f3{copyPipedHeaders: true}to re-enable. Hop-by-hop headers are never copied even when enabled (RFC 9110 §7.6.1).urlremoved from public options objects87de8d6urlproperty is no longer present on the options object passed to hooks. Useresponse.urlorrequest.requestUrlinstead.5fccaabImprovements
text/jsonbodies incrementally for lower peak memory usagec9a95b1uploadProgressnow emits granular per-chunk events forjsonandformrequest bodies13c889dMigration guide
Replace
promise.cancel()withAbortControllerBefore:
After:
Replace
isStream: truewithgot.stream()Before:
After:
Replace
form-data/form-data-encoderwith nativeFormDataBefore:
After:
Update
Bufferusage toUint8Arrayresponse.rawBodyandpromise.buffer()now returnUint8Arrayinstead ofBuffer.Before:
After:
If you need
Buffer-specific APIs, wrap withBuffer.from(data.buffer, data.byteOffset, data.byteLength).strictContentLengthis now on by defaultIf you send requests where the
Content-Lengthheader might not match the actual body size, opt out:retry.enforceRetryRulesis now on by defaultIf your
calculateDelayfunction was overriding retry eligibility (e.g. retrying on methods or status codes outside the defaults), opt out:Piped header copying is now opt-in
If you pipe streams into Got and rely on automatic header forwarding (e.g.
Content-Type), re-enable it:300 and 304 responses are no longer followed
If your code depended on Got auto-following 300 Multi-Choice or handling 304 Not Modified as a redirect, you now need to handle them yourself in an
afterResponsehook or checkresponse.statusCodemanually.Configuration
📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Never, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about these updates again.
This PR was generated by Mend Renovate. View the repository job log.