mongoose 6.3.8 → 6.4.1
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 +62 -34
- package/dist/browser.umd.js +68579 -2
- package/lib/connection.js +50 -9
- package/lib/document.js +49 -9
- package/lib/error/disconnected.js +3 -4
- package/lib/helpers/timestamps/setupTimestamps.js +4 -1
- package/lib/helpers/updateValidators.js +11 -18
- package/lib/index.js +108 -33
- package/lib/model.js +1 -1
- package/lib/query.js +61 -6
- package/lib/queryhelpers.js +5 -0
- package/lib/schema/array.js +1 -1
- package/lib/schema/date.js +2 -2
- package/lib/schema/documentarray.js +10 -0
- package/lib/schema/number.js +2 -2
- package/lib/schema/string.js +2 -2
- package/lib/schema.js +3 -4
- package/lib/statemachine.js +13 -0
- package/lib/utils.js +3 -0
- package/lib/validoptions.js +1 -0
- package/package.json +3 -3
- package/tsconfig.json +1 -0
- package/types/aggregate.d.ts +3 -0
- package/types/connection.d.ts +5 -0
- package/types/document.d.ts +13 -4
- package/types/expressions.d.ts +2882 -0
- package/types/index.d.ts +52 -23
- package/types/{indizes.d.ts → indexes.d.ts} +0 -0
- package/types/inferschematype.d.ts +155 -0
- package/types/models.d.ts +85 -70
- package/types/mongooseoptions.d.ts +8 -0
- package/types/pipelinestage.d.ts +76 -80
- package/types/query.d.ts +1 -1
- package/types/schemaoptions.d.ts +21 -3
- package/types/types.d.ts +3 -1
- package/types/utility.d.ts +2 -0
package/.eslintrc.json
CHANGED
|
@@ -4,43 +4,71 @@
|
|
|
4
4
|
],
|
|
5
5
|
"ignorePatterns": [
|
|
6
6
|
"docs",
|
|
7
|
+
"tools",
|
|
7
8
|
"dist",
|
|
8
|
-
"
|
|
9
|
+
"website.js",
|
|
10
|
+
"test/files/*",
|
|
11
|
+
"benchmarks"
|
|
9
12
|
],
|
|
10
|
-
"overrides": [
|
|
11
|
-
|
|
12
|
-
"
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
"
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
"
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
"
|
|
23
|
-
|
|
24
|
-
"
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
13
|
+
"overrides": [
|
|
14
|
+
{
|
|
15
|
+
"files": [
|
|
16
|
+
"**/*.{ts,tsx}"
|
|
17
|
+
],
|
|
18
|
+
"extends": [
|
|
19
|
+
"plugin:@typescript-eslint/eslint-recommended",
|
|
20
|
+
"plugin:@typescript-eslint/recommended"
|
|
21
|
+
],
|
|
22
|
+
"plugins": [
|
|
23
|
+
"@typescript-eslint"
|
|
24
|
+
],
|
|
25
|
+
"rules": {
|
|
26
|
+
"@typescript-eslint/triple-slash-reference": "off",
|
|
27
|
+
"@typescript-eslint/no-non-null-assertion": "off",
|
|
28
|
+
"spaced-comment": [
|
|
29
|
+
"error",
|
|
30
|
+
"always",
|
|
31
|
+
{
|
|
32
|
+
"block": {
|
|
33
|
+
"markers": [
|
|
34
|
+
"!"
|
|
35
|
+
],
|
|
36
|
+
"balanced": true
|
|
37
|
+
},
|
|
38
|
+
"markers": [
|
|
39
|
+
"/"
|
|
40
|
+
]
|
|
41
|
+
}
|
|
42
|
+
],
|
|
43
|
+
"@typescript-eslint/no-explicit-any": "off",
|
|
44
|
+
"@typescript-eslint/ban-types": "off",
|
|
45
|
+
"@typescript-eslint/no-unused-vars": "off",
|
|
46
|
+
"@typescript-eslint/explicit-module-boundary-types": "off",
|
|
47
|
+
"@typescript-eslint/indent": [
|
|
48
|
+
"error",
|
|
49
|
+
2,
|
|
50
|
+
{
|
|
51
|
+
"SwitchCase": 1
|
|
52
|
+
}
|
|
53
|
+
],
|
|
54
|
+
"@typescript-eslint/prefer-optional-chain": "error",
|
|
55
|
+
"@typescript-eslint/brace-style": "error",
|
|
56
|
+
"@typescript-eslint/no-dupe-class-members": "error",
|
|
57
|
+
"@typescript-eslint/no-redeclare": "error",
|
|
58
|
+
"@typescript-eslint/type-annotation-spacing": "error",
|
|
59
|
+
"@typescript-eslint/object-curly-spacing": [
|
|
60
|
+
"error",
|
|
61
|
+
"always"
|
|
62
|
+
],
|
|
63
|
+
"@typescript-eslint/semi": "error",
|
|
64
|
+
"@typescript-eslint/space-before-function-paren": [
|
|
65
|
+
"error",
|
|
66
|
+
"never"
|
|
67
|
+
],
|
|
68
|
+
"@typescript-eslint/space-infix-ops": "off"
|
|
69
|
+
}
|
|
42
70
|
}
|
|
43
|
-
|
|
71
|
+
],
|
|
44
72
|
"plugins": [
|
|
45
73
|
"mocha-no-only"
|
|
46
74
|
],
|