victorteokw/seedgoose

Deprecation warnings on seeding

Opened this issue · 1 comments

Description

Hello! I'm having the following deprecation warnings at the moment of seeding/reseeding:

(node:5642) DeprecationWarning: current Server Discovery and Monitoring engine is deprecated, and will be removed in a future version. To use the new Server Discover and Monitoring engine, pass option { useUnifiedTopology: true } to the MongoClient constructor.
(node:5642) DeprecationWarning: collection.ensureIndex is deprecated. Use createIndexes instead.

This is not a blocker for the functionality, just reporting in case you didn't notice :).

Versions

  • mongoose: 5.7.7;
  • mongo db version 4.2.1;
  • seedgoose: 2.0.2;

Suggestion

For the first warning I think an extra option could be passed in the seedgoose configuration file in order to add extra configuration to the DB connection (overwrite the hardcoded configuration in the index.ts file by { ...defaultConnectionConfig, ...userConnectionConfig }, maybe?).
As for the second warning I don't really know where it comes from.

Hi @jejoivanic,

Both warnings come from mongoose and the underlying mongodb driver. I will plan to give seedgoose a nice update around this and other things.

Thanks