-
-
Notifications
You must be signed in to change notification settings - Fork 3.9k
BREAKING CHANGE: use mongodb@5, bson@5 #12955
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
from what i can tell, this PR is not final yet, is there a ETA for mongodb's 5.0 release?
things to note:
- debug console.log's present
- documentation not yet noting that
new Types.ObjectId()
is required now - something seems like it does not work (see tests)?
- usage of alpha dependencies (mongodb, bson)
@hasezoey you can ignore this PR for now, it is a very rough draft and not close to ready for merge. We're not shipping this with alpha dependencies. No formal ETA for mongodb@5 release, but I would expect to see that released within the next few weeks. |
…e test failures with mongodb@5
…cause those are no longer in mongodb@5
…ropDatabase() an async function (no callback), other mongodb@5 compat
…d some deleteOne hooks errors
Co-authored-by: Bailey Pearson <bailey.pearson@gmail.com>
@hasezoey @AbdelrahmanHafez can you please take a look at this? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What a bunch of changes, the tests look way better now than the old nesting.
- it seems like the benchmark for
update
was deleted instead of updated, should there be a new one? - typescript types seem to not have been updated yet
- there are conflicts with the base branch
i have mainly some questions & style changes.
Co-authored-by: hasezoey <hasezoey@gmail.com>
Co-authored-by: hasezoey <hasezoey@gmail.com>
Co-authored-by: hasezoey <hasezoey@gmail.com>
Co-authored-by: hasezoey <hasezoey@gmail.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
though noticed some missing Query.prototype
functions in the callbacks removed
section
Co-authored-by: hasezoey <hasezoey@gmail.com>
should this PR also update mquery, or should this be done after this PR? |
…-changes BREAKING CHANGE: remove callbacks from types, add notes about HydratedDocument changes
@hasezoey we'll merge this PR into 7.0. Let's open a separate PR to bump mquery. |
support Mongoose 7, re: Automattic/mongoose#12955
Summary
Couple of notes:
mongoose.Types.ObjectId()
no longer works, need to donew mongoose.Types.ObjectId()
. ObjectId class's_bsontype
is now 'ObjectId', not 'ObjectID'.MongoClient.connect()
no longer supports callbacks. We will likely need to drop callback support as well in this version.Examples