mongodb-atlas-api-client 4.10.0 → 4.12.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/eslint.config.js +188 -234
- package/package.json +6 -6
- package/test/helper.test.js +1 -1
package/eslint.config.js
CHANGED
|
@@ -1,251 +1,205 @@
|
|
|
1
1
|
// eslint.config.js
|
|
2
2
|
const pluginJs = require("@eslint/js");
|
|
3
3
|
|
|
4
|
-
module.
|
|
4
|
+
module.exports = [
|
|
5
5
|
pluginJs.configs.recommended,
|
|
6
6
|
{
|
|
7
|
-
|
|
7
|
+
languageOptions: {
|
|
8
|
+
ecmaVersion: "latest",
|
|
9
|
+
sourceType: "commonjs",
|
|
10
|
+
globals: {
|
|
11
|
+
process: "readonly",
|
|
12
|
+
__dirname: "readonly",
|
|
13
|
+
__filename: "readonly",
|
|
14
|
+
require: "readonly",
|
|
15
|
+
module: "readonly",
|
|
16
|
+
exports: "writable",
|
|
17
|
+
console: "readonly",
|
|
18
|
+
Buffer: "readonly",
|
|
19
|
+
URLSearchParams: "readonly"
|
|
20
|
+
}
|
|
21
|
+
},
|
|
22
|
+
rules: {
|
|
8
23
|
// Possible Errors
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
"
|
|
12
|
-
"
|
|
13
|
-
"no-
|
|
14
|
-
"no-
|
|
15
|
-
"no-
|
|
16
|
-
"no-
|
|
17
|
-
"no-
|
|
18
|
-
"no-
|
|
19
|
-
"no-
|
|
20
|
-
"no-
|
|
21
|
-
"no-
|
|
22
|
-
"no-
|
|
23
|
-
"no-
|
|
24
|
-
"no-
|
|
25
|
-
"no-
|
|
26
|
-
"no-
|
|
27
|
-
"no-extra-
|
|
28
|
-
"no-
|
|
29
|
-
"no-
|
|
30
|
-
"no-
|
|
31
|
-
"no-
|
|
32
|
-
"no-
|
|
33
|
-
"no-
|
|
34
|
-
"no-
|
|
35
|
-
"no-
|
|
36
|
-
"
|
|
37
|
-
"
|
|
38
|
-
"no-
|
|
39
|
-
"use-isnan": 2, // - disallow comparisons with the value NaN (recommended)
|
|
40
|
-
"valid-typeof": 2, // - Ensure that the results of typeof are compared against a valid string (recommended)
|
|
41
|
-
"no-unexpected-multiline": 2, // - Avoid code that looks like two expressions but is actually one
|
|
24
|
+
"comma-dangle": ["error", "never"],
|
|
25
|
+
"getter-return": "error",
|
|
26
|
+
"no-async-promise-executor": "error",
|
|
27
|
+
"no-await-in-loop": "error",
|
|
28
|
+
"no-compare-neg-zero": "error",
|
|
29
|
+
"no-cond-assign": "error",
|
|
30
|
+
"no-console": "error",
|
|
31
|
+
"no-constant-condition": "error",
|
|
32
|
+
"no-control-regex": "error",
|
|
33
|
+
"no-debugger": "error",
|
|
34
|
+
"no-dupe-args": "error",
|
|
35
|
+
"no-dupe-keys": "error",
|
|
36
|
+
"no-duplicate-case": "error",
|
|
37
|
+
"no-empty-character-class": "error",
|
|
38
|
+
"no-empty": "error",
|
|
39
|
+
"no-ex-assign": "error",
|
|
40
|
+
"no-extra-boolean-cast": "error",
|
|
41
|
+
"no-extra-parens": "off",
|
|
42
|
+
"no-extra-semi": "error",
|
|
43
|
+
"no-func-assign": "error",
|
|
44
|
+
"no-inner-declarations": ["error", "functions"],
|
|
45
|
+
"no-invalid-regexp": "error",
|
|
46
|
+
"no-irregular-whitespace": "error",
|
|
47
|
+
"no-obj-calls": "error",
|
|
48
|
+
"no-regex-spaces": "error",
|
|
49
|
+
"no-sparse-arrays": "off",
|
|
50
|
+
"no-unreachable": "error",
|
|
51
|
+
"use-isnan": "error",
|
|
52
|
+
"valid-typeof": "error",
|
|
53
|
+
"no-unexpected-multiline": "error",
|
|
42
54
|
|
|
43
55
|
// Best Practices
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
"
|
|
47
|
-
"
|
|
48
|
-
"
|
|
49
|
-
"
|
|
50
|
-
"
|
|
51
|
-
"
|
|
52
|
-
"
|
|
53
|
-
"
|
|
54
|
-
"
|
|
55
|
-
"
|
|
56
|
-
"no-
|
|
57
|
-
"no-
|
|
58
|
-
"no-
|
|
59
|
-
"no-
|
|
60
|
-
"no-
|
|
61
|
-
"no-
|
|
62
|
-
"no-
|
|
63
|
-
"no-
|
|
64
|
-
"no-
|
|
65
|
-
"no-
|
|
66
|
-
"no-
|
|
67
|
-
"no-
|
|
68
|
-
"no-
|
|
69
|
-
"no-
|
|
70
|
-
"no-
|
|
71
|
-
"no-
|
|
72
|
-
"no-
|
|
73
|
-
"no-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
"no-
|
|
80
|
-
"no-
|
|
81
|
-
"no-
|
|
82
|
-
"no-
|
|
83
|
-
"no-
|
|
84
|
-
"no-
|
|
85
|
-
"no-
|
|
86
|
-
"no-
|
|
87
|
-
"no-
|
|
88
|
-
"no-
|
|
89
|
-
"no-
|
|
90
|
-
"no-
|
|
91
|
-
"no-
|
|
92
|
-
"no-
|
|
93
|
-
"
|
|
94
|
-
"
|
|
95
|
-
"
|
|
96
|
-
"
|
|
97
|
-
"no-unused-expressions": 0, // - disallow usage of expressions in statement position
|
|
98
|
-
"no-useless-call": 2, // - disallow unnecessary .call() and .apply()
|
|
99
|
-
"no-void": 2, // - disallow use of the void operator
|
|
100
|
-
"no-warning-comments": 0, // - disallow usage of configurable warning terms in comments - e.g. TODO or FIXME
|
|
101
|
-
"no-with": 2, // - disallow use of the with statement
|
|
102
|
-
"radix": 2, // - require use of the second argument for parseInt()
|
|
103
|
-
"vars-on-top": 2, // - require declaration of all vars at the top of their containing scope
|
|
104
|
-
"wrap-iife": 2, // - require immediate function invocation to be wrapped in parentheses
|
|
105
|
-
"yoda": 2, // - require or disallow Yoda conditions
|
|
106
|
-
|
|
107
|
-
// Strict Mode
|
|
108
|
-
// These rules relate to using strict mode.
|
|
109
|
-
|
|
110
|
-
"strict": [2, "global"], // - controls location of Use Strict Directives
|
|
56
|
+
"accessor-pairs": "error",
|
|
57
|
+
"block-scoped-var": "off",
|
|
58
|
+
"complexity": ["warn", 9],
|
|
59
|
+
"consistent-return": "warn",
|
|
60
|
+
"curly": ["error", "all"],
|
|
61
|
+
"default-case": "off",
|
|
62
|
+
"dot-notation": "error",
|
|
63
|
+
"dot-location": ["error", "property"],
|
|
64
|
+
"eqeqeq": "error",
|
|
65
|
+
"guard-for-in": "error",
|
|
66
|
+
"no-alert": "error",
|
|
67
|
+
"no-caller": "error",
|
|
68
|
+
"no-div-regex": "error",
|
|
69
|
+
"no-else-return": "error",
|
|
70
|
+
"no-eq-null": "error",
|
|
71
|
+
"no-eval": "error",
|
|
72
|
+
"no-extend-native": "error",
|
|
73
|
+
"no-extra-bind": "error",
|
|
74
|
+
"no-fallthrough": "error",
|
|
75
|
+
"no-floating-decimal": "error",
|
|
76
|
+
"no-implicit-coercion": "error",
|
|
77
|
+
"no-implied-eval": "error",
|
|
78
|
+
"no-invalid-this": "error",
|
|
79
|
+
"no-iterator": "error",
|
|
80
|
+
"no-labels": "error",
|
|
81
|
+
"no-lone-blocks": "error",
|
|
82
|
+
"no-loop-func": "error",
|
|
83
|
+
"no-multi-spaces": ["error", { "ignoreEOLComments": true }],
|
|
84
|
+
"no-multi-str": "error",
|
|
85
|
+
"no-new-func": "error",
|
|
86
|
+
"no-new-wrappers": "error",
|
|
87
|
+
"no-new": "error",
|
|
88
|
+
"no-octal-escape": "error",
|
|
89
|
+
"no-octal": "error",
|
|
90
|
+
"no-param-reassign": "error",
|
|
91
|
+
"no-proto": "error",
|
|
92
|
+
"no-redeclare": "error",
|
|
93
|
+
"no-return-assign": "error",
|
|
94
|
+
"no-return-await": "error",
|
|
95
|
+
"no-script-url": "error",
|
|
96
|
+
"no-self-assign": "error",
|
|
97
|
+
"no-self-compare": "error",
|
|
98
|
+
"no-sequences": "error",
|
|
99
|
+
"no-throw-literal": "error",
|
|
100
|
+
"no-unused-expressions": "off",
|
|
101
|
+
"no-useless-call": "error",
|
|
102
|
+
"no-void": "error",
|
|
103
|
+
"no-warning-comments": "off",
|
|
104
|
+
"no-with": "error",
|
|
105
|
+
"radix": "error",
|
|
106
|
+
"vars-on-top": "error",
|
|
107
|
+
"wrap-iife": "error",
|
|
108
|
+
"yoda": "error",
|
|
111
109
|
|
|
112
110
|
// Variables
|
|
113
|
-
|
|
111
|
+
"init-declarations": "off",
|
|
112
|
+
"no-delete-var": "error",
|
|
113
|
+
"no-label-var": "error",
|
|
114
|
+
"no-shadow-restricted-names": "error",
|
|
115
|
+
"no-shadow": "error",
|
|
116
|
+
"no-undef-init": "error",
|
|
117
|
+
"no-undef": "error",
|
|
118
|
+
"no-undefined": "off",
|
|
119
|
+
"no-unused-vars": "error",
|
|
120
|
+
"no-use-before-define": "error",
|
|
114
121
|
|
|
115
|
-
|
|
116
|
-
"
|
|
117
|
-
"
|
|
118
|
-
"
|
|
119
|
-
"no-
|
|
120
|
-
"no-
|
|
121
|
-
"no-
|
|
122
|
-
"no-
|
|
123
|
-
"no-
|
|
124
|
-
"no-
|
|
125
|
-
"no-
|
|
122
|
+
// Node.js (using stylistic rules where available in ESLint 9)
|
|
123
|
+
"callback-return": "off", // Removed in ESLint 9
|
|
124
|
+
"global-require": "off", // Removed in ESLint 9
|
|
125
|
+
"handle-callback-err": "off", // Removed in ESLint 9
|
|
126
|
+
"no-mixed-requires": "off", // Removed in ESLint 9
|
|
127
|
+
"no-new-require": "off", // Removed in ESLint 9
|
|
128
|
+
"no-path-concat": "off", // Removed in ESLint 9
|
|
129
|
+
"no-process-env": "off", // Removed in ESLint 9
|
|
130
|
+
"no-process-exit": "off", // Removed in ESLint 9
|
|
131
|
+
"no-restricted-modules": "off",
|
|
132
|
+
"no-sync": "off", // Removed in ESLint 9
|
|
133
|
+
"no-buffer-constructor": "error",
|
|
126
134
|
|
|
127
|
-
//
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
"
|
|
131
|
-
"
|
|
132
|
-
"
|
|
133
|
-
"
|
|
134
|
-
"
|
|
135
|
-
"
|
|
136
|
-
"
|
|
137
|
-
"
|
|
138
|
-
"
|
|
139
|
-
"
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
"
|
|
145
|
-
"
|
|
146
|
-
"
|
|
147
|
-
"
|
|
148
|
-
"
|
|
149
|
-
"
|
|
150
|
-
"
|
|
151
|
-
"
|
|
152
|
-
"
|
|
153
|
-
"
|
|
154
|
-
"
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
"
|
|
162
|
-
"
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
"
|
|
168
|
-
"
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
"
|
|
179
|
-
"
|
|
180
|
-
"max-statements-per-line": [
|
|
181
|
-
2,
|
|
182
|
-
{
|
|
183
|
-
"max": 1
|
|
184
|
-
}
|
|
185
|
-
], // - enforce a maximum number of statements per line
|
|
186
|
-
"new-cap": 0, // - require a capital letter for constructors
|
|
187
|
-
"new-parens": 2, // - disallow the omission of parentheses when invoking a constructor with no arguments
|
|
188
|
-
"newline-after-var": 0, // - require or disallow an empty newline after variable declarations
|
|
189
|
-
"no-array-constructor": 2, // - disallow use of the Array constructor
|
|
190
|
-
"no-continue": 2, // - disallow use of the continue statement
|
|
191
|
-
"no-inline-comments": 0, // - disallow comments inline after code
|
|
192
|
-
"no-lonely-if": 2, // - disallow if as the only statement in an else block
|
|
193
|
-
"no-mixed-spaces-and-tabs": 2, // - disallow mixed spaces and tabs for indentation (recommended)
|
|
194
|
-
"no-multiple-empty-lines": [
|
|
195
|
-
2,
|
|
196
|
-
{
|
|
197
|
-
"max": 2,
|
|
198
|
-
"maxEOF": 1,
|
|
199
|
-
"maxBOF": 0
|
|
200
|
-
}
|
|
201
|
-
], // - disallow multiple empty lines
|
|
202
|
-
"no-nested-ternary": 2, // - disallow nested ternary expressions
|
|
203
|
-
"no-new-object": 2, // - disallow the use of the Object constructor
|
|
204
|
-
"no-spaced-func": 2, // - disallow space between function identifier and application
|
|
205
|
-
"no-ternary": 0, // - disallow the use of ternary operators
|
|
206
|
-
"no-trailing-spaces": 2, // - disallow trailing whitespace at the end of lines
|
|
207
|
-
"no-underscore-dangle": 0, // - disallow dangling underscores in identifiers
|
|
208
|
-
"no-unneeded-ternary": 2, // - disallow the use of Boolean literals in conditional expressions
|
|
209
|
-
"object-curly-spacing": 2, // - require or disallow padding inside curly braces
|
|
210
|
-
"one-var": [1, "never"], // - require or disallow one variable declaration per function
|
|
211
|
-
"operator-assignment": [2, "always"], // - require assignment operator shorthand where possible or prohibit it entirely
|
|
212
|
-
"operator-linebreak": 2, // - enforce operators to be placed before or after line breaks
|
|
213
|
-
"padded-blocks": 0, // - enforce padding within blocks
|
|
214
|
-
"quote-props": 2, // - require quotes around object literal property names
|
|
215
|
-
"quotes": [2, "double"], // - specify whether backticks, double or single quotes should be used
|
|
216
|
-
"semi-spacing": 2, // - enforce spacing before and after semicolons
|
|
217
|
-
"semi": 2, // - require or disallow use of semicolons instead of ASI
|
|
218
|
-
"sort-vars": 0, // - sort variables within the same declaration block
|
|
219
|
-
"keyword-spacing": 2, // - require a space after certain keywords
|
|
220
|
-
"space-before-blocks": 2, // - require or disallow a space before blocks
|
|
221
|
-
"space-before-function-paren": [2,
|
|
222
|
-
{
|
|
223
|
-
"anonymous": "always",
|
|
224
|
-
"named": "never"
|
|
225
|
-
}
|
|
226
|
-
], // - require or disallow a space before function opening parenthesis
|
|
227
|
-
"space-in-parens": 2, // - require or disallow spaces inside parentheses
|
|
228
|
-
"space-infix-ops": 2, // - require spaces around operators
|
|
229
|
-
"space-unary-ops": 2, // - require or disallow spaces before/after unary operators
|
|
230
|
-
"spaced-comment": 2, // - require or disallow a space immediately following the // or /* in a comment
|
|
231
|
-
"wrap-regex": 2, // - require regex literals to be wrapped in parentheses
|
|
135
|
+
// Stylistic Issues (many moved to @stylistic/eslint-plugin in ESLint 9)
|
|
136
|
+
"array-bracket-spacing": "off",
|
|
137
|
+
"brace-style": "off",
|
|
138
|
+
"camelcase": "error",
|
|
139
|
+
"comma-spacing": "off",
|
|
140
|
+
"comma-style": "off",
|
|
141
|
+
"computed-property-spacing": "off",
|
|
142
|
+
"consistent-this": "off",
|
|
143
|
+
"eol-last": "off",
|
|
144
|
+
"func-names": "off",
|
|
145
|
+
"func-style": "off",
|
|
146
|
+
"id-length": ["error", { "min": 2, "max": 70, "exceptions": ["i", "j", "k", "n", "Q", "_"] }],
|
|
147
|
+
"id-match": "off",
|
|
148
|
+
"indent": "off",
|
|
149
|
+
"key-spacing": "off",
|
|
150
|
+
"lines-around-comment": "off",
|
|
151
|
+
"linebreak-style": "off",
|
|
152
|
+
"max-nested-callbacks": ["error", 6],
|
|
153
|
+
"max-statements-per-line": "off",
|
|
154
|
+
"new-cap": "off",
|
|
155
|
+
"new-parens": "off",
|
|
156
|
+
"newline-after-var": "off",
|
|
157
|
+
"no-array-constructor": "error",
|
|
158
|
+
"no-continue": "error",
|
|
159
|
+
"no-inline-comments": "off",
|
|
160
|
+
"no-lonely-if": "error",
|
|
161
|
+
"no-mixed-spaces-and-tabs": "error",
|
|
162
|
+
"no-multiple-empty-lines": "off",
|
|
163
|
+
"no-nested-ternary": "error",
|
|
164
|
+
"no-new-object": "error",
|
|
165
|
+
"no-spaced-func": "off",
|
|
166
|
+
"no-ternary": "off",
|
|
167
|
+
"no-trailing-spaces": "off",
|
|
168
|
+
"no-underscore-dangle": "off",
|
|
169
|
+
"no-unneeded-ternary": "error",
|
|
170
|
+
"object-curly-spacing": "off",
|
|
171
|
+
"one-var": ["warn", "never"],
|
|
172
|
+
"operator-assignment": ["error", "always"],
|
|
173
|
+
"operator-linebreak": "off",
|
|
174
|
+
"padded-blocks": "off",
|
|
175
|
+
"quote-props": "off",
|
|
176
|
+
"quotes": "off",
|
|
177
|
+
"semi-spacing": "off",
|
|
178
|
+
"semi": "off",
|
|
179
|
+
"sort-vars": "off",
|
|
180
|
+
"keyword-spacing": "off",
|
|
181
|
+
"space-before-blocks": "off",
|
|
182
|
+
"space-before-function-paren": "off",
|
|
183
|
+
"space-in-parens": "off",
|
|
184
|
+
"space-infix-ops": "off",
|
|
185
|
+
"space-unary-ops": "off",
|
|
186
|
+
"spaced-comment": "off",
|
|
187
|
+
"wrap-regex": "off",
|
|
232
188
|
|
|
233
189
|
// ECMAScript 6
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
"
|
|
237
|
-
"
|
|
238
|
-
"
|
|
239
|
-
"
|
|
240
|
-
"no-
|
|
241
|
-
"no-
|
|
242
|
-
"
|
|
243
|
-
"
|
|
244
|
-
"
|
|
245
|
-
"
|
|
246
|
-
"prefer-
|
|
247
|
-
"require-yield": 2, // - disallow generator functions that do not have yield
|
|
248
|
-
"prefer-template": 2
|
|
190
|
+
"arrow-parens": "off",
|
|
191
|
+
"arrow-spacing": "off",
|
|
192
|
+
"constructor-super": "error",
|
|
193
|
+
"generator-star-spacing": "off",
|
|
194
|
+
"no-class-assign": "error",
|
|
195
|
+
"no-const-assign": "error",
|
|
196
|
+
"no-this-before-super": "error",
|
|
197
|
+
"no-var": "error",
|
|
198
|
+
"object-shorthand": ["error", "methods"],
|
|
199
|
+
"prefer-const": "error",
|
|
200
|
+
"prefer-spread": "error",
|
|
201
|
+
"require-yield": "error",
|
|
202
|
+
"prefer-template": "error"
|
|
249
203
|
}
|
|
250
204
|
}
|
|
251
205
|
];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "mongodb-atlas-api-client",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.12.0",
|
|
4
4
|
"description": "A mongodb atlas api client for nodejs.",
|
|
5
5
|
"main": "src/index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -36,14 +36,14 @@
|
|
|
36
36
|
},
|
|
37
37
|
"homepage": "https://github.com/montumodi/mongodb-atlas-api-client#readme",
|
|
38
38
|
"devDependencies": {
|
|
39
|
-
"@eslint/js": "^9.
|
|
39
|
+
"@eslint/js": "^9.38.0",
|
|
40
40
|
"@hapi/code": "^9.0.3",
|
|
41
|
-
"@hapi/lab": "^25.3.
|
|
41
|
+
"@hapi/lab": "^25.3.2",
|
|
42
42
|
"depcheck": "^1.4.7",
|
|
43
|
-
"eslint": "^9.
|
|
44
|
-
"sinon": "^
|
|
43
|
+
"eslint": "^9.38.0",
|
|
44
|
+
"sinon": "^21.0.0"
|
|
45
45
|
},
|
|
46
46
|
"dependencies": {
|
|
47
|
-
"urllib": "^4.2
|
|
47
|
+
"urllib": "^4.8.2"
|
|
48
48
|
}
|
|
49
49
|
}
|
package/test/helper.test.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
const {describe, it} = exports.lab = require("@hapi/lab").script();
|
|
2
2
|
const {expect} = require('@hapi/code');
|
|
3
|
-
const {getQueryStringFromOptions}
|
|
3
|
+
const {getQueryStringFromOptions} = require('../src/helper.js');
|
|
4
4
|
|
|
5
5
|
describe("Helper Methods", () => {
|
|
6
6
|
|