Skip to content

Releases: Automattic/mongoose

6.4.2

01 Jul 19:34
Compare
Choose a tag to compare

6.4.2 / 2022-07-01

  • fix: keep autoIndex & autoCreate as true by default if read preference is primaryPreferred #11976
  • fix(types): improve inferred Schema Type to handle nested paths and ObjectIds #12007 iammola
  • fix(types): avoid inferring doc type from param to create() #12001
  • fix(types): make populate Paths generic consistently overwrite doc interface #11955
  • fix(types): allow null at ne expression second parameter #11996 jyeros
  • fix(types): change index "weights" to be more explicit #11997 hasezoey

6.4.1

27 Jun 18:15
Compare
Choose a tag to compare

6.4.1 / 2022-06-27

  • fix(schema): allow 0 for numbers if required and ref both set #11912
  • fix(query): skip applying default projections over slice projections #11940
  • fix(types): handle arrays in ApplyBasicQueryCasting correctly #11964
  • fix(types): fix $match typings #11969 andreialecu
  • fix(types): avoid adding non-existent properties from model constructor for typegoose #11960
  • fix(types): make Mongoose UpdateQuery compatible with MongoDB UpdateFilter #11911
  • fix(types): simplify MergeType constraints #11978
  • fix(types): correct references to Buffer for @types/node >= 16.0.0 < 16.6.0 #11963
  • fix(types): re-add the possibility to pass undefined for projection in Model.find #11965 ghost91-
  • fix(types): fix typo for indexes #11953 AbdelrahmanHafez
  • fix(document+types): document merge option #11913
  • docs: update schematypes.md #11981 korzio
  • docs: update validation.md #11982 korzio

6.4.0

17 Jun 19:45
Compare
Choose a tag to compare

6.4.0 / 2022-06-17

  • feat: upgrade mongodb driver -> 4.7.0 #11909 AbdelrahmanHafez
  • feat(types+document): add $assertPopulated() for working with manually populated paths in TypeScript #11843
  • feat(mongoose): add setDriver() function to allow overwriting driver in a more consistent way #11900
  • feat(types): add helpers to infer schema type automatically #11563 mohammad0-0ahmad
  • feat: add transform option to lean() #10423 IslandRhythms
  • feat(base): add support to set default immutable for createdAt globally #11888 AbdelrahmanHafez
  • fix: make doValidate() on document array elements run validation on the whole subdoc #11902
  • feat(types): add expression typings to Aggregate stages #11370 Uzlopak
  • fix: remove on from schema reserved keys #11580 IslandRhythms

6.3.9

17 Jun 19:08
Compare
Choose a tag to compare

6.3.9 / 2022-06-17

  • fix(document): handle nested paths underneath subdocuments when getting all subdocuments for pre save hooks #11917
  • fix(types): correct typing in post aggregate hooks #11924 GCastilho
  • docs: remove connect-option reconnectTries and reconnectInterval #11930 Uzlopak

6.3.8

13 Jun 18:09
Compare
Choose a tag to compare

6.3.8 / 2022-06-13

  • fix: revert 670b445 perf optimizations that caused some test failures #11541

6.3.6

07 Jun 16:54
Compare
Choose a tag to compare

6.3.6 / 2022-06-07

  • fix(update): apply timestamps to nested subdocs within $push and $addToSet #11775
  • fix(document): use shallow clone instead of deep clone for toObject() options #11776
  • fix: avoid checking for ObjectId with instanceof #11891 noseworthy
  • fix(types): Allow sorting by text score #11893
  • fix(types): allow schematype get() functions to return undefined #11561
  • fix(types): add Schema.discriminator #11855 Uzlopak
  • fix(types): discriminator generic type not being passed to schema #11898 GCastilho

6.3.5

30 May 20:32
Compare
Choose a tag to compare

6.3.5 / 2022-05-30

  • fix(document): avoid infinite recursion when calling toObject() on self-referencing document #11756
  • fix(document): avoid manually populating documents that are manually populated in another doc with different unpopulatedValue #11442
  • fix(document): fix ObjectId conversion for external schemas #11841 coyotte508
  • fix: fix codeql warnings #11817 Uzlopak
  • fix(types): allow passing TVirtuals to Schema class #11543
  • fix(types): Type of Connection.transaction() #11825 dwrss
  • docs(typescript): add coverage for TypeScript query helpers #11709
  • docs: fix documention of error handling #11844 Uzlopak
  • docs: typings mongoose.Error should reference to MongooseError #11850 Uzlopak
  • chore: improve issue templates #11794 Uzlopak
  • chore: use ts-benchmark instead of internal TS benchmarking #11798 mohammad0-0ahmad

6.3.4

19 May 18:54
Compare
Choose a tag to compare

6.3.4 / 2022-05-19

  • fix(schema): disallow using schemas with schema-level projection with map subdocuments #11698
  • fix(document): avoid setting nested paths to null when they're undefined #11723
  • fix: allow using comment with findOneAndUpdate(), count(), distinct() and hint with findOneAndUpdate() #11793
  • fix(document): clean modified subpaths when setting nested path to null after modifying subpaths #11764
  • fix(types): allow calling deleteModel() with RegExp in TypeScript #11812
  • docs(typescript): add section on PopulatedDoc to TypeScript populate docs #11685

6.3.3

09 May 16:24
Compare
Choose a tag to compare

6.3.3 / 2022-05-09

  • perf: avoid leaking memory when using populate() with QueryCursor because of reusing populate options with _docs #11641
  • fix(types): add _id back for LeanDocument #11769 #11761 taxilian
  • fix(model): add skipValidation option for bulkWrite() to allow skipping validation for insertOne and replaceOne #11663
  • fix(document): correctly $__reset() subdocuments that are under nested paths #11672
  • fix(query): handle casting BSONRegExp instances as RegExps in queries #11597
  • fix: correctly cast $not in $expr #11689
  • perf: optimize size of browser bundle, use buffer v.5.7.1 package to match buffer package of mongodb in browser bundle #11765 Uzlopak
  • docs: Query.populate docs do not include using an array of strings for the path param #11768 #11641 AbdelrahmanHafez
  • chore: add GitHub workflow to close stale "can't reproduce", "help", "needs clarification" issues #11753 Uzlopak
  • chore: remove Makefile dependency for compiling docs #11751 Uzlopak

6.3.2

02 May 16:20
Compare
Choose a tag to compare

6.3.2 / 2022-05-02

  • perf: avoid registering event listeners on subdocuments to reduce memory usage #11541
  • fix(setDefaultsOnInsert): set default if sibling of nested path is $set #11668
  • perf(document): remove unnecessary workaround for ignoring subpaths of arrays #11541
  • fix(types): various fixes and improvements for types #11650 taxilian
  • fix(types): make mongoose typings work without esmModuleInterop true #11695 Uzlopak
  • fix(types): support populate(path, fields, model) syntax #11649 #11598 mohammad0-0ahmad
  • fix(types): correct SchemaTypeOptions.get function signature #11561
  • fix: fix browser build for Webpack 5 #11717
  • docs: improve readme #11705 mahendrap1512