Closed mallove closed 4 years ago
You are definitely right about ioredis.
However redis is used at least once in the case of not supplying a redis client to setClient. Whether that's really useful is a different question. Maybe that functionality should be removed.
Just as an aside: Your grep is flawed since most source code now uses imports instead of require.
Oh, while trying to move it to optionalDependencies typescript correctly told me that that would be a mistake since ioredis is also used in the typed-redis helper where we use it to detect whether an exec
call failed.
As far as I can tell that is the only thing where ioredis differs from node_redis from nohms perspective, but it is a vital one and thus we really need to know what is happening in there.
As such I don't see a way to remove either of those from the dependencies without changing the code and for ioredis specifically I don't even know how that changed code would look like. Any PRs that properly address this are welcome.
It looks like
redis
andioredis
are only used for testing:This can lead to confusion in
npm list
output, e.g., it looks likeredis
andioredis
are needed in production, not just development:I think the below patch should resolve the issue: