Skip to content

Releases: Automattic/mongoose

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

8.3.1

08 Apr 18:40
Compare
Choose a tag to compare

8.3.1 / 2024-04-08

  • fix(document): make update minimization unset property rather than setting to null #14504 #14445
  • fix(model): make Model.recompileSchema() also re-apply discriminators #14500 #14444
  • fix(schema): deduplicate idGetter so creating multiple models with same schema doesn't result in multiple id getters #14492
  • fix: update kareem -> 2.6.3 for index.d.ts #14508 #14497
  • fix(mongoose): make setDriver() update mongoose.model() connections and collections #14505
  • types(validation): support function for validator message property, and add support for accessing validator reason #14499 #14496
  • docs: remove typo #14501 epmartini

8.3.0

03 Apr 18:25
Compare
Choose a tag to compare

8.3.0 / 2024-04-03

  • feat: use mongodb@6.5.0
  • feat(document): add validateAllPaths option to validate() and validateSync() #14467 #14414
  • feat: pathsToSave option to save() function #14385 #9583
  • feat(query): add options parameter to Query.prototype.sort() #14375 #14365
  • feat: add function SchemaType.prototype.validateAll #14434 #6910
  • fix: handle array schema definitions with of keyword #14447 #14416
  • types: add overwriteMiddlewareResult and skipMiddlewareFunction to types #14328 #14829

8.2.4

28 Mar 18:20
Compare
Choose a tag to compare

8.2.4 / 2024-03-28

  • types(query): bring "getFilter" and "getQuery" in-line with "find" and other types #14463 hasezoey
  • types(schema): re-export the defintion for SearchIndexDescription #14464 noseworthy
  • docs: removed unused hook from docs #14461 bernardarhia

8.2.3

21 Mar 21:57
Compare
Choose a tag to compare

8.2.3 / 2024-03-21

8.2.2

15 Mar 18:27
Compare
Choose a tag to compare

8.2.2 / 2024-03-15

  • fix(model): improve update minimizing to only minimize top-level properties in the update #14437 #14420 #13782
  • fix: add Null check in case schema.options['type'][0] is undefined #14431 Atharv-Bobde
  • types: consistently infer array of objects in schema as a DocumentArray #14430 #14367
  • types: add TypeScript interface for the new PipelineStage - Vector Search - solving issue #14428 #14429 jkorach
  • types: add pre and post function types on Query class #14433 #14432 IICarst
  • types(model): make bulkWrite() types more flexible to account for casting #14423
  • docs: update version support documentation for mongoose 5 & 6 #14427 hasezoey