Skip to content

Releases: Automattic/mongoose

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

8.2.1

04 Mar 22:25
Compare
Choose a tag to compare

8.2.1 / 2024-03-04

  • fix(document): make $clone avoid converting subdocs into POJOs #14395 #14353
  • fix(connection): avoid unhandled error on createConnection() if on('error') handler registered #14390 #14377
  • fix(schema): avoid applying default write concern to operations that are in a transaction #14391 #11382
  • types(querycursor): correct cursor async iterator type with populate() support #14384 #14374
  • types: missing typescript details on options params of updateMany, updateOne, etc. #14382 #14379 #14378 FaizBShah sderrow
  • types: allow Record<string, string> as valid query select argument #14371 sderrow

8.2.0

22 Feb 20:28
Compare
Choose a tag to compare

8.2.0 / 2024-02-22

  • feat(model): add recompileSchema() function to models to allow applying schema changes after compiling #14306 #14296
  • feat: add middleware for bulkWrite() and createCollection() #14358 #14263 #7893
  • feat(model): add hydratedPopulatedDocs option to make hydrate recursively hydrate populated docs #14352 #4727
  • feat(connection): add withSession helper #14339 #14330

8.1.3

16 Feb 22:14
Compare
Choose a tag to compare

8.1.3 / 2024-02-16

  • fix: avoid corrupting $set-ed arrays when transaction error occurs #14346 #14340
  • fix(populate): handle ref() functions that return a model instance #14343 #14249
  • fix: insert version key when using insertMany even if toObject.versionKey set to false #14344
  • fix(cursor): make aggregation cursor support transform option to match query cursor #14348 #14331
  • docs(document): clarify that transform function option applies to subdocs #13757

8.1.2

08 Feb 23:22
Compare
Choose a tag to compare

8.1.2 / 2024-02-08

  • fix: include virtuals in document array toString() output if toObject.virtuals set #14335 #14315
  • fix(document): handle setting nested path to spread doc with extra properties #14287 #14269
  • fix(populate): call setter on virtual populated path with populated doc instead of undefined #14314
  • fix(QueryCursor): remove callback parameter of AggregationCursor and QueryCursor #14299 DevooKim
  • types: add typescript support for arbitrary fields for the options parameter of Model functions which are of type MongooseQueryOptions #14342 #14341 FaizBShah
  • types(model): correct return type for findOneAndUpdate with includeResultMetadata and lean set #14336 #14303
  • types(connection): add type definition for createCollections() #14295 #14279
  • docs(timestamps): clarify that replaceOne() and findOneAndReplace() overwrite timestamps #14337 #14309

8.1.1

24 Jan 22:22
Compare
Choose a tag to compare

8.1.1 / 2024-01-24

  • fix(model): throw readable error when calling Model() with a string instead of model() #14288 #14281
  • fix(document): handle setting nested path to spread doc with extra properties #14287 #14269
  • types(query): add back context and setDefaultsOnInsert as Mongoose-specific query options #14284 #14282
  • types(query): add missing runValidators back to MongooseQueryOptions #14278 #14275

8.1.0

16 Jan 17:29
Compare
Choose a tag to compare

8.1.0 / 2024-01-16

  • feat: upgrade MongoDB driver -> 6.3.0 #14241 #14189 #14108 #14104
  • feat: add Atlas search index helpers to Models and Schemas #14251 #14232
  • feat(connection): add listCollections() helper to connections #14257
  • feat(schematype): merge rather than overwrite default schematype validators #14124 #14070
  • feat(types): support type hints in InferSchemaType #14008 JavaScriptBach