You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
From mongoose V7, async functions will throw an error if we pass a callback (and so will skip his job) .
I saw this async functions was added years ago (4.3.8-pre) : Automattic/mongoose@21f0104
so, I think we can migrate to full promise (removing callback) without problems .
Also, we already use promises, but, passing the "resolve" function to the callback .
Actually, stopping a moleculer service, will not close the connection ( close will throw before really closing the connection )
The text was updated successfully, but these errors were encountered:
thib3113
changed the title
[Mongoose] : Connection.prototype.close() no longer accepts a callback
[Mongoose V7] : Connection.prototype.close() no longer accepts a callback
Mar 21, 2023
@icebob what versions of mongoose do you want to support on this lib ? I didn't find the information .
If not decided, I propose to follow the same as mongoose itself ? https://mongoosejs.com/docs/version-support.html so, supporting V6 and V7 . ( maybe V5 and we stop the support in some months ? )
From mongoose V7, async functions will throw an error if we pass a callback (and so will skip his job) .
I saw this async functions was added years ago (4.3.8-pre) : Automattic/mongoose@21f0104
so, I think we can migrate to full promise (removing callback) without problems .
Also, we already use promises, but, passing the "resolve" function to the callback .
Actually, stopping a moleculer service, will not close the connection ( close will throw before really closing the connection )
The text was updated successfully, but these errors were encountered: