mongoose 5.11.10 → 5.11.14
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 +44 -1
- package/dist/browser.umd.js +40 -39
- package/index.d.ts +51 -27
- package/lib/connection.js +16 -3
- package/lib/document.js +5 -3
- package/lib/drivers/node-mongodb-native/collection.js +1 -0
- package/lib/error/validation.js +2 -1
- package/lib/helpers/populate/getModelsMapForPopulate.js +5 -5
- package/lib/helpers/populate/getSchemaTypes.js +0 -7
- package/lib/model.js +4 -10
- package/lib/query.js +4 -0
- package/lib/schema/SingleNestedPath.js +4 -4
- package/lib/schema/array.js +3 -3
- package/lib/schema/map.js +6 -4
- package/lib/schematype.js +2 -23
- package/lib/types/map.js +1 -2
- package/lib/types/subdocument.js +3 -1
- package/package.json +3 -2
package/History.md
CHANGED
|
@@ -1,4 +1,47 @@
|
|
|
1
|
-
5.11.
|
|
1
|
+
5.11.14 / 2021-01-28
|
|
2
|
+
====================
|
|
3
|
+
* fix(populate): avoid inferring `justOne` from parent when populating a POJO with a manually populated path #9833 [IslandRhythms](https://github.com/IslandRhythms)
|
|
4
|
+
* fix(document): apply setters on each element of the array when setting a populated array #9838
|
|
5
|
+
* fix(map): handle change tracking on maps of subdocs #9811 [IslandRhythms](https://github.com/IslandRhythms)
|
|
6
|
+
* fix(document): remove dependency on `documentIsSelected` symbol #9841 [IslandRhythms](https://github.com/IslandRhythms)
|
|
7
|
+
* fix(error): make ValidationError.toJSON to include the error name correctly #9849 [hanzki](https://github.com/hanzki)
|
|
8
|
+
* fix(index.d.ts): indicate that `Document#remove()` returns a promise, not a query #9826
|
|
9
|
+
* fix(index.d.ts): allow setting `SchemaType#enum` to TypeScript enum with `required: true` #9546
|
|
10
|
+
|
|
11
|
+
5.11.13 / 2021-01-20
|
|
12
|
+
====================
|
|
13
|
+
* fix(map): handle change tracking on map of arrays #9813
|
|
14
|
+
* fix(connection): allow passing options to `Connection#transaction()` #9834 [pnutmath](https://github.com/pnutmath)
|
|
15
|
+
* fix(index.d.ts): make `Query#options#rawResult` take precedence over `new`+`upsert` #9816
|
|
16
|
+
* fix(index.d.ts): changed setOptions's 'overwrite' argument to optional #9824 [pierissimo](https://github.com/pierissimo)
|
|
17
|
+
* fix(index.d.ts): allow setting `mongoose.Promise` #9820
|
|
18
|
+
* fix(index.d.ts): add `Aggregate#replaceRoot()` #9814
|
|
19
|
+
* fix(index.d.ts): make `Model.create()` with a spread return a promise of array rather than single doc #9817
|
|
20
|
+
* fix(index.d.ts): use SchemaDefinitionProperty generic for SchemaTypeOptions if specified #9815
|
|
21
|
+
* docs(populate): add note about setting `toObject` for populate virtuals #9822
|
|
22
|
+
|
|
23
|
+
5.11.12 / 2021-01-14
|
|
24
|
+
====================
|
|
25
|
+
* fix(document): handle using `db` as a document path #9798
|
|
26
|
+
* fix(collection): make sure to call `onOpen()` if `autoCreate === false` #9807
|
|
27
|
+
* fix(index.d.ts): correct query type for `findOneAndUpdate()` and `findByIdAndUpdate()` with `rawResult = true` #9803
|
|
28
|
+
* fix(index.d.ts): require setting `new: true` or `returnOriginal: false` to skip null check with `findOneAndUpdate()` #9654
|
|
29
|
+
* fix(index.d.ts): make methods and statics optional on schema #9801
|
|
30
|
+
* fix(index.d.ts): remove non backwards compatible methods restriction #9801
|
|
31
|
+
* docs: removed the extra word on comment doc #9794 [HenriqueLBorges](https://github.com/HenriqueLBorges)
|
|
32
|
+
|
|
33
|
+
5.11.11 / 2021-01-08
|
|
34
|
+
====================
|
|
35
|
+
* fix(model): support calling `create()` with `undefined` as first argument and no callback #9765
|
|
36
|
+
* fix(index.d.ts): ensure TypeScript knows that `this` refers to `DocType` in schema methods with strict mode #9755
|
|
37
|
+
* fix(index.d.ts): make SchemaDefinition accept a model generic #9761 [mroohian](https://github.com/mroohian)
|
|
38
|
+
* fix(index.d.ts): add `Aggregate#addFields()` #9774
|
|
39
|
+
* fix(index.d.ts): allow setting `min` and `max` to [number, string] and [Date, string] #9762
|
|
40
|
+
* fix(index.d.ts): improve context and type bindings for `Schema#methods` and `Schema#statics` #9717
|
|
41
|
+
* docs: add recommended connection option #9768 [Fernando-Lozano](https://github.com/Fernando-Lozano)
|
|
42
|
+
* chore: correct improper date in History.md #9783 [botv](https://github.com/botv)
|
|
43
|
+
|
|
44
|
+
5.11.10 / 2021-01-04
|
|
2
45
|
====================
|
|
3
46
|
* fix(model): support `populate` option for `insertMany()` as a workaround for mongoose-autopopulate #9720
|
|
4
47
|
* perf(schema): avoid creating extra array when initializing array of arrays #9588
|