mongoose 6.2.3 → 6.2.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/.lgtm.yml ADDED
@@ -0,0 +1,3 @@
1
+ path_classifiers:
2
+ test:
3
+ - lib
package/CHANGELOG.md CHANGED
@@ -1,3 +1,42 @@
1
+ 6.2.6 / 2022-03-11
2
+ ==================
3
+ * fix(types): correct reference to cursor TypeScript bindings #11513 [SimonHausdorf](https://github.com/SimonHausdorf)
4
+ * fix(types): allow calling Query.prototype.populate() with array of strings #11518
5
+ * fix(types): export and refactor types of PreMiddlewareFunction, PreSaveMiddlewareFunction, PostMiddlewareFunction, ErrorHandlingMiddlewareFunction #11485 [Uzlopak](https://github.com/Uzlopak)
6
+
7
+ 6.2.5 / 2022-03-09
8
+ ==================
9
+ * fix(mongoose): add isObjectIdOrHexString() to better capture the most common use case for `isValidObjectId()` #11419
10
+ * fix(query): prevent modifying discriminator key in updates using operators other than `$set` #11456
11
+ * fix(populate+types): call foreignField functions with doc as 1st param, better typings for `localField` and `foreignField` functions #11321
12
+ * fix(populate): return an array when using populate count on an array localField #11307
13
+ * fix(query): avoid error when using $not with arrays #11467
14
+ * perf: only deep clone validators if necessary #11412 [Uzlopak](https://github.com/Uzlopak)
15
+ * fix(types): rename definition files to lowercase to avoid typescript bug #11469
16
+ * fix(types): aggregate.sort() accepts a string but also `{ field: 'asc'|'ascending'|'desc'|'descending' }` #11479 [simonbrunel](https://github.com/simonbrunel)
17
+ * fix(types): extract and refactor aggregationcursor and querycursor #11488 [Uzlopak](https://github.com/Uzlopak)
18
+ * fix(types): extract and refactor schemaoptions #11484 [Uzlopak](https://github.com/Uzlopak)
19
+ * fix(types): make first param to `Query.prototype.populate()` a string #11475 [minhthinhls](https://github.com/minhthinhls)
20
+ * fix(types): improve type checking for doc arrays in schema definitions #11241
21
+ * docs: fix length comparaison in lean.test.js #11493 [zazapeta](https://github.com/zazapeta)
22
+ * docs(timestamps): fix typo #11481 [saibbyweb](https://github.com/saibbyweb)
23
+ * docs: fix broken link to rawResult #11459 [chhiring90](https://github.com/chhiring90)
24
+
25
+ 6.2.4 / 2022-02-28
26
+ ==================
27
+ * fix(query): correctly return full deleteOne(), deleteMany() result #11211
28
+ * fix(query): handle update validators on deeply nested subdocuments #11455 #11394
29
+ * fix(discriminator): handle modifying multiple nested paths underneath a discriminator #11428
30
+ * perf: improve isAsyncFunction #11408 [Uzlopak](https://github.com/Uzlopak)
31
+ * fix(index.d.ts): add typedefs for Schema `pick()` #11448 [Moisei-Shkil](https://github.com/Moisei-Shkil)
32
+ * fix(index.d.ts): allow type override for distinct() #11306
33
+ * fix(index.d.ts): allow array of validators in schema definition #11355
34
+ * fix(index.d.ts): improve connection typings #11418 [Uzlopak](https://github.com/Uzlopak)
35
+ * docs: add timestamps docs #11336
36
+ * docs(timestamps): explain how timestamps works under the hood #11336
37
+ * docs(migrating_to_6): add model.exists breaking change returning doument instead of boolean #11407 [AbdelrahmanHafez](https://github.com/AbdelrahmanHafez)
38
+ * docs(index.d.ts): add docs for FilterQuery, UpdateQuery, and LeanDocument #11457 [Moisei-Shkil](https://github.com/Moisei-Shkil)
39
+
1
40
  6.2.3 / 2022-02-21
2
41
  ==================
3
42
  * fix(model): avoid dropping base model indexes when using discriminators with `Connection.prototype.syncIndexes()` #11424 #11421 [AbdelrahmanHafez](https://github.com/AbdelrahmanHafez)
@@ -10,6 +49,7 @@
10
49
  * fix(index.d.ts): ValidationError `errors` only contains CastError or ValidationError #11369 [Uzlopak](https://github.com/Uzlopak)
11
50
  * fix(index.d.ts): make InsertManyResult.insertedIds return an array of Types.ObjectId by default #11197
12
51
  * fix(index.d.ts): allow pre('save') middleware with pre options #11257
52
+ * fix(index.d.ts): add `supressReservedKeysWarning` option to schema #11439 [hiukky](https://github.com/hiukky)
13
53
  * docs(connections): improve replica set hostname docs with correct error message and info about `err.reason.servers` #11200
14
54
  * docs(populate): add virtual populate match option documentation #11411 [remirobichet](https://github.com/remirobichet)
15
55
  * docs(document): add note to API docs that flattenMaps defaults to `true` for `toJSON()` but not `toObject()` #11213