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

Revisit axios-cookiejar-support #295

Open
glynnbird opened this issue Mar 25, 2022 · 3 comments
Open

Revisit axios-cookiejar-support #295

glynnbird opened this issue Mar 25, 2022 · 3 comments
Labels
dependencies Pull requests that update a dependency file

Comments

@glynnbird
Copy link
Contributor

In the 10.0.0 dependency bump, axios-cookiejar-support was left at ^1.0.1 when the latest is 2.0.4. Why wasn't this updated in line with the others? Well...

  • the syntax for how to implement axios-cookiejar-support has changed - this is not a big deal. Usage is https://github.com/3846masa/axios-cookiejar-support#usage
  • but it turns out axios-cookiejar-support doesn't like our use of custom http/https agents. In fact it refuses to run when they are supplied. Error [axios-cookiejar-support does not support for use with other http(s).Agent.].

Others have spotted this and the developer's advise is here 3846masa/axios-cookiejar-support#431. In short:

  • use http-cookie-agent instead. This is another library by the same developer and is actually a dependency of axios-cookiejar-support
  • configure our agents to use ^
  • scrap axios-cookiejar-support

Doing it this way may also eliminate this bug at the same time: #264.


This seems like it's worth a try, but didn't want to hold up v10 (any more than it was) while fiddling with it.

@glynnbird glynnbird added the dependencies Pull requests that update a dependency file label Mar 25, 2022
@fynnlyte
Copy link

I think another feasible option would be to remove additional cookie-handling dependencies altogether from nano or to make it optional. Instead, nano could expose its axios - instance and allow to overwrite/ wrap it, as needed.

@aeharding
Copy link

May also be worth considering reducing reliance on axios altogether, especially now that the fetch api has landed in node 18. A few years down the road and nano could be a very thin, practically dependency-free library. 🙂

@glynnbird
Copy link
Contributor Author

@aeharding I was thinking about that. That would be a dream. Unfortunately, we'll have to wait until node 18 is the norm.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file
Projects
None yet
Development

No branches or pull requests

3 participants