Mongoose 9.6.2 released
🛠️ Correctly handle modified subpaths when parent path is unset after modifying
📓 Handle compiling with exactOptionalPropertyTypes
github.com/Automattic/mongoo…
Mongoose 9.6.0 released
🌟 Upgrade mongodb node driver to 7.2
🌟 Support allowNull option to disallow null values even if not required
github.com/Automattic/mongoo…
Mongoose 9.4.1 released, reverts 1 fix from 9.4.0 that caused issues for a user
⏪ Revert "fix(setDefaultsOnInsert): run setters on default values during upsert"
github.com/Automattic/mongoo…
Mongoose 9.3.3 released
🛠️ Standardize to use MongooseError instead of plain Error
🔖 Make MergeType distributive to better support populate on models where the hydrated doc type is a union
github.com/Automattic/mongoo…
Mongoose 9.3.2 released
🛠️ Throw error when trying to set null or undefined as options
🛠️ Use MongooseError instead of Error
github.com/Automattic/mongoo…
Mongoose 9.3.0 released
🌟 Support discriminators option inline for better TypeScript support
🌟 Add pipelineForUnionWith() helper to allow reusing pipelines with $unionWith in TypeScript
github.com/Automattic/mongoo…
Test your Mongoose knowledge: what happens if you try to save a document with location = null with the following schema?
1⃣ Validation error
2⃣ Succeeds
3⃣ Cast error
Working on a new syntax for defining embedded discriminators directly in your schema definition
Key unlock here: automatic type inference can pick up the `discriminators` option and type the path as an enum 🦄
Mongoose 9.2.4 released
🛠️ Allow unknown keys in subdocs while retaining autocomplete suggestions
🛠️ Fix issues related to defining timestamps and virtuals with methods and/or statics in schema options
github.com/Automattic/mongoo…