mcollina / mqemitter-mongodb

MongoDB based MQEmitter
MIT License
18 stars 10 forks source link

Fixed mongodb deprecation warnings #11

Closed jirikrepl closed 4 years ago

jirikrepl commented 5 years ago

Hi, I fixed these deprecation warnings. We use your package in our microservice. These warnings were displayed with stack trace every time when we restarted our microservice while developing.

DeprecationWarning: current URL string parser is deprecated, and will be removed in a future version. To use the new parser, pass option { useNewUrlParser: true } to MongoClient.connect.

DeprecationWarning: collection.insert is deprecated. Use insertOne, insertMany or bulkWrite instead.

maybe it would be worth to release this as npm package version 4.0.3 (I just fixed this for locally in my node_modules folder)

mcollina commented 5 years ago

CI is failing in all environments: https://travis-ci.org/mcollina/mqemitter-mongodb/jobs/475233499#L523.