Repository navigation
Releases
Releases · Automattic/mongoose
9.12.1
9.12.1 / 2026-11-09
- perf(update): avoid quadratic ancestor lookup in update validators and validate nested array subdocs once #16586 https://github.com/Re-cool
- perf: keep lib/ source within Latin-1 #16681 orgads
- perf(map): avoid quadratic concat() when creating a MongooseMap from an object #16677 ptweezy
- fix(array): keep earlier pushed values when push() is called again with $each #16619 #16618 maxymlyskov
- fix(model+query): handle inherited read preference and read concern on cloned queries #16668 #16632
- fix(timestamps): set timestamps on subdocs pushed via array filters #16615 #8809 vaidehi-snk
- fix(model): validate paths under a nested path passed to Model.validate() #16653 NotAFlightRisk
- fix(update): skip array-level validators for $pull with $in #16666 AnkitKumar61
- fix(cursor): finish destruction after terminal initialization #16612 IbrahimHafez1
9.12.0
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
8.24.8 / 2026-11-02
- fix(schema): remove map paths cleanly, including maps under nested paths (backport to 8.x) #16625 #16461 #16457 mrityunjay-pandey
- fix(schema): keep the map value schematype a single object when cloning (backport to 8.x) #16624 #16473 mrityunjay-pandey
- fix(map): support ObjectId keys in MongooseMap#has() (backport to 8.x #16634 mrityunjay-pandey
- fix(hydration): use the doc model for looking up a ref (backport to 8.x) #16623 #16453 mrityunjay-pandey
- fix(document): replace {MODEL} in custom cast error messages from document validation (backport to 8.x) #16622 #16480 mrityunjay-pandey
- fix(schema): run setters declared on the union path itself (backport to 8.x) #16621 #16528 mrityunjay-pandey
9.11.4
9.11.4 / 2026-10-23
- fix: avoid walking into inherited properties like
toStringwhen 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()
8.24.7
8.24.7 / 2026-10-23
- fix: avoid walking into inherited properties like
toStringwhen 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 -> 5.0.1 to avoid prototype pollution with query helpers like gt() and in()
9.11.3
9.11.3 / 2026-10-21
- fix(update): honor overwriteImmutable in upserts and nested timestamps #16614 #15781 #8619 AbdelrahmanHafez
- fix(model): stop Model.validate() crashing on missing nested objects #16600 NotAFlightRisk
- fix(connection): don't disable autoIndex/autoCreate for a primary ReadPreference instance #16592 NgoQuocViet2001
- docs: remove references to MongoDB versions older than 6.x #16593
8.24.6
8.24.6 / 2026-10-20
- fix(array): compare dates by value in indexOf() so pull() removes them #16590 #16535 mrityunjay-pandey
- fix: preserve circular arrays when cloning with a seen map #16598 #16514 mrityunjay-pandey
- fix(cast): reject arrays when casting to Int32 or Double #16597 #16446 mrityunjay-pandey
- fix(query): avoid path collision when excluding subdocument with select: false child #16604 #16409 #12798 mrityunjay-pandey
- fix(query): pass schema through when casting a nested \ comparison #16605 #16496 mrityunjay-pandey
9.11.2
9.11.2 / 2026-10-12
- perf: avoid applying saveSubdocs and sharding plugins to subdocuments #16585
- perf: upgrade to kareem@3.4.1 for mongoosejs/kareem#47 #16588
- fix(model): cast array filter values in bulkWrite() #16574 #16573 OmBhandwaldar
- fix(schema): allow function messages for number min/max and string minlength #16579 #16572 #8512 NotAFlightRisk
- types: make MergeType more efficiently handle MergeType<A, {}> #16581 #16580
- docs: fix broken API anchors and a malformed link #16583 SatvikMishra08
9.11.1
9.11.1 / 2026-10-07
- fix(document): call recursive toObject() when setting a path to a nested object #16571
- fix(update): keep casting array filters after a path not in the schema #16558 giaBaoJS
- fix(document): apply flattenDecimals when toObject() takes the shallow fast path #16569 #16568 jeremyml
- fix(query): cast operators under $not inside $elemMatch on primitive arrays #16542 #13880 breken-ai
- fix(query): use embedded discriminator schema when filter selects the key with $eq or $in #16543 breken-ai
- fix(documentarray): don't pass arrayPathIndex to subdocuments when initializing nested document arrays #16546 Mohamed-Elshesheny
- fix(cursor): await driver cleanup when destroying query cursors #16562 #16560 IbrahimHafez1
- fix(cursor): reject getDriverCursor after initialization errors #16563 #16561 IbrahimHafez1
- types(schema): treat Int32 paths as number #16565 #16564 lazerg
- types(models): align UpdateOneModel and UpdateManyModel update typing with UpdateQuery #16559 #16545 aipd506
9.11.0
9.11.0 / 2026-10-05
- feat: use MongoDB Node.js driver 7.7.x #16550
- feat(query): add Query.prototype.findAndCount() for composable paginated queries #16508 #16504 lokeshllkumar
- fix: avoid double-calling validators on document arrays underneath nested paths #16484 #16291 #5411
- types: pass TLeanResultType into query for type narrowing support with lean() #16523 #16519
- docs(guide): use async/await instead of removed callbacks #16566 joi-agent
- test: run TypeScript tests on typescript 5+7 with combinations of exactOptionalPropertyTypes, skipLibCheck, strict #16510 #16506