kuitos / axios-extensions

🍱 axios extensions lib, including throttle, cache, retry features etc...
MIT License
831 stars 49 forks source link

fix: buildURL error #101

Closed mengqiuleo closed 1 year ago

mengqiuleo commented 1 year ago

fix error: Missing "./lib/helpers/buildURL" export in "axios" package

mengqiuleo commented 1 year ago

99

mengqiuleo commented 1 year ago

with axios 1.x, we can use axios.getUri API, https://github.com/Gerhut/axios-debug-log/commit/df0f23a8c2258c4764227ea93dcd7951a651d90a#diff-7ae45ad102eab3b6d7e7896acd08c427a9b25b346470d7bc6507b6481575d519

mengqiuleo commented 1 year ago

When using the axios 1.x version, typescript error for AxiosRequestConfig, https://github.com/axios/axios/issues/5573

mengqiuleo commented 1 year ago

All test cases have passed successfully.

codecov[bot] commented 1 year ago

Codecov Report

Merging #101 (fc0c0e2) into master (0b64fd7) will increase coverage by 0.03%. The diff coverage is 100.00%.

:exclamation: Current head fc0c0e2 differs from pull request most recent head 5edfbbd. Consider uploading reports for the commit 5edfbbd to get more accurate results

@@            Coverage Diff             @@
##           master     #101      +/-   ##
==========================================
+ Coverage   97.33%   97.36%   +0.03%     
==========================================
  Files           5        5              
  Lines          75       76       +1     
  Branches       21       21              
==========================================
+ Hits           73       74       +1     
  Partials        2        2              
Impacted Files Coverage Δ
src/throttleAdapterEnhancer.ts 96.00% <100.00%> (ø)
src/utils/buildSortedURL.ts 100.00% <100.00%> (ø)
mengqiuleo commented 1 year ago

Nice work~ But axios.getUri depends on axios 1.x, it's breaking change for who using axios 0.x, maybe we should publish a major version like 4.0 for axiso-extensions?

@kuitos, I've tested axios.getUri locally, it's compatible with axios 0.x, and I removed the code I originally added for ts type,it's not compatible,use @ ts-ignore to resolve ts type error.

kuitos commented 1 year ago

Thanks for your nice work~

onlywei commented 8 months ago

Will this ever be published to npm?

botmaster commented 5 months ago

Please, publish this fix to npm 😔