Packages

mongoose

9.12.2 · 16 Nov 2026MIT9.4M / weekRepositoryHomepagenpmAtom feed

Upgrading mongoose From 9.12.0 to 9.13.0

4 releases in betweenevery note read

Other targets from 9.12.0Latest9.12.2
0
changes to make
0
advisories fixed
8
new
20
fixes

Release by release

  1. 9.13.0

    23 Nov 20264 new · 2 fixes
    • New

      Upgrade MongoDB driver to 7.9 #16724 oscarmaia

    • New

      schema+model+query: Add defaultSort option to schemas, applies default sort to all queries unless sort explicitly specified #16676 #16577

    • New

      documentArray: Avoid O(n*m) id() lookup when setting a documentarray to a plain array #16683 #16673

    • New

      subdocument: Check isNew before isDirectModified() in markModified() #16743 g4lb

    • Fixed

      Make ducktyping more rigorous about inherited vs own properties, fix a few cases where user-specified $__ and $__isNested caused confusing errors #16723

    • Fixed

      types: Handle nested projections in typescript #16678

  2. 9.12.3

    20 Nov 20261 new · 4 fixes
    • New

      types(schema): add removeVirtual() to Schema #16722 farisbasha

    • Fixed

      model: Match pathsToSkip string paths exactly in Model.validate() #16706 NotAFlightRisk

    • Fixed

      query: Avoid casting $expr $in search value when it is an expression #16709 kwy404

    • Fixed

      update: Run update validators on mixed paths in subdocuments #16708 #16707 lazerg

    • Fixed

      documentarray: Respect castNonArrays path option on document arrays #16685 yxshee

  3. 9.12.2

    16 Nov 20268 fixes
    • Fixed

      query: Make sanitizeFilter catch any fields that start with $ in top-level filter to avoid bypass using $_internalSchemaXor and other MongoDB internal expressions

    • Fixed

      query: Hardening for sanitizeProjection

    • Fixed

      array: Avoid converting BigInts to numbers in addToSet() #16693 luantaraschi

    • Fixed

      cursor: Propagate error passed to destroy() without re-emitting if error already emitted #16686 #16610 #16609 IbrahimHafez1

  4. 9.12.1

    9 Nov 20263 new · 6 fixes
    • New

      update: Avoid quadratic ancestor lookup in update validators and validate nested array subdocs once #16586 github.com/Re-cool

    • New

      Keep lib/ source within Latin-1 #16681 orgads

    • New

      map: Avoid quadratic concat() when creating a MongooseMap from an object #16677 ptweezy

    • Fixed

      array: Keep earlier pushed values when push() is called again with $each #16619 #16618 maxymlyskov

5 internal lines (docs, tests, tooling) left out.

A whole project to check? Paste its package.json in the dependency check: every deprecated, outdated or vulnerable dependency, with what to upgrade to. Free, no account.