Revisit axios-cookiejar-support
- Dominant language
- JavaScript
- Stars
- 689
- Forks
- 167
- Avg merge
- 1h
- Merged PRs (30d)
- 1
Description
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 https://github.com/3846masa/axios-cookiejar-support/issues/431. In short:
- use [http-cookie-agent](https://www.npmjs.com/package/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: https://github.com/apache/couchdb-nano/issues/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.
Contributor guide
Research direction
Start by reviewing the 10.0.0 dependency bump and the code that configures custom http/https agents. Compare the axios-cookiejar-support usage guidance with the linked developer advice and the reported CouchDB Nano bug; done means choosing and implementing a compatible cookie-agent approach, or documenting why the dependency should be removed.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, nodejs
- Domain
- api, backend
- Issue type
- Refactor
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100