Rapidfacture / mongoose-multi

NPM Module: Create Mongoose connections to severals DBs; short, mongoDB like syntax for requests.
12 stars 4 forks source link

createConnection warning #5

Closed hatzavw closed 6 years ago

hatzavw commented 6 years ago

The file index.js line 105: connections[name] = mongoose.createConnection(url, options); Causing the following warning: the server/replset/mongos options are deprecated, all their options are supported at the top level of the options object [poolSize,ssl,sslValidate,sslCA,sslCert,sslKey,sslPass,sslCRL,autoReconnect,noDelay,keepAlive,keepAliveInitialDelay,connectTimeoutMS,family,socketTimeoutMS,reconnectTries,reconnectInterval,ha,haInterval,replicaSet,secondaryAcceptableLatencyMS,acceptableLatencyMS,connectWithNoPrimary,authSource,w,wtimeout,j,forceServerObjectId,serializeFunctions,ignoreUndefined,raw,bufferMaxEntries,readPreference,pkFactory,promiseLibrary,readConcern,maxStalenessSeconds,loggerLevel,logger,promoteValues,promoteBuffers,promoteLongs,domainsEnabled,checkServerIdentity,validateOptions,appname,auth,user,password,authMechanism,compression,fsync,readPreferenceTags,numberOfRetries,auto_reconnect,minSize,monitorCommands,retryWrites]

In order to fix we need to update the server in the options (move it to top level).

Node 8.9.4 NPM 5.6.0

FelixFurtmayr commented 6 years ago

thank you for the pull request. code is merged and published on npm now.