Repository navigation
MongoDB/*mongoose* deprecations #1516
Copy link
Copy link
Open
Labels
CODESome other Code related issue and it should clearly describe what it is affecting in a comment.Some other Code related issue and it should clearly describe what it is affecting in a comment.migrationUse this to indicate that it may apply to an existing or announced migration.Use this to indicate that it may apply to an existing or announced migration.
Description
(node:26124) DeprecationWarning: collection.count is deprecated, and will be removed in a future version. Use collection.countDocuments or collection.estimatedDocumentCount insteadWe 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:
With --trace-deprecation:
(node:7904) DeprecationWarning: collection.count is deprecated, and will be removed in a future version. Use collection.countDocuments or collection.estimatedDocumentCount instead
at NativeCollection.(anonymous function) [as count] (~/OpenUserJS.org2/node_modules/mongoose/lib/drivers/node-mongodb-native/collection.js:146:28)
at NodeCollection.count (~/OpenUserJS.org2/node_modules/mquery/lib/collection/node.js:50:19)
at model.Query.Query._count (~/OpenUserJS.org2/node_modules/mongoose/lib/query.js:2081:20)
at process.nextTick (~/OpenUserJS.org2/node_modules/kareem/index.js:369:33)
at process._tickCallback (internal/process/next_tick.js:61:11)(node:7904) DeprecationWarning: Cursor.each is deprecated. Use Cursor.forEach instead.
at ~/OpenUserJS.org2/libs/modifySessions.js:293:19
at handleCallback (~/OpenUserJS.org2/node_modules/mongodb/lib/utils.js:128:55)
at Collection.<anonymous> (~/OpenUserJS.org2/node_modules/mongodb/lib/collection.js:432:45)
at Collection.deprecated [as find] (~/OpenUserJS.org2/node_modules/mongodb/lib/utils.js:661:17)
at exports.findSessionData (~/OpenUserJS.org2/libs/modifySessions.js:279:15)
at Timeout.ttlSanity [as _onTimeout] (~/OpenUserJS.org2/app.js:552:3)
at ontimeout (timers.js:436:11)
at tryOnTimeout (timers.js:300:5)
at listOnTimeout (timers.js:263:5)
at Timer.processTimers (timers.js:223:10)... doing this kills session management... so delay.... FIXED (this one code fence only)
(node:10349) 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.Metadata
Metadata
Assignees
Labels
CODESome other Code related issue and it should clearly describe what it is affecting in a comment.Some other Code related issue and it should clearly describe what it is affecting in a comment.migrationUse this to indicate that it may apply to an existing or announced migration.Use this to indicate that it may apply to an existing or announced migration.
Activity
[-]`collection.count` is deprecated[/-][+]MongoDB/*mongoose* deprecations[/+]Martii commentedon Aug 26, 2018
These show up in local pro (different MongoDB version... already emailed sizzle about this incongruity):
And some more...
Ref:
(node:32265) DeprecationWarning: collection.findAndModify is deprecated. Use findOneAndUpdate, findOneAndReplace or findOneAndDelete instead.... string
findAndModifynot 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
Some dep updates
Some dep updates (#1528)
Use URL WHATWG for *mongoose*
Use URL WHATWG for *mongoose* (#1554)
Squash a deprecation in our Code base
Squash a deprecation in our Code base (#1573)
Some dep updates
Some dep updates (#1611)
Some dep updates
Some dep updates (#1617)
Resquash for pro a mongoDB/*mongoose* deprecation
Resquash for pro a mongoDB/*mongoose* deprecation (#1619)
Rollback back-end *node* engine support to LTS
Rollback back-end *node* engine support to LTS (#1628)
Martii commentedon Jan 7, 2020
During a dep update test cycle...
... 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.Some dep updates and a downgrade
Some dep updates and a downgrade (#1703)
Some dep updates
Some dep updates (#1706)
Add `syncIndexes` to all models JIC
Add `syncIndexes` to all models JIC (#1750)