Open Martii opened 6 years ago
These show up in local pro (different MongoDB version... already emailed sizzle about this incongruity):
(node:26443) DeprecationWarning: collection.find option [fields] is deprecated and will be removed in a later version.
(node:26443) DeprecationWarning: collection.find option [fields] is deprecated and will be removed in a later version.
Connected to MongoDB v3.0.15
GitHub client authenticated
(node:26443) DeprecationWarning: collection.update is deprecated. Use updateOne, updateMany, or bulkWrite instead.
(node:26443) DeprecationWarning: collection.count is deprecated, and will be removed in a future version. Use collection.countDocuments or collection.estimatedDocumentCount instead
(node:26443) DeprecationWarning: Cursor.each is deprecated. Use Cursor.forEach instead.
And some more...
(node:26443) DeprecationWarning: collection.remove is deprecated. Use deleteOne, deleteMany, or bulkWrite instead.
(node:26443) DeprecationWarning: collection.update is deprecated. Use updateOne, updateMany, or bulkWrite instead.
(node:26443) DeprecationWarning: collection.remove is deprecated. Use deleteOne, deleteMany, or bulkWrite instead.
Ref:
(node:32265) DeprecationWarning: collection.findAndModify is deprecated. Use findOneAndUpdate, findOneAndReplace or findOneAndDelete instead.
... string findAndModify
not found in our project but other deps have it.
...
(node:12406) DeprecationWarning: Mongoose: `findOneAndUpdate()` and `findOneAndDelete()` without the `useFindAndModify` option set to false are deprecated. See: https://mongoosejs.com/docs/deprecations.html#-findandmodify-
Ref: Automattic/mongoose#7865
During a dep update test cycle...
(node:9303) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'createCollection' of undefined
at NativeConnection.createCollection (~/repo/git/OpenUserJS.org/martii/OpenUserJS.org/node_modules/mongoose/lib/connection.js:356:11)
at ~/repo/git/OpenUserJS.org/martii/OpenUserJS.org/node_modules/mongoose/lib/connection.js:451:12
at Object.promiseOrCallback (~/repo/git/OpenUserJS.org/martii/OpenUserJS.org/node_modules/mongoose/lib/utils.js:261:12)
at NativeConnection.createCollection (~/repo/git/OpenUserJS.org/martii/OpenUserJS.org/node_modules/mongoose/lib/connection.js:445:18)
at ~/repo/git/OpenUserJS.org/martii/OpenUserJS.org/node_modules/mongoose/lib/model.js:1299:13
at Object.promiseOrCallback (~/repo/git/OpenUserJS.org/martii/OpenUserJS.org/node_modules/mongoose/lib/utils.js:261:12)
at Function.createCollection (~/repo/git/OpenUserJS.org/martii/OpenUserJS.org/node_modules/mongoose/lib/model.js:1296:16)
at ~/repo/git/OpenUserJS.org/martii/OpenUserJS.org/node_modules/mongoose/lib/model.js:1340:10
at ~/repo/git/OpenUserJS.org/martii/OpenUserJS.org/node_modules/mongoose/lib/utils.js:283:5
at new Promise (<anonymous>)
at Object.promiseOrCallback (~/repo/git/OpenUserJS.org/martii/OpenUserJS.org/node_modules/mongoose/lib/utils.js:282:10)
at Function.syncIndexes (~/repo/git/OpenUserJS.org/martii/OpenUserJS.org/node_modules/mongoose/lib/model.js:1337:16)
at Object.<anonymous> (~/repo/git/OpenUserJS.org/martii/OpenUserJS.org/models/script.js:86:8)
at Module._compile (internal/modules/cjs/loader.js:959:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:995:10)
at Module.load (internal/modules/cjs/loader.js:815:32)
(node:9303) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:9303) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
... as far as I know we don't use promises but deps may internally.
Squashed during testing:
(node:8993) 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:9088) DeprecationWarning: The option `reconnectTries` is incompatible with the unified topology, please read more by visiting http://bit.ly/2D8WfT6
(node:9088) DeprecationWarning: The option `reconnectInterval` is incompatible with the unified topology, please read more by visiting http://bit.ly/2D8WfT6
We use
.count
in at least [one place] where this can be changed although upstream says it's still using the MongoDB v3.x driver... so that's confusing.Refs:
1617
With --trace-deprecation:
... doing this kills session management... so delay.... FIXED (this one code fence only)