Skip to content

Releases

9.13.0

Choose a tag to compare

@vkarpov15 vkarpov15 released this 23 Nov 18:34

9.13.0 / 2026-11-23

  • feat: upgrade MongoDB driver to 7.9 #16724 oscarmaia
  • feat(schema+model+query): add defaultSort option to schemas, applies default sort to all queries unless sort explicitly specified #16676 #16577
  • perf(documentArray): avoid O(n*m) id() lookup when setting a documentarray to a plain array #16683 #16673
  • perf(subdocument): check isNew before isDirectModified() in markModified() #16743 g4lb
  • fix: make ducktyping more rigorous about inherited vs own properties, fix a few cases where user-specified $__ and $__isNested caused confusing errors #16723
  • types: handle nested projections in typescript #16678
  • docs(mongoose): document the mongoose.mongo property #16712 #16710 VaibhavBajpaij

8.24.11

Choose a tag to compare

@vkarpov15 vkarpov15 released this 23 Nov 15:54

8.24.11 / 2026-11-23

9.12.3

Choose a tag to compare

@vkarpov15 vkarpov15 released this 20 Nov 19:10

9.12.3 / 2026-11-20

  • fix(model): match pathsToSkip string paths exactly in Model.validate() #16706 NotAFlightRisk
  • fix(query): avoid casting $expr $in search value when it is an expression #16709 kwy404
  • fix(update): run update validators on mixed paths in subdocuments #16708 #16707 lazerg
  • fix(documentarray): respect castNonArrays path option on document arrays #16685 yxshee
  • types(schema): add removeVirtual() to Schema #16722 farisbasha
  • docs(document): correct checkKeys default for save() #16716 phatstraws
  • docs: fix typos in comments, tests, and typings #16714 ninglinLiu

9.12.2

Choose a tag to compare

@vkarpov15 vkarpov15 released this 16 Nov 19:56

9.12.2 / 2026-11-16

  • fix(query): make sanitizeFilter catch any fields that start with $ in top-level filter to avoid bypass using $_internalSchemaXor and other MongoDB internal expressions
  • fix(query): hardening for sanitizeProjection
  • fix(array): avoid converting BigInts to numbers in addToSet() #16693 luantaraschi
  • fix(cursor): propagate error passed to destroy() without re-emitting if error already emitted #16686 #16610 #16609 IbrahimHafez1
  • fix(query): throw cast errors and respect strict option in replaceOne() #16629 #16628 OmBhandwaldar
  • fix(castArrayFilters): cast $and/$or/$nor wherever they appear in an array filter #16638 #16637 mtechcave1
  • fix(document): allow setting dotted paths 3+ levels deep underneath single nested subdocuments #16691 RagedPanda
  • fix(connection): reset document state before retrying after a transient commit error #16640 #16639 IbrahimHafez1
  • fix(array): avoid converting BigInts to numbers in addToSet() #16693 luantaraschi
  • docs: add EOL date for Mongoose 7 #16719
  • docs(mongoose): document missing options for set() #16703 ragib-mrb

8.24.10

Choose a tag to compare

@vkarpov15 vkarpov15 released this 16 Nov 20:11

8.24.10 / 2026-11-16

  • fix(query): make sanitizeFilter catch any fields that start with $ in top-level filter to avoid bypass using $_internalSchemaXor and other MongoDB internal expressions
  • fix(query): hardening for sanitizeProjection

8.24.9

Choose a tag to compare

@vkarpov15 vkarpov15 released this 12 Nov 17:31

8.24.9 / 2026-11-12

  • fix(document): allow setting dotted paths 3+ levels deep underneath single nested subdocuments #16691 RagedPanda
  • fix(connection): don't disable autoIndex/autoCreate for a primary ReadPreference instance mrityunjay-pandey

9.12.1

Choose a tag to compare

@vkarpov15 vkarpov15 released this 09 Nov 20:58

9.12.1 / 2026-11-09

9.12.0

Choose a tag to compare

@vkarpov15 vkarpov15 released this 04 Nov 22:24

9.12.0 / 2026-11-04

  • feat: upgrade to mongodb driver 7.8 #16772 #16667
  • perf: improve for document arrays: cache paths with defaults and schemas with select paths; avoid unnecessary $isModified() lookup #16595
  • fix: make recompileSchema recompute derived caches and delay _preCompile() until an actual model is compiled (not subdocs or doc arrays) #16595
  • fix(array): compare UUIDs by value in indexOf() so pull() and addToSet() work #16606 luantaraschi
  • docs(query): remove unused use$geoWithin docs and property #16589 #16583

8.24.8

Choose a tag to compare

@vkarpov15 vkarpov15 released this 02 Nov 19:58

8.24.8 / 2026-11-02

9.11.4

Choose a tag to compare

@vkarpov15 vkarpov15 released this 23 Oct 17:02

9.11.4 / 2026-10-23

  • fix: avoid walking into inherited properties like toString when hydrating documents, setting dotted paths, and merging updates
  • fix: only use own properties when looking up discriminators by key
  • fix(schema): disallow setting special properties via virtual()
  • fix(query): respect connection-level sanitizeFilter in queries
  • fix(query): disallow special properties like __proto__ as paths in where() and mod()
  • fix(deps): upgrade mquery -> 6.0.1 to avoid prototype pollution with query helpers like gt() and in()