task: Replace Axios with native Fetch - #18698
Closed
toufali wants to merge 9 commits into
Closed
Conversation
4 tasks
toufali
force-pushed
the
task/replace-axios
branch
from
April 17, 2025 22:30
c2cd9bc to
1c7f094
Compare
toufali
force-pushed
the
task/replace-axios
branch
2 times, most recently
from
April 20, 2025 22:54
3b41107 to
865bed4
Compare
toufali
force-pushed
the
task/replace-axios
branch
from
April 22, 2025 06:59
865bed4 to
f20f552
Compare
toufali
force-pushed
the
task/replace-axios
branch
from
April 22, 2025 15:29
c3ab7e8 to
312d48f
Compare
toufali
force-pushed
the
task/replace-axios
branch
from
April 22, 2025 22:55
3e4cac6 to
cbb319b
Compare
4 tasks
Contributor
|
@toufali should we close this PR for now? |
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.
Because
Axios continues to be flagged with high vulnerabilities and maintaining the extra dependency is time-consuming
This pull request
replaces Axios with native fetch.
Issue that this pull request solves
Closes: FXA-11465
Closes: FXA-11503
Checklist
Put an
xin the boxes that applyOther information (Optional)
In a couple instances, custom agents are created and passed to Axios via the "agent" option, to allow advanced connection management. Native fetch does not include this option. Connection reuse is handled internally via undici, which is suggested to be highly optimized for performance and connection pooling out-of-the-box.
Rather than remove the Axios-enabled advanced connection management, I resorted to using node-fetch in these instances, instead of native fetch. node-fetch is already a dependency of ours, and exposes the "agent" option for connection management. Should we decide that undici's connection reuse provides enough performance, we can remove the agents and use native fetch instead of node-fetch.