Skip to content

Releases: Automattic/mongoose

8.22.0

27 Jan 20:30

Choose a tag to compare

8.22.0 / 2026-01-27

  • feat(model): allow passing strict option to hydrate() #15944 #15940

8.21.1

23 Jan 16:36

Choose a tag to compare

  • fix(clone): fix parent doc for map subdocuments and array subdocuments #15958 AbdelrahmanHafez
  • fix(document): when cloning a doc with subdocs, make sure the subdocs parent is the cloned doc #15904 #15901
  • fix: respect currentTime schema option in bulkWrite updates #15976 sderrow
  • types(models): support Mongoose query casting in AnyBulkWriteOperation filter property #15910
  • types: add toBSON() to documents #15927

9.1.5

20 Jan 16:20

Choose a tag to compare

9.1.5 / 2026-01-20

9.1.4

16 Jan 02:50

Choose a tag to compare

9.1.4 / 2026-01-15

9.1.3

09 Jan 19:06

Choose a tag to compare

9.1.3 / 2026-01-09

  • fix(model): support timestamps option to insertMany() as both boolean and QueryTimestampsConfig #15941 #15938
  • fix(query): include preview of current and incoming update in error when merging normal update with pipeline #15939 #15928
  • types(model): apply basic type casting to paths underneath subdocuments #15948 #15947
  • types(utility): make WithLevel1NestedPaths correctly handle PopulatedDoc and other TypeScript unions with Document members #15942 #15923
  • docs(schema): expose "DocumentArrayElement" #15590 hasezoey

9.1.2

05 Jan 14:55

Choose a tag to compare

9.1.2 / 2025-01-05

9.1.1

30 Dec 19:37

Choose a tag to compare

9.1.1 / 2025-12-30

  • fix(document): avoid 'Cannot mix array and object updates' on doc.updateOne() with pipeline #15928
  • docs: update default search version to 9.x #15926 #15925

9.1.0

29 Dec 20:25

Choose a tag to compare

9.1.0 / 2025-12-29

  • feat(model): make pathsToSave handle saving just a subpath of a modified path #15896
  • feat(document+model): pass options to pre('deleteOne') and update+options to pre('updateOne') hooks #15908 #15870
  • feat(versioning): optimistic concurrency exclude option, update docs for optimisticConcurrency options #15917 #15915 #15912 AbdelrahmanHafez
  • feat(document): add support for getAtomics() to allow custom container types to utilize atomics #15817
  • perf: optimize Object.keys() checks and optional chaining #15865 AbdelrahmanHafez
  • fix: add support for typescript style enums #15914 #15913 mjfwebb
  • fix(document): when cloning a doc with subdocs, make sure the subdocs parent is the cloned doc #15904 #15901
  • types(models): support Mongoose query casting in AnyBulkWriteOperation filter property #15918 #15910
  • types: allow calling create() with TRawDocType for better generics support #15903 #15902
  • types(document): add id virtual getter by default to HydrateDocument<> if TOverrides is Record<string, never> #15906 #15900
  • docs(schema): add lean to list of schema options #15907 #15894 #12081

8.21.0

29 Dec 19:26

Choose a tag to compare

8.21.0 / 2025-12-29

  • feat(document): add support for getAtomics() to allow custom container types to utilize atomics #15817
  • feat(document+model): pass options to pre('deleteOne') and update+options to pre('updateOne') hooks #15908 #15870
  • fix: add support for typescript style enums #15914 #15913 mjfwebb

8.20.4

18 Dec 22:05

Choose a tag to compare

8.20.4 / 2025-12-18

  • fix(model): ensure $isDeleted is set after calling doc.deleteOne() successfully #15898
  • fix(document): use bitwise OR to accumulate version mode flags #15893 #15888 AbdelrahmanHafez