chore: remove axios dependency from CLI #6888
Merged
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.
Ref #6647
This generates a second version of the API in the
open-api
project that uses thefetch
API that is built into Node and the browser rather thanaxios
. This migrates the CLI to the new API and leaves theweb
project on the old API. We can later migrate theweb
project as well and then delete the oldaxios
API. It was too big of a change to figure out how to migrate both in one go, so this more incremental approach was easier.The
fetch
API is nicer because it removes a bunch of unnecessary.data
accesses and it removes a dependency resulting in faster project installs and less security risk due to a smaller attack area. It will make a bigger difference in theweb
project where removing a dependency will speed page load timesmain
: dist/index.js 1,817.04 kBThis PR: dist/index.js 1,088.98 kB