Skip to content

Releases: Automattic/mongoose

8.4.5

05 Jul 17:45
Compare
Choose a tag to compare

8.4.5 / 2024-07-05

  • types: correct this for validate.validator schematype option #14720 #14696
  • docs(model): note that insertMany() with lean skips applying defaults #14723 #14698

8.4.4

25 Jun 20:54
Compare
Choose a tag to compare

8.4.4 / 2024-06-25

  • perf: avoid unnecesary get() call and use faster approach for converting to string #14673 #14394
  • fix(projection): handle projections on arrays in Model.hydrate() projection option #14686 #14680
  • fix(document): avoid passing validateModifiedOnly to subdocs so subdocs get fully validating if they're directly modified #14685 #14677
  • fix: handle casting primitive array with $elemMatch in bulkWrite() #14687 #14678
  • fix(query): cast $pull using embedded discriminator schema when discriminator key is set in filter #14676 #14675
  • types(connection): fix return type of withSession() #14690 tt-public
  • types: add $documents pipeline stage and fix $unionWith type #14666 nick-statsig
  • docs(findoneandupdate): improve example that shows findOneAndUpdate() returning doc before updates were applied #14671 #14670

8.4.3

17 Jun 21:59
Compare
Choose a tag to compare

8.4.3 / 2024-06-17

  • fix: remove 0x flamegraph files from release

8.4.2

17 Jun 21:50
Compare
Choose a tag to compare

8.4.2 / 2024-06-17

  • perf: more toObject() perf improvements #14623 #14606 #14394
  • fix(model): check the value of overwriteModels in options when calling discriminator() #14646 uditha-g
  • fix: avoid throwing TypeError when deleting an null entry on a populated Map #14654 futurliberta
  • fix(connection): fix up some inconsistencies in operation-end event and add to docs #14659 #14648
  • types: avoid inferring Boolean, Buffer, ObjectId as Date in schema definitions under certain circumstances #14667 #14630
  • docs: add note about parallelism in transations #14647 fiws

8.4.1

31 May 15:30
Compare
Choose a tag to compare

8.4.1 / 2024-05-31

  • fix: pass options to clone instead of get in applyVirtuals #14606 #14543 andrews05
  • fix(document): fire pre validate hooks on 5 level deep single nested subdoc when modifying after save() #14604 #14591
  • fix: ensure buildBulkWriteOperations target shard if shardKey is set #14622 #14621 matlpriceshape
  • types: pass DocType down to subdocuments so HydratedSingleSubdocument and HydratedArraySubdocument toObject() returns correct type #14612 #14601

8.4.0

17 May 11:07
Compare
Choose a tag to compare

8.4.0 / 2024-05-17

  • feat: upgrade mongodb -> 6.6.2 #14584
  • feat: add transactionAsyncLocalStorage option to opt in to automatically setting session on all transactions #14583 #13889
  • feat: handle initially null driver when instantiating Mongoose for Rollup support #14577 #12335
  • feat(mongoose): export omitUndefined() helper #14582 #14569
  • feat: add Model.listSearchIndexes() #14519 #14450
  • feat(connection): add listDatabases() function #14506 #9048
  • feat(schema): add schema-level readConcern option to apply default readConcern for all queries #14579 #14511
  • fix(error): remove model property from CastError to avoid printing all model properties to console #14568 #14529
  • fix(model): make bulkWrite() and insertMany() throw if throwOnValidationError set and all ops invalid #14587 #14572
  • fix(document): ensure transform function passed to toObject() options applies to subdocs #14600 #14589
  • types: add inferRawDocType helper #13900 #13772
  • types(document): make document _id type default to unknown instead of any #14541

8.3.5

15 May 11:13
Compare
Choose a tag to compare

8.3.5 / 2024-05-15

  • fix(query): shallow clone $or, $and if merging onto empty query filter #14580 #14567
  • types(model+query): pass TInstanceMethods to QueryWithHelpers so populated docs have methods #14581 #14574
  • docs(typescript): clarify that setting THydratedDocumentType on schemas is necessary for correct method context #14575 #14573

8.3.4

06 May 18:46
Compare
Choose a tag to compare

8.3.4 / 2024-05-06

  • perf(document): avoid cloning options using spread operator for perf reasons #14565 #14394
  • fix(query): apply translateAliases before casting to avoid strictMode error when using aliases #14562 #14521
  • fix(model): consistent top-level timestamps option for bulkWrite operations
    #14546 #14536
  • docs(connections): improve description of connection creation patterns #14564 #14528

8.3.3

29 Apr 20:10
Compare
Choose a tag to compare

8.3.3 / 2024-04-29

  • perf(document): add fast path for applying non-nested virtuals to JSON #14543
  • fix: make hydrate() recursively hydrate virtual populate docs if hydratedPopulatedDocs is set #14533 #14503
  • fix: improve timestamps option handling in bulkWrite #14546 #14536 sderrow
  • fix(model): make recompileSchema() overwrite existing document array discriminators #14527
  • types(schema): correctly infer Array<Schema.Types.*> #14534 #14367
  • types(query+populate): apply populate overrides to doc toObject() result #14525 #14441
  • types: add null to select override return type for findOne #14545 sderrow

8.3.2

16 Apr 16:40
Compare
Choose a tag to compare

8.3.2 / 2024-04-16

  • fix(populate): avoid match function filtering out null values in populate result #14518 #14494
  • types(query): make FilterQuery props resolve to any for generics support #14510 #14473 #14459
  • types(DocumentArray): pass DocType generic to Document for correct toJSON() and toObject() return types #14526 #14469
  • types(models): fix incorrect bulk write options #14513 emiljanitzek
  • docs: add documentation for calling schema.post() with async function #14514 #14305