mongoose 5.12.14 → 5.13.2
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 +41 -0
- package/dist/browser.umd.js +50 -43
- package/index.d.ts +168 -133
- package/lib/document.js +77 -32
- package/lib/helpers/model/discriminator.js +5 -8
- package/lib/helpers/query/sanitizeProjection.js +14 -0
- package/lib/model.js +203 -8
- package/lib/query.js +22 -2
- package/lib/schema/array.js +4 -2
- package/lib/schema.js +9 -8
- package/lib/validoptions.js +1 -0
- package/package.json +4 -2
package/History.md
CHANGED
|
@@ -1,3 +1,44 @@
|
|
|
1
|
+
5.13.2 / 2021-07-03
|
|
2
|
+
===================
|
|
3
|
+
* fix: hardcode @types/node version for now to avoid breaking changes from DefinitelyTyped/DefinitelyTyped#53669 #10415
|
|
4
|
+
* fix(index.d.ts): allow using type: Date with Date paths in SchemaDefinitionType #10409
|
|
5
|
+
* fix(index.d.ts): allow extra VirtualTypeOptions for better plugin support #10412
|
|
6
|
+
* docs(api): add SchemaArray to docs #10397
|
|
7
|
+
* docs(schema+validation): fix broken links #10396
|
|
8
|
+
* docs(transactions): add note about creating a connection to transactions docs #10406
|
|
9
|
+
|
|
10
|
+
5.13.1 / 2021-07-02
|
|
11
|
+
===================
|
|
12
|
+
* fix(discriminator): allow using array as discriminator key in schema and as tied value #10303
|
|
13
|
+
* fix(index.d.ts): allow using & Document in schema definition for required subdocument arrays #10370
|
|
14
|
+
* fix(index.d.ts): if using DocType that doesn't extends Document, default to returning that DocType from `toObject()` and `toJSON()` #10345
|
|
15
|
+
* fix(index.d.ts): use raw DocType instead of LeanDocument when using `lean()` with queries if raw DocType doesn't `extends Document` #10345
|
|
16
|
+
* fix(index.d.ts): remove err: any in callbacks, use `err: CallbackError` instead #10340
|
|
17
|
+
* fix(index.d.ts): allow defining map of schemas in TypeScript #10389
|
|
18
|
+
* fix(index.d.ts): correct return type for Model.createCollection() #10359
|
|
19
|
+
* docs(promises+discriminators): correctly escape () in regexp to pull in examples correctly #10364
|
|
20
|
+
* docs(update): fix outdated URL about unindexed upsert #10406 [grimmer0125](https://github.com/grimmer0125)
|
|
21
|
+
* docs(index.d.ts): proper placement of mongoose.Date JSDoc [thiagokisaki](https://github.com/thiagokisaki)
|
|
22
|
+
|
|
23
|
+
5.13.0 / 2021-06-28
|
|
24
|
+
===================
|
|
25
|
+
* feat(query): add sanitizeProjection option to opt in to automatically sanitizing untrusted query projections #10243
|
|
26
|
+
* feat(model): add `bulkSave()` function that saves multiple docs in 1 `bulkWrite()` #9727 #9673 [AbdelrahmanHafez](https://github.com/AbdelrahmanHafez)
|
|
27
|
+
* feat(document): allow passing a list of virtuals or `pathsToSkip` to apply in `toObject()` and `toJSON()` #10120
|
|
28
|
+
* fix(model): make Model.validate use object under validation as context by default #10360 [AbdelrahmanHafez](https://github.com/AbdelrahmanHafez)
|
|
29
|
+
* feat(document): add support for pathsToSkip in validate and validateSync #10375 [AbdelrahmanHafez](https://github.com/AbdelrahmanHafez)
|
|
30
|
+
* feat(model): add `diffIndexes()` function that calculates what indexes `syncIndexes()` will create/drop without actually executing any changes #10362 [IslandRhythms](https://github.com/IslandRhythms)
|
|
31
|
+
* feat(document): avoid using sessions that have ended, so you can use documents that were loaded in the session after calling `endSession()` #10306
|
|
32
|
+
|
|
33
|
+
5.12.15 / 2021-06-25
|
|
34
|
+
====================
|
|
35
|
+
* fix(index.d.ts): add extra TInstanceMethods generic param to `Schema` for cases when we can't infer from Model #10358
|
|
36
|
+
* fix(index.d.ts): added typings for near() in model aggregation #10373 [tbhaxor](https://github.com/tbhaxor)
|
|
37
|
+
* fix(index.d.ts): correct function signature for `Query#cast()` #10388 [lkho](https://github.com/lkho)
|
|
38
|
+
* docs(transactions): add import statement #10365 [JimLynchCodes](https://github.com/JimLynchCodes)
|
|
39
|
+
* docs(schema): add missing `discriminatorKey` schema option #10386 #10376 [IslandRhythms](https://github.com/IslandRhythms)
|
|
40
|
+
* docs(index.d.ts): fix typo #10363 [houssemchebeb](https://github.com/houssemchebeb)
|
|
41
|
+
|
|
1
42
|
5.12.14 / 2021-06-15
|
|
2
43
|
====================
|
|
3
44
|
* fix(schema): check that schema type is an object when setting isUnderneathDocArray #10361 [vmo-khanus](https://github.com/vmo-khanus)
|