mongoose 6.2.2 → 6.2.3
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/CHANGELOG.md +19 -0
- package/dist/browser.umd.js +33 -33
- package/lib/document.js +25 -16
- package/lib/helpers/indexes/decorateDiscriminatorIndexOptions.js +14 -0
- package/lib/helpers/indexes/getRelatedIndexes.js +59 -0
- package/lib/helpers/populate/assignVals.js +4 -0
- package/lib/helpers/query/hasDollarKeys.js +7 -3
- package/lib/helpers/schema/getIndexes.js +6 -2
- package/lib/internal.js +9 -1
- package/lib/model.js +35 -49
- package/lib/schema.js +4 -0
- package/lib/schematype.js +9 -10
- package/lib/types/map.js +1 -1
- package/lib/utils.js +9 -3
- package/package.json +16 -18
- package/types/Error.d.ts +129 -0
- package/types/index.d.ts +21 -132
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,22 @@
|
|
|
1
|
+
6.2.3 / 2022-02-21
|
|
2
|
+
==================
|
|
3
|
+
* fix(model): avoid dropping base model indexes when using discriminators with `Connection.prototype.syncIndexes()` #11424 #11421 [AbdelrahmanHafez](https://github.com/AbdelrahmanHafez)
|
|
4
|
+
* fix(document): handle array defaults when selecting element underneath array #11376
|
|
5
|
+
* fix(populate): correctly handle depopulating populated subdocuments #11436
|
|
6
|
+
* fix(utils): improve deepEqual() handling for comparing objects with non-objects #11417
|
|
7
|
+
* fix(schema): allow declaring array of arrays using `[{ type: [String] }]` #11252
|
|
8
|
+
* perf: improve validation sync and async by replacing forEach with classic for loops #11414 [Uzlopak](https://github.com/Uzlopak)
|
|
9
|
+
* perf: make hasDollarKeys faster #11401 [Uzlopak](https://github.com/Uzlopak)
|
|
10
|
+
* fix(index.d.ts): ValidationError `errors` only contains CastError or ValidationError #11369 [Uzlopak](https://github.com/Uzlopak)
|
|
11
|
+
* fix(index.d.ts): make InsertManyResult.insertedIds return an array of Types.ObjectId by default #11197
|
|
12
|
+
* fix(index.d.ts): allow pre('save') middleware with pre options #11257
|
|
13
|
+
* docs(connections): improve replica set hostname docs with correct error message and info about `err.reason.servers` #11200
|
|
14
|
+
* docs(populate): add virtual populate match option documentation #11411 [remirobichet](https://github.com/remirobichet)
|
|
15
|
+
* docs(document): add note to API docs that flattenMaps defaults to `true` for `toJSON()` but not `toObject()` #11213
|
|
16
|
+
* docs(document+model): add populate option to populate() API docs #11170
|
|
17
|
+
* docs(migrating_to_6): add additional info about removing omitUndefined #11038
|
|
18
|
+
* docs(migrating_to_6): add model.exists breaking change returning doument instead of boolean [AbdelrahmanHafez](https://github.com/AbdelrahmanHafez)
|
|
19
|
+
|
|
1
20
|
6.2.2 / 2022-02-16
|
|
2
21
|
==================
|
|
3
22
|
* fix: fix QueryCursor and AggregationCursor compatibility with Node v17.5 #11381 [benjamingr](https://github.com/benjamingr)
|