Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: apply type-safe for AxiosRequestConfig data parameter #611

Merged
merged 4 commits into from
Oct 31, 2021
Merged

feat: apply type-safe for AxiosRequestConfig data parameter #611

merged 4 commits into from
Oct 31, 2021

Conversation

vladi-strilets
Copy link
Contributor

@vladi-strilets vladi-strilets commented Oct 30, 2021

Closes #610

BREAKING CHANGE: requires axios@^0.24.0

@codecov
Copy link

codecov bot commented Oct 31, 2021

Codecov Report

Merging #611 (6a13cc5) into master (83d84d5) will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #611   +/-   ##
=======================================
  Coverage   99.27%   99.27%           
=======================================
  Files           2        2           
  Lines         137      137           
  Branches       25       25           
=======================================
  Hits          136      136           
  Misses          1        1           

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 83d84d5...6a13cc5. Read the comment docs.

Copy link
Owner

@simoneb simoneb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall looks good, see inline comments.

This will need to be a semver major as this is a breaking change but don't bump the version in this PR please.

In the upstream PR axios/axios#4116 I see that also the AxiosError type got a new generic parameter, shall we include that as well?

package.json Outdated
@@ -1,6 +1,6 @@
{
"name": "axios-hooks",
"version": "2.7.0",
"version": "2.7.1",
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do not bump the version please, it will be done at the time of release

@vladi-strilets
Copy link
Contributor Author

I've updated the pr, thanks for the comment.

@simoneb simoneb changed the title Feat: apply type-safe for AxiosRequestConfig data parameter feat: apply type-safe for AxiosRequestConfig data parameter Oct 31, 2021
@simoneb simoneb merged commit eb05b0a into simoneb:master Oct 31, 2021
@vladi-strilets vladi-strilets deleted the feat/type-safe-axios-body branch October 31, 2021 20:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Type safe for axios data param in AxiosRequestConfig
2 participants