Releases: Automattic/mongoose
Releases · Automattic/mongoose
9.6.3
9.6.3 / 2026-05-27
- fix(clone): isolate cloned arrays from source documents #16281 AbdelrahmanHafez
- fix(update): preserve user-provided
$setOnInsert.createdAtwithoverwriteImmutable: true#16278 #15781 AbdelrahmanHafez - fix(schema): always pass raw string value to error validators, only trim to 30 chars for maxlength validator #16238 #16236 #15550 #15571
- types: add
$percentileto TypeScript aggregation expression types #16290 #16288 - docs: update default pool sizes on createConnection() #16295 torbiak-samdesk
- docs: improve code block copy button behavior and sidebar scrolling #16294 DraXx-Van
- docs: remove broken link to deleted schema example #16297 kaseken
8.24.0
9.6.2
9.6.1
9.6.1 / 2026-04-29
- types(objectid): fix
_idgetter helper on ObjectId #16251 noseworthy
9.6.0
9.6.0 / 2026-04-28
8.23.1
8.23.1 / 2026-04-23
- fix(model): support sort option in Model.bulkWrite() updateOne and replaceOne operations #16091 #16079
- fix(setDefaultsOnInsert): check child filter paths before applying defaults (backport #16031 to 8.x) #16219 marklai1998
- fix(schema): always pass raw string value to error validators, only trim to 30 chars for maxlength validator #16238 #16236 #15550 #15571
9.5.0
9.5.0 / 2026-04-20
- feat(debug): add
timestampoption to debug output #16216 rejunp - feat(query): add
cloneUpdateoption to explicitly disable update cloning #16230 #16202 - feat(query): extend
defaultsquery option tofind()#16226 sderrow - fix(query): avoid cloning update until absolutely necessary to better support updates with
__proto__#16230 #16202 - fix(query): avoid treating documents with a
$set()method as objects with a$setproperty when casting updates #16230 - fix(queryHelpers): pass default options to discriminators #16227 #16226
- fix(document): handle including and excluding nested paths with optimistic concurrency #16177 #16054
- fix(model): throw
ObjectParameterErrorininsertOne()if doc is not an object #16221 IshitaSingh0822 - fix(cast): preserve reason in
CastErrormessage aftersetModel()#16167 White-Devil2839 - perf(model): remove unnecessary clone in
findOneAndUpdate()#16230 - perf: use kareem 3.3.0 mongoosejs/kareem#45 #16229
- chore: use TSTyche assertions #16222 mrazauskas
9.4.1
9.4.0
9.4.0 / 2026-04-03
- perf(document+model): avoid parallel save error instantiation, simplify resetting atomics, streamline validation and collection handling
- feat(document): add $getChanges() alias, deprecate getChanges() #15959 techcodie
- fix(schema): support toJSONSchema on unions #16179
- fix(schema): implement validation for Union schemas and subdocuments techcodie
- fix(connection): snapshot Date in heartbeat handler and flush queue on recovery #16183 andreialecu
- fix(model): use duck-typing with version check to validate the argument to useConnection() is actually a connection #16098
- fix(setDefaultsOnInsert): run setters on default values during upsert #16051 mahmoodhamdi
- fix(utils): properly compare Set objects in deepEqual KhanjarSingh
- fix(utils): wrap discriminator merge check in parentheses to fix precedence Necro-Rohan
- fix(schema): correct template literal in encryptionType error message Mridul012
- fix(schema): correct error when unsupported query operator with number #16062
- fix(types): make MergeType and UnpackedIntersection distributive over union types techcodie
- types: add
idto HydratedDocument virtuals by default unless explicitly set #16178 - types(populate): use marker type to track populated vs depopulated type for perf
- types(populate): retain populated paths in toObject() and toJSON() unless depopulate: true set #16085
- types(query): make TypeScript error on $and with unrecognized query operator
- chore: use TSTyche assertions mrazauskas
- docs(connection): remove references to useUnifiedTopology and fix backtick
- docs: fix typo 'retreiving' -> 'retrieving' in SchemaType getter JSDoc yogesh968
- docs: fix typos around 'retrieve' in schemaType and tests ayushshukla1807
- docs: fix typos in code comments Goldyvaiiii
9.3.3
9.3.3 / 2026-03-25
- fix(schemaType): standardize to use MongooseError instead of plain Error #16172 VIPAX-JIT
- types: make MergeType distributive to better support populate on models where the hydrated doc type is a union #16101 #16161
- docs: upgrade http:// links to https:// in connections.md #16163 Puxhkar
- docs: fix typographical, grammatical errors & documentation clarity improvements #16175 yogesh968
- docs: clarify multi-mongos support documentation for sharded clusters