refactor: modernize utils and xhr adapter using ES6 features#10588
Merged
jasonsaayman merged 3 commits intoaxios:v1.xfrom Apr 24, 2026
Merged
refactor: modernize utils and xhr adapter using ES6 features#10588jasonsaayman merged 3 commits intoaxios:v1.xfrom
jasonsaayman merged 3 commits intoaxios:v1.xfrom
Conversation
Contributor
Author
|
Merge it
…On Tue, 31 Mar, 2026, 12:51 am cubic-dev-ai[bot], ***@***.***> wrote:
***@***.***[bot]* commented on this pull request.
*No issues found* across 2 files
Confidence score: *5/5*
- Automated review surfaced no issues in the provided summaries.
- No files require special attention.
—
Reply to this email directly, view it on GitHub
<#10588?email_source=notifications&email_token=BFB6RPDVO3WKKDOKYDSXBKT4TLCJ7A5CNFSNUABKM5UWIORPF5TWS5BNNB2WEL2QOVWGYUTFOF2WK43UKJSXM2LFO4XTIMBTGI3TSNRVG44KM4TFMFZW63VGMF2XI2DPOKSWK5TFNZ2L24DSL5ZGK5TJMV3V63TPORUWM2LDMF2GS33OONPWG3DJMNVQ#pullrequestreview-4032796578>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/BFB6RPCVFLXMTTRTNCSKGYD4TLCJ7AVCNFSM6AAAAACXGVEDZWVHI2DSMVQWIX3LMV43YUDVNRWFEZLROVSXG5CSMV3GSZLXHM2DAMZSG44TMNJXHA>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
jasonsaayman
approved these changes
Apr 24, 2026
Member
jasonsaayman
left a comment
There was a problem hiding this comment.
Thanks for your contribution, nicely done 🔥
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 modernizes several parts of the codebase by:
argumentswith rest parameters (...objs) in themergefunction.indexOf(...) !== -1with.includes(...)for better readability.indexOf(...) === 0with.startsWith(...)in the XHR adapter.These changes align with modern JavaScript standards already present in the Axios 1.x codebase.
Summary by cubic
Modernizes utils and the XHR adapter to ES6 (rest params, .includes, .startsWith) for clarity and consistency with
v1.x. Synced with the latestv1.x; no behavior or API changes.Description
mergeto rest params (keepscaseless/skipUndefined).indexOfwith.includes(...)across utils/XHR, including the restricted props check infreezeMethods..startsWith('file:')forfile:URL detection; protocol allowlist now uses.includes(...)./docs/coding standards to prefer ES6 patterns.Testing
utils.mergeare sufficient.Written for commit 02dd117. Summary will update on new commits.