-
-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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
setDefaultsOnInsert type broken in 8.1.0 #14282
Comments
I'm sorry for the inconvenience, this was a mistake that we fixed in #14278. We will ship 8.1.1 with the fix later today. |
Actually nvm, I checked and #14278 doesn't fix this particular issue. I'll create a separate PR in a little bit. |
vkarpov15
added a commit
that referenced
this issue
Jan 23, 2024
…e-specific query options Fix #14282
vkarpov15
added a commit
that referenced
this issue
Jan 23, 2024
types(query): add back `context` and `setDefaultsOnInsert` as Mongoose-specific query options
Thanks for the fast response! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Prerequisites
Mongoose version
8.1.0
Node.js version
20.x
MongoDB server version
6.x
Typescript version (if applicable)
5.3.x
Description
The following code
Results in this type error
Object literal may only specify known properties, and 'setDefaultsOnInsert' does not exist in type 'UpdateOptions & Omit<MongooseQueryOptions<AwardFare>, "lean">'.
From what I can understand
setDefaultsOnInsert
hasn't been removed in the updated mongo driver version, and if it has this version of Mongoose should had been released as 9.0 and not 8.1.0.This worked in 8.0.4
Steps to Reproduce
See description
Expected Behavior
No response
The text was updated successfully, but these errors were encountered: