mongoose 5.11.13 → 5.11.17
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 +43 -0
- package/dist/browser.umd.js +96 -92
- package/index.d.ts +48 -21
- package/lib/aggregate.js +2 -2
- package/lib/connection.js +1 -1
- package/lib/document.js +13 -16
- package/lib/error/validation.js +2 -1
- package/lib/helpers/aggregate/{stringifyAccumulatorOptions.js → stringifyFunctionOperators.js} +14 -2
- package/lib/helpers/clone.js +1 -1
- package/lib/helpers/populate/assignVals.js +1 -1
- package/lib/helpers/populate/getModelsMapForPopulate.js +5 -5
- package/lib/helpers/populate/getSchemaTypes.js +0 -7
- package/lib/helpers/query/castFilterPath.js +1 -1
- package/lib/helpers/timestamps/setupTimestamps.js +1 -1
- package/lib/helpers/update/castArrayFilters.js +1 -2
- package/lib/model.js +11 -8
- package/lib/query.js +5 -3
- package/lib/schema/SingleNestedPath.js +4 -4
- package/lib/schema/array.js +10 -3
- package/lib/schema/documentarray.js +8 -0
- package/lib/schema.js +5 -5
- package/lib/schematype.js +5 -4
- package/lib/types/core_array.js +2 -8
- package/lib/types/documentarray.js +28 -0
- package/lib/types/embedded.js +6 -5
- package/lib/types/map.js +14 -2
- package/lib/types/subdocument.js +3 -2
- package/lib/utils.js +1 -1
- package/package.json +5 -4
package/History.md
CHANGED
|
@@ -1,3 +1,46 @@
|
|
|
1
|
+
5.11.17 / 2021-02-17
|
|
2
|
+
====================
|
|
3
|
+
* fix(populate): handle `perDocumentLimit` when multiple documents reference the same populated doc #9906
|
|
4
|
+
* fix(document): handle directly setting embedded document array element with projection #9909
|
|
5
|
+
* fix(map): cast ObjectId to string inside of MongooseMap #9938 [HunterKohler](https://github.com/HunterKohler)
|
|
6
|
+
* fix(model): use schema-level default collation for indexes if index doesn't have collation #9912
|
|
7
|
+
* fix(index.d.ts): make `SchemaTypeOptions#type` optional again to allow alternative typeKeys #9927
|
|
8
|
+
* fix(index.d.ts): support `{ type: String }` in schema definition when using SchemaDefinitionType generic #9911
|
|
9
|
+
* docs(populate+schematypes): document the `$*` syntax for populating every entry in a map #9907
|
|
10
|
+
* docs(connection): clarify that `Connection#transaction()` promise resolves to a command result #9919
|
|
11
|
+
|
|
12
|
+
5.11.16 / 2021-02-12
|
|
13
|
+
====================
|
|
14
|
+
* fix(document): skip applying array element setters when init-ing an array #9889
|
|
15
|
+
* fix: upgrade to mongodb driver 3.6.4 #9893 [jooeycheng](https://github.com/jooeycheng)
|
|
16
|
+
* fix: avoid copying Object.prototype properties when cloning #9876
|
|
17
|
+
* fix(aggregate): automatically convert functions to strings when using `$function` operator #9897
|
|
18
|
+
* fix: call pre-remove hooks for subdocuments #9895 #9885 [IslandRhythms](https://github.com/IslandRhythms)
|
|
19
|
+
* docs: fix confusing sentence in Schema docs #9914 [namenyi](https://github.com/namenyi)
|
|
20
|
+
|
|
21
|
+
5.11.15 / 2021-02-03
|
|
22
|
+
====================
|
|
23
|
+
* fix(document): fix issues with `isSelected` as an path in a nested schema #9884 #9873 [IslandRhythms](https://github.com/IslandRhythms)
|
|
24
|
+
* fix(index.d.ts): better support for `SchemaDefinition` generics when creating schema #9863 #9862 #9789
|
|
25
|
+
* fix(index.d.ts): allow required function in array definition #9888 [Ugzuzg](https://github.com/Ugzuzg)
|
|
26
|
+
* fix(index.d.ts): reorder create typings to allow array desctructuring #9890 [Ugzuzg](https://github.com/Ugzuzg)
|
|
27
|
+
* fix(index.d.ts): add missing overload to Model.validate #9878 #9877 [jonamat](https://github.com/jonamat)
|
|
28
|
+
* fix(index.d.ts): throw compiler error if schema says path is a String, but interface says path is a number #9857
|
|
29
|
+
* fix(index.d.ts): make `Query` a class, allow calling `Query#where()` with object argument and with no arguments #9856
|
|
30
|
+
* fix(index.d.ts): support calling `Schema#pre()` and `Schema#post()` with options and array of hooked function names #9844
|
|
31
|
+
* docs(faq): mention other debug options than console #9887 [dandv](https://github.com/dandv)
|
|
32
|
+
* docs(connections): clarify that Mongoose can emit 'error' both during initial connection and after initial connection #9853
|
|
33
|
+
|
|
34
|
+
5.11.14 / 2021-01-28
|
|
35
|
+
====================
|
|
36
|
+
* fix(populate): avoid inferring `justOne` from parent when populating a POJO with a manually populated path #9833 [IslandRhythms](https://github.com/IslandRhythms)
|
|
37
|
+
* fix(document): apply setters on each element of the array when setting a populated array #9838
|
|
38
|
+
* fix(map): handle change tracking on maps of subdocs #9811 [IslandRhythms](https://github.com/IslandRhythms)
|
|
39
|
+
* fix(document): remove dependency on `documentIsSelected` symbol #9841 [IslandRhythms](https://github.com/IslandRhythms)
|
|
40
|
+
* fix(error): make ValidationError.toJSON to include the error name correctly #9849 [hanzki](https://github.com/hanzki)
|
|
41
|
+
* fix(index.d.ts): indicate that `Document#remove()` returns a promise, not a query #9826
|
|
42
|
+
* fix(index.d.ts): allow setting `SchemaType#enum` to TypeScript enum with `required: true` #9546
|
|
43
|
+
|
|
1
44
|
5.11.13 / 2021-01-20
|
|
2
45
|
====================
|
|
3
46
|
* fix(map): handle change tracking on map of arrays #9813
|