-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
refactor!: remove strict/callback mode from Db.collection helper #2817
Conversation
…t-collection-option
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.
All small points, I marked the skipped tests I found so to track them but maybe your reasoning for skipping and not deleting is the same for all of them?
And some docs/test suggestions
if (!options) { | ||
options = {}; | ||
} else if (typeof options === 'function') { | ||
throw new TypeError('The callback form of this helper has been removed.'); |
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.
@dariakp Just making sure we catch this, depending on who merges first this is a new error to convert.
Maybe this is best as a MongoError?
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.
I think this will likely go in first so I'll make a note to rebase my branch and check for any added TypeError/MongoError
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!
Strict mode has been removed from the `Db.collection` helper, as well as the callback argument which was required by strict mode. `Db.createCollection` can be used when a collection needs to be created explicitly. NODE-2752
Strict mode has been removed from the
Db.collection
helper,as well as the callback argument which was required by strict mode.
Db.createCollection
can be used when a collection needs to becreated explicitly.
NODE-2752