mongoose 5.12.12 → 5.13.0

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/History.md CHANGED
@@ -1,3 +1,45 @@
1
+ 5.13.0 / 2021-06-28
2
+ ===================
3
+ * feat(query): add sanitizeProjection option to opt in to automatically sanitizing untrusted query projections #10243
4
+ * feat(model): add `bulkSave()` function that saves multiple docs in 1 `bulkWrite()` #9727 #9673 [AbdelrahmanHafez](https://github.com/AbdelrahmanHafez)
5
+ * feat(document): allow passing a list of virtuals or `pathsToSkip` to apply in `toObject()` and `toJSON()` #10120
6
+ * fix(model): make Model.validate use object under validation as context by default #10360 [AbdelrahmanHafez](https://github.com/AbdelrahmanHafez)
7
+ * feat(document): add support for pathsToSkip in validate and validateSync #10375 [AbdelrahmanHafez](https://github.com/AbdelrahmanHafez)
8
+ * feat(model): add `diffIndexes()` function that calculates what indexes `syncIndexes()` will create/drop without actually executing any changes #10362 [IslandRhythms](https://github.com/IslandRhythms)
9
+ * feat(document): avoid using sessions that have ended, so you can use documents that were loaded in the session after calling `endSession()` #10306
10
+
11
+ 5.12.15 / 2021-06-25
12
+ ====================
13
+ * fix(index.d.ts): add extra TInstanceMethods generic param to `Schema` for cases when we can't infer from Model #10358
14
+ * fix(index.d.ts): added typings for near() in model aggregation #10373 [tbhaxor](https://github.com/tbhaxor)
15
+ * fix(index.d.ts): correct function signature for `Query#cast()` #10388 [lkho](https://github.com/lkho)
16
+ * docs(transactions): add import statement #10365 [JimLynchCodes](https://github.com/JimLynchCodes)
17
+ * docs(schema): add missing `discriminatorKey` schema option #10386 #10376 [IslandRhythms](https://github.com/IslandRhythms)
18
+ * docs(index.d.ts): fix typo #10363 [houssemchebeb](https://github.com/houssemchebeb)
19
+
20
+ 5.12.14 / 2021-06-15
21
+ ====================
22
+ * fix(schema): check that schema type is an object when setting isUnderneathDocArray #10361 [vmo-khanus](https://github.com/vmo-khanus)
23
+ * fix(document): avoid infinite recursion when setting single nested subdoc to array #10351
24
+ * fix(populate): allow populating nested path in schema using `Model.populate()` #10335
25
+ * fix(drivers): emit operation-start/operation-end events to allow inspecting when operations start and end
26
+ * fix(index.d.ts): improve typings for virtuals #10350 [thiagokisaki](https://github.com/thiagokisaki)
27
+ * fix(index.d.ts): correct constructor type for Document #10328
28
+ * fix(index.d.ts): add `ValidationError` as a possible type for `ValidationError#errors` #10320 [IslandRhythms](https://github.com/IslandRhythms)
29
+ * fix: remove unnecessary async devDependency that's causing npm audit warnings #10281
30
+ * docs(typescript): add schemas guide #10308
31
+ * docs(model): add options parameter description to `Model.exists()` #10336 [Aminoiz](https://github.com/Aminoiz)
32
+
33
+ 5.12.13 / 2021-06-04
34
+ ====================
35
+ * perf(document): avoid creating nested paths when running `$getAllSubdocs()` #10275
36
+ * fix: make returnDocument option work with `findOneAndUpdate()` #10232 #10231 [cnwangjie](https://github.com/cnwangjie)
37
+ * fix(document): correctly reset subdocument when resetting a map subdocument underneath a single nested subdoc after save #10295
38
+ * perf(query): avoid setting non-null sessions to avoid overhead from $getAllSubdocs() #10275
39
+ * perf(document): pre split schematype paths when compiling schema to avoid extra overhead of splitting when hydrating documents #10275
40
+ * perf(schema): pre-calculate mapPaths to avoid looping over every path for each path when initing doc #10275
41
+ * fix(index.d.ts): drill down into nested arrays when creating LeanDocument type #10293
42
+
1
43
  5.12.12 / 2021-05-28
2
44
  ====================
3
45
  * fix(documentarray): retain atomics when setting to a new array #10272