Open ulanmurzatayev opened 5 years ago
The point behind using a separate mongoose
connection pool is compatibility. In case, there is some consumer that uses a really old mongoose
version, it can be not compatible with the features I am using here in the adapter.
If you have any ideas on how to move mongoose
in peerDependencies
- feel free to open the PR.
BTW, we actually, can move mongoose
in peerDependencies
and a question of compatibility leave to the consumer of the library.
I think it makes sense to give this adapter ability to reuse existing mongoose connection during creation, because it usually already exists in the application using this adapter.