ts-retrofit icon indicating copy to clipboard operation
ts-retrofit copied to clipboard

refactor: update axios version and handle breaking changes

Open mesmur opened this issue 1 year ago • 4 comments

Hello,

I'm raising this PR to update the axios dependency to the latest version. Versions prior to 1.6 have an associated security vulnerability, which make it difficult to justify ts-retrofit usage in production environments.

This will also resolve #54.

Changes include:

  • Changing the types of AxiosRequestConfig to InternalAxiosRequestConfig
  • Changing the use of AxiosTransformer to AxiosRequestTransformer and AxiosResponseTransformer
  • Updating existing tests to ascertain that they still pass without issue.

I'm not aware of all the project internals, and made the minimum changes to satisfy the axios upgrade. Please do let me know if any other changes are required!

mesmur avatar Jan 16 '24 15:01 mesmur

Hi @nullcc! Does this PR look good enough for merge?

devcsrj avatar Feb 07 '24 03:02 devcsrj

+1 here, is this library still maintained?

eriknyk avatar Apr 23 '24 03:04 eriknyk

@eriknyk We ended up just republishing separately under:

 npm i axios-retrofit

Since my company uses this, we'll just maintain it from this fork instead

devcsrj avatar Apr 23 '24 06:04 devcsrj

thanks @devcsrj

eriknyk avatar Apr 24 '24 16:04 eriknyk