{"action":"created","issue":{"url":"https://api.github.com/repos/Automattic/mongoose/issues/6922","repository_url":"https://api.github.com/repos/Automattic/mongoose","labels_url":"https://api.github.com/repos/Automattic/mongoose/issues/6922/labels{/name}","comments_url":"https://api.github.com/repos/Automattic/mongoose/issues/6922/comments","events_url":"https://api.github.com/repos/Automattic/mongoose/issues/6922/events","html_url":"https://github.com/Automattic/mongoose/issues/6922","id":354147871,"node_id":"MDU6SXNzdWUzNTQxNDc4NzE=","number":6922,"title":"Docs page for how to fix deprecation warnings","user":{"login":"vkarpov15","id":1620265,"node_id":"MDQ6VXNlcjE2MjAyNjU=","avatar_url":"https://avatars2.githubusercontent.com/u/1620265?v=4","gravatar_id":"","url":"https://api.github.com/users/vkarpov15","html_url":"https://github.com/vkarpov15","followers_url":"https://api.github.com/users/vkarpov15/followers","following_url":"https://api.github.com/users/vkarpov15/following{/other_user}","gists_url":"https://api.github.com/users/vkarpov15/gists{/gist_id}","starred_url":"https://api.github.com/users/vkarpov15/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vkarpov15/subscriptions","organizations_url":"https://api.github.com/users/vkarpov15/orgs","repos_url":"https://api.github.com/users/vkarpov15/repos","events_url":"https://api.github.com/users/vkarpov15/events{/privacy}","received_events_url":"https://api.github.com/users/vkarpov15/received_events","type":"User","site_admin":false},"labels":[{"id":179219,"node_id":"MDU6TGFiZWwxNzkyMTk=","url":"https://api.github.com/repos/Automattic/mongoose/labels/docs","name":"docs","color":"444444","default":false}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":{"url":"https://api.github.com/repos/Automattic/mongoose/milestones/251","html_url":"https://github.com/Automattic/mongoose/milestone/251","labels_url":"https://api.github.com/repos/Automattic/mongoose/milestones/251/labels","id":3610306,"node_id":"MDk6TWlsZXN0b25lMzYxMDMwNg==","number":251,"title":"5.2.13","description":"","creator":{"login":"vkarpov15","id":1620265,"node_id":"MDQ6VXNlcjE2MjAyNjU=","avatar_url":"https://avatars2.githubusercontent.com/u/1620265?v=4","gravatar_id":"","url":"https://api.github.com/users/vkarpov15","html_url":"https://github.com/vkarpov15","followers_url":"https://api.github.com/users/vkarpov15/followers","following_url":"https://api.github.com/users/vkarpov15/following{/other_user}","gists_url":"https://api.github.com/users/vkarpov15/gists{/gist_id}","starred_url":"https://api.github.com/users/vkarpov15/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vkarpov15/subscriptions","organizations_url":"https://api.github.com/users/vkarpov15/orgs","repos_url":"https://api.github.com/users/vkarpov15/repos","events_url":"https://api.github.com/users/vkarpov15/events{/privacy}","received_events_url":"https://api.github.com/users/vkarpov15/received_events","type":"User","site_admin":false},"open_issues":0,"closed_issues":13,"state":"closed","created_at":"2018-08-30T15:14:40Z","updated_at":"2018-09-04T12:49:18Z","due_on":"2018-09-03T07:00:00Z","closed_at":"2018-09-04T12:49:18Z"},"comments":18,"created_at":"2018-08-27T01:13:47Z","updated_at":"2018-09-06T00:42:08Z","closed_at":"2018-09-04T12:25:51Z","author_association":"COLLABORATOR","body":"After #6917 it should now be possible to clear up all deprecation warnings by:\r\n\r\n* Replacing `update()` with `updateOne()`, `updateMany()`, or `replaceOne()`\r\n* Replacing `remove()` with `deleteOne()` or `deleteMany()`\r\n* Setting `mongoose.set('useFindAndModify', false);`\r\n* Setting `mongoose.set('useCreateIndex', true);`\r\n* Setting `mongoose.set('useNewUrlParser', true);`\r\n\r\nNeed a docs page to summarize this."},"comment":{"url":"https://api.github.com/repos/Automattic/mongoose/issues/comments/418925973","html_url":"https://github.com/Automattic/mongoose/issues/6922#issuecomment-418925973","issue_url":"https://api.github.com/repos/Automattic/mongoose/issues/6922","id":418925973,"node_id":"MDEyOklzc3VlQ29tbWVudDQxODkyNTk3Mw==","user":{"login":"lineus","id":6015453,"node_id":"MDQ6VXNlcjYwMTU0NTM=","avatar_url":"https://avatars3.githubusercontent.com/u/6015453?v=4","gravatar_id":"","url":"https://api.github.com/users/lineus","html_url":"https://github.com/lineus","followers_url":"https://api.github.com/users/lineus/followers","following_url":"https://api.github.com/users/lineus/following{/other_user}","gists_url":"https://api.github.com/users/lineus/gists{/gist_id}","starred_url":"https://api.github.com/users/lineus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lineus/subscriptions","organizations_url":"https://api.github.com/users/lineus/orgs","repos_url":"https://api.github.com/users/lineus/repos","events_url":"https://api.github.com/users/lineus/events{/privacy}","received_events_url":"https://api.github.com/users/lineus/received_events","type":"User","site_admin":false},"created_at":"2018-09-06T00:42:08Z","updated_at":"2018-09-06T00:42:08Z","author_association":"COLLABORATOR","body":"@arastu can you create a reproducible example with one or more files where you demonstrate that you are using 5.2.13 and are seeing one or more of these warnings?\r\n\r\nFor Example:\r\n\r\n### index.js\r\n```js\r\n#!/usr/bin/env node\r\n'use strict';\r\n\r\nconst assert = require('assert');\r\nconst mongoose = require('mongoose');\r\nmongoose.set('useCreateIndex', true);\r\nmongoose.set('useFindAndModify', false);\r\nmongoose.connect('mongodb://localhost:27017/test', { useNewUrlParser: true });\r\nconst conn = mongoose.connection;\r\n\r\n\r\nconst One = require('./one');\r\nconst Two = require('./two');\r\n\r\nconst one = new One({ name: '1' });\r\nconst two = new Two({ name: '2' });\r\n\r\nasync function run() {\r\n  assert.strictEqual(mongoose.version, '5.2.13');\r\n  await conn.dropDatabase();\r\n  await Promise.all([One.init(), Two.init()]);\r\n  await one.save();\r\n  await two.save();\r\n  await One.findOneAndUpdate({}, { name: 'one' });\r\n  await Two.findOneAndUpdate({}, { name: 'two' });\r\n  console.log(`${mongoose.version} should show no deprecations with the new settings.`);\r\n  return conn.close();\r\n}\r\n\r\nrun();\r\n```\r\n### one.js\r\n```js\r\n'use strict';\r\n\r\nconst mongoose = require('mongoose');\r\n\r\nconst schema = new mongoose.Schema({ name: { type: String, unique: true } });\r\n\r\nmodule.exports = mongoose.model('one', schema);\r\n```\r\n### two.js\r\n```js\r\n'use strict';\r\n\r\nconst mongoose = require('mongoose');\r\n\r\nconst schema = new mongoose.Schema({ name: { type: String, unique: true } });\r\n\r\nmodule.exports = mongoose.model('two', schema);\r\n```\r\n\r\n### Output:\r\n```\r\n6922: ./index.js\r\n5.2.13 should show no deprecations with the new settings.\r\n6922:\r\n```\r\n"}}
{"actor":{"display_login":"lineus"}}