mongoose 6.2.9 → 6.3.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/CHANGELOG.md +28 -0
- package/dist/browser.umd.js +2 -1693
- package/lib/aggregate.js +59 -67
- package/lib/browser.js +4 -4
- package/lib/connection.js +21 -21
- package/lib/cursor/AggregationCursor.js +2 -2
- package/lib/cursor/ChangeStream.js +42 -2
- package/lib/cursor/QueryCursor.js +5 -3
- package/lib/document.js +39 -46
- package/lib/error/eachAsyncMultiError.js +41 -0
- package/lib/error/index.js +2 -2
- package/lib/helpers/cursor/eachAsync.js +44 -12
- package/lib/helpers/indexes/applySchemaCollation.js +13 -0
- package/lib/helpers/indexes/isTextIndex.js +16 -0
- package/lib/helpers/model/discriminator.js +1 -3
- package/lib/helpers/populate/markArraySubdocsPopulated.js +1 -1
- package/lib/helpers/projection/hasIncludedChildren.js +1 -1
- package/lib/helpers/query/applyGlobalOption.js +29 -0
- package/lib/helpers/query/castUpdate.js +3 -1
- package/lib/helpers/update/applyTimestampsToChildren.js +2 -2
- package/lib/helpers/update/applyTimestampsToUpdate.js +0 -1
- package/lib/index.js +33 -26
- package/lib/model.js +88 -90
- package/lib/options/SchemaArrayOptions.js +2 -2
- package/lib/options/SchemaBufferOptions.js +1 -1
- package/lib/options/SchemaDateOptions.js +2 -2
- package/lib/options/SchemaDocumentArrayOptions.js +3 -3
- package/lib/options/SchemaMapOptions.js +2 -2
- package/lib/options/SchemaNumberOptions.js +3 -3
- package/lib/options/SchemaObjectIdOptions.js +2 -2
- package/lib/options/SchemaStringOptions.js +1 -1
- package/lib/options/SchemaSubdocumentOptions.js +2 -2
- package/lib/options/SchemaTypeOptions.js +3 -3
- package/lib/query.js +273 -249
- package/lib/schema/SubdocumentPath.js +4 -3
- package/lib/schema/array.js +2 -2
- package/lib/schema/boolean.js +4 -4
- package/lib/schema/buffer.js +3 -3
- package/lib/schema/date.js +7 -7
- package/lib/schema/decimal128.js +2 -2
- package/lib/schema/documentarray.js +3 -3
- package/lib/schema/mixed.js +2 -2
- package/lib/schema/number.js +6 -6
- package/lib/schema/objectid.js +4 -7
- package/lib/schema/string.js +38 -16
- package/lib/schema.js +144 -30
- package/lib/schematype.js +75 -68
- package/lib/types/ArraySubdocument.js +1 -1
- package/lib/types/DocumentArray/methods/index.js +2 -2
- package/lib/types/array/index.js +1 -1
- package/lib/types/array/methods/index.js +13 -13
- package/lib/types/buffer.js +1 -1
- package/lib/types/decimal128.js +1 -1
- package/lib/types/objectid.js +1 -1
- package/lib/types/subdocument.js +31 -2
- package/lib/validoptions.js +1 -0
- package/lib/virtualtype.js +3 -3
- package/package.json +19 -13
- package/tools/repl.js +2 -1
- package/types/aggregate.d.ts +223 -0
- package/types/cursor.d.ts +10 -4
- package/types/index.d.ts +194 -209
- package/types/mongooseoptions.d.ts +10 -4
- package/lib/helpers/query/applyGlobalMaxTimeMS.js +0 -15
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,31 @@
|
|
|
1
|
+
6.3.0 / 2022-04-14
|
|
2
|
+
==================
|
|
3
|
+
* fix: upgrade mongodb driver -> 4.5.0 #11623 [AbdelrahmanHafez](https://github.com/AbdelrahmanHafez)
|
|
4
|
+
* feat(schema): allow defining discriminators on schema and in schema definition #7971 [IslandRhythms](https://github.com/IslandRhythms)
|
|
5
|
+
* feat(base): add option to set allowDiskUse globally #11554 [AbdelrahmanHafez](https://github.com/AbdelrahmanHafez)
|
|
6
|
+
* feat(schema): add `removeIndex()` and `clearIndex()` #11547 [IslandRhythms](https://github.com/IslandRhythms)
|
|
7
|
+
* feat(cursor): add `continueOnError` option to allow executing `eachAsync()` on all docs even if error occurs #6355
|
|
8
|
+
* feat(query): add `versionKey` option to `lean()` for removing version key from lean docs #8934 [IslandRhythms](https://github.com/IslandRhythms)
|
|
9
|
+
* feat(types): create new ProjectionType type for select(), find(), etc. #11437
|
|
10
|
+
* chore: use webpack 5 for browser build #11584 [AbdelrahmanHafez](https://github.com/AbdelrahmanHafez)
|
|
11
|
+
|
|
12
|
+
6.2.11 / 2022-04-13
|
|
13
|
+
===================
|
|
14
|
+
* fix(document): handle validation with triply nested document arrays #11564
|
|
15
|
+
* fix(query): skip applying string schema setters on $regex #11426
|
|
16
|
+
* fix: skip findOneAndReplace() validation if runValidators = false #11559
|
|
17
|
+
* fix(model): correctly handle schema-level collations in syncIndexes() #7621
|
|
18
|
+
* fix(types): correct populate query return type with lean #11560 [mohammad0-0ahmad](https://github.com/mohammad0-0ahmad)
|
|
19
|
+
* fix(types): allow using { type: Mixed } as schema type definition for any path #10900
|
|
20
|
+
* docs: fix example on Schema.prototype.post() #11648 [EmilienLeroy](https://github.com/EmilienLeroy)
|
|
21
|
+
* docs: fix typo in methods/index.js #11651 [eltociear](https://github.com/eltociear)
|
|
22
|
+
|
|
23
|
+
6.2.10 / 2022-04-04
|
|
24
|
+
===================
|
|
25
|
+
* fix(types): improve lastErrorObject typing for rawResults #11602 [simllll](https://github.com/simllll)
|
|
26
|
+
* docs(typescript): add note about deprecating extends Document #11619 [AbdelrahmanHafez](https://github.com/AbdelrahmanHafez)
|
|
27
|
+
* docs: consistent syntax highlighting with upgraded highlight.js #11579 [AbdelrahmanHafez](https://github.com/AbdelrahmanHafez)
|
|
28
|
+
|
|
1
29
|
6.2.9 / 2022-03-28
|
|
2
30
|
==================
|
|
3
31
|
* perf(document+model): make a few small optimizations #11380
|