mongoose 6.2.1 → 6.2.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/.eslintrc.json +5 -1
- package/CHANGELOG.md +19 -0
- package/dist/browser.umd.js +146 -139
- package/index.js +5 -1
- package/lib/aggregate.js +22 -27
- package/lib/browserDocument.js +1 -1
- package/lib/cast/number.js +2 -3
- package/lib/cast.js +7 -4
- package/lib/connection.js +43 -21
- package/lib/cursor/AggregationCursor.js +12 -7
- package/lib/cursor/QueryCursor.js +11 -6
- package/lib/document.js +27 -46
- package/lib/drivers/node-mongodb-native/collection.js +12 -4
- package/lib/drivers/node-mongodb-native/connection.js +11 -0
- package/lib/error/cast.js +3 -2
- package/lib/helpers/clone.js +11 -2
- package/lib/helpers/cursor/eachAsync.js +18 -15
- package/lib/helpers/document/compile.js +7 -4
- package/lib/helpers/printJestWarning.js +2 -2
- package/lib/helpers/projection/applyProjection.js +77 -0
- package/lib/helpers/projection/hasIncludedChildren.js +36 -0
- package/lib/helpers/projection/isExclusive.js +5 -2
- package/lib/helpers/projection/isInclusive.js +5 -1
- package/lib/helpers/query/cast$expr.js +14 -19
- package/lib/helpers/query/isOperator.js +5 -2
- package/lib/index.js +14 -17
- package/lib/model.js +124 -104
- package/lib/options/SchemaTypeOptions.js +1 -1
- package/lib/plugins/trackTransaction.js +1 -1
- package/lib/query.js +156 -144
- package/lib/queryhelpers.js +9 -9
- package/lib/schema/SubdocumentPath.js +4 -3
- package/lib/schema/array.js +13 -6
- package/lib/schema/buffer.js +1 -1
- package/lib/schema/date.js +1 -1
- package/lib/schema/decimal128.js +1 -1
- package/lib/schema/documentarray.js +4 -3
- package/lib/schema/number.js +1 -1
- package/lib/schema/objectid.js +1 -1
- package/lib/schema/string.js +4 -4
- package/lib/schema.js +8 -8
- package/lib/schematype.js +3 -4
- package/lib/types/DocumentArray/index.js +1 -1
- package/lib/types/array/index.js +2 -2
- package/lib/types/array/methods/index.js +10 -11
- package/lib/types/buffer.js +3 -3
- package/lib/types/map.js +2 -3
- package/package.json +2 -4
- package/tsconfig.json +0 -2
- package/types/PipelineStage.d.ts +272 -0
- package/types/index.d.ts +10 -271
- package/lib/types/array/ArrayWrapper.js +0 -981
package/.eslintrc.json
CHANGED
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
"docs",
|
|
7
7
|
"tools",
|
|
8
8
|
"dist",
|
|
9
|
+
"website.js",
|
|
9
10
|
"test/files/*",
|
|
10
11
|
"benchmarks"
|
|
11
12
|
],
|
|
@@ -22,6 +23,8 @@
|
|
|
22
23
|
"@typescript-eslint"
|
|
23
24
|
],
|
|
24
25
|
"rules": {
|
|
26
|
+
"@typescript-eslint/triple-slash-reference": "off",
|
|
27
|
+
"spaced-comment": ["error", "always", { "markers": ["/"] }],
|
|
25
28
|
"@typescript-eslint/no-explicit-any": "off",
|
|
26
29
|
"@typescript-eslint/ban-types": "off",
|
|
27
30
|
"@typescript-eslint/no-unused-vars": "off",
|
|
@@ -145,6 +148,7 @@
|
|
|
145
148
|
"no-prototype-builtins": "off",
|
|
146
149
|
"mocha-no-only/mocha-no-only": [
|
|
147
150
|
"error"
|
|
148
|
-
]
|
|
151
|
+
],
|
|
152
|
+
"no-empty": "off"
|
|
149
153
|
}
|
|
150
154
|
}
|
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,21 @@
|
|
|
1
|
+
6.2.2 / 2022-02-16
|
|
2
|
+
==================
|
|
3
|
+
* fix: fix QueryCursor and AggregationCursor compatibility with Node v17.5 #11381 [benjamingr](https://github.com/benjamingr)
|
|
4
|
+
* fix: better esm support, no necessity for setting allowSyntheticDefaultImports and esModuleInterop #11343 [Uzlopak](https://github.com/Uzlopak)
|
|
5
|
+
* fix(model): apply projection parameter to hydrate() #11375
|
|
6
|
+
* fix: fix issue with creating arrays of length > 10000 #11405 [Uzlopak](https://github.com/Uzlopak)
|
|
7
|
+
* fix(document): minimize single nested subdocs #11247
|
|
8
|
+
* fix(connection): handle reopening base connection with useDb() #11240
|
|
9
|
+
* perf: use property access instead of `get()` helper where possible #11389 [Uzlopak](https://github.com/Uzlopak)
|
|
10
|
+
* fix: use `isArray()` instead of `instanceof Array` #11393 [Uzlopak](https://github.com/Uzlopak)
|
|
11
|
+
* perf: improve performance of `cast$expr()` #11388 [Uzlopak](https://github.com/Uzlopak)
|
|
12
|
+
* perf: remove `startsWith()` from `isOperator()` #11400 [Uzlopak](https://github.com/Uzlopak)
|
|
13
|
+
* fix(index.d.ts): extract `PipelineStage` into separate file #11368 [Uzlopak](https://github.com/Uzlopak)
|
|
14
|
+
* fix(index.d.ts): fix $search highlight path option type #11373 [lmX2015](https://github.com/lmX2015)
|
|
15
|
+
* docs: update changelog file to CHANGELOG.md #11365 [AbdelrahmanHafez](https://github.com/AbdelrahmanHafez)
|
|
16
|
+
* docs: fix broken links #11388 #11377 [saibbyweb](https://github.com/saibbyweb)
|
|
17
|
+
* docs: remove double determiners in connections docs #11340 [Erma32](https://github.com/Erma32)
|
|
18
|
+
|
|
1
19
|
6.2.1 / 2022-02-07
|
|
2
20
|
==================
|
|
3
21
|
* perf: improve performance especially of validate and clone #11298 [Uzlopak](https://github.com/Uzlopak)
|
|
@@ -21,6 +39,7 @@
|
|
|
21
39
|
|
|
22
40
|
6.2.0 / 2022-02-02
|
|
23
41
|
==================
|
|
42
|
+
* feat: upgrade MongoDB driver to 4.3.1
|
|
24
43
|
* feat(connection+mongoose): add support for continueOnError for syncIndexes #11266 [AbdelrahmanHafez](https://github.com/AbdelrahmanHafez)
|
|
25
44
|
* feat(query): cast literals in `$expr` where possible #10663
|
|
26
45
|
* feat(schema+mongoose): add pluginTags to allow applying global plugins to only schemas with matching tags #9780
|