npm-check-updates 16.10.0 → 16.10.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/README.md +225 -124
- package/build/package.json +2 -1
- package/build/src/bin/cli.js +4 -1
- package/build/src/bin/cli.js.map +1 -1
- package/build/src/cli-options.d.ts +1 -18
- package/build/src/cli-options.js +28 -23
- package/build/src/cli-options.js.map +1 -1
- package/build/src/package-managers/npm.d.ts +3 -3
- package/build/src/package-managers/npm.js +49 -30
- package/build/src/package-managers/npm.js.map +1 -1
- package/build/src/package-managers/pnpm.js +4 -3
- package/build/src/package-managers/pnpm.js.map +1 -1
- package/build/src/scripts/build-options.js +22 -18
- package/build/src/scripts/build-options.js.map +1 -1
- package/build/src/types/CLIOption.d.ts +16 -0
- package/build/src/types/CLIOption.js +3 -0
- package/build/src/types/CLIOption.js.map +1 -0
- package/build/src/types/ExtendedHelp.d.ts +5 -0
- package/build/src/types/ExtendedHelp.js +3 -0
- package/build/src/types/ExtendedHelp.js.map +1 -0
- package/build/src/types/GetVersion.d.ts +1 -1
- package/build/src/types/RunOptions.d.ts +17 -17
- package/package.json +2 -1
package/README.md
CHANGED
|
@@ -133,130 +133,208 @@ ncu "/^(?!react-).*$/" # windows
|
|
|
133
133
|
<!-- BEGIN Options -->
|
|
134
134
|
<!-- Do not edit this section by hand. It is auto-generated in build-options.ts. Run "npm run build" or "npm run build:options" to build. -->
|
|
135
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
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
--
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
136
|
+
<table>
|
|
137
|
+
<tr>
|
|
138
|
+
<td>--cache</td>
|
|
139
|
+
<td>Cache versions to a local cache file. Default <code>--cacheFile</code> is ~/.ncu-cache.json and default <code>--cacheExpiration</code> is 10 minutes.</td>
|
|
140
|
+
</tr>
|
|
141
|
+
<tr>
|
|
142
|
+
<td>--cacheClear</td>
|
|
143
|
+
<td>Clear the default cache, or the cache file specified by <code>--cacheFile</code>.</td>
|
|
144
|
+
</tr>
|
|
145
|
+
<tr>
|
|
146
|
+
<td>--cacheExpiration <min></td>
|
|
147
|
+
<td>Cache expiration in minutes. Only works with <code>--cache</code>. (default: 10)</td>
|
|
148
|
+
</tr>
|
|
149
|
+
<tr>
|
|
150
|
+
<td>--cacheFile <path></td>
|
|
151
|
+
<td>Filepath for the cache file. Only works with <code>--cache</code>. (default: "~/.ncu-cache.json")</td>
|
|
152
|
+
</tr>
|
|
153
|
+
<tr>
|
|
154
|
+
<td>--color</td>
|
|
155
|
+
<td>Force color in terminal.</td>
|
|
156
|
+
</tr>
|
|
157
|
+
<tr>
|
|
158
|
+
<td>--concurrency <n></td>
|
|
159
|
+
<td>Max number of concurrent HTTP requests to registry. (default: 8)</td>
|
|
160
|
+
</tr>
|
|
161
|
+
<tr>
|
|
162
|
+
<td>--configFileName <s></td>
|
|
163
|
+
<td>Config file name. (default: .ncurc.{json,yml,js,cjs})</td>
|
|
164
|
+
</tr>
|
|
165
|
+
<tr>
|
|
166
|
+
<td>--configFilePath <path></td>
|
|
167
|
+
<td>Directory of .ncurc config file. (default: directory of <code>packageFile</code>)</td>
|
|
168
|
+
</tr>
|
|
169
|
+
<tr>
|
|
170
|
+
<td>--cwd <path></td>
|
|
171
|
+
<td>Working directory in which npm will be executed.</td>
|
|
172
|
+
</tr>
|
|
173
|
+
<tr>
|
|
174
|
+
<td>--deep</td>
|
|
175
|
+
<td>Run recursively in current working directory. Alias of (<code>--packageFile '**/package.json'<code>).</td>
|
|
176
|
+
</tr>
|
|
177
|
+
<tr>
|
|
178
|
+
<td>--dep <value></td>
|
|
179
|
+
<td>Check one or more sections of dependencies only: dev, optional, peer, prod, or packageManager (comma-delimited). (default: ["prod","dev","optional"])</td>
|
|
180
|
+
</tr>
|
|
181
|
+
<tr>
|
|
182
|
+
<td>--deprecated</td>
|
|
183
|
+
<td>Include deprecated packages.</td>
|
|
184
|
+
</tr>
|
|
185
|
+
<tr>
|
|
186
|
+
<td>-d, --doctor</td>
|
|
187
|
+
<td>Iteratively installs upgrades and runs tests to identify breaking upgrades. Requires <code>-u</code> to execute.</td>
|
|
188
|
+
</tr>
|
|
189
|
+
<tr>
|
|
190
|
+
<td>--doctorInstall <command></td>
|
|
191
|
+
<td>Specifies the install script to use in doctor mode. (default: <code>npm install/yarn</code>)</td>
|
|
192
|
+
</tr>
|
|
193
|
+
<tr>
|
|
194
|
+
<td>--doctorTest <command></td>
|
|
195
|
+
<td>Specifies the test script to use in doctor mode. (default: <code>npm test</code>)</td>
|
|
196
|
+
</tr>
|
|
197
|
+
<tr>
|
|
198
|
+
<td>--enginesNode</td>
|
|
199
|
+
<td>Include only packages that satisfy engines.node as specified in the package file.</td>
|
|
200
|
+
</tr>
|
|
201
|
+
<tr>
|
|
202
|
+
<td>-e, --errorLevel <n></td>
|
|
203
|
+
<td>Set the error level. 1: exits with error code 0 if no errors occur. 2: exits with error code 0 if no packages need updating (useful for continuous integration). (default: 1)</td>
|
|
204
|
+
</tr>
|
|
205
|
+
<tr>
|
|
206
|
+
<td>-f, --filter <p></td>
|
|
207
|
+
<td>Include only package names matching the given string, wildcard, glob, comma-or-space-delimited list, /regex/, or predicate function.</td>
|
|
208
|
+
</tr>
|
|
209
|
+
<tr>
|
|
210
|
+
<td>filterResults <fn></td>
|
|
211
|
+
<td>Filters out upgrades based on a user provided function.</td>
|
|
212
|
+
</tr>
|
|
213
|
+
<tr>
|
|
214
|
+
<td>--filterVersion <p></td>
|
|
215
|
+
<td>Filter on package version using comma-or-space-delimited list, /regex/, or predicate function.</td>
|
|
216
|
+
</tr>
|
|
217
|
+
<tr>
|
|
218
|
+
<td>--format <value></td>
|
|
219
|
+
<td>Modify the output formatting or show additional information. Specify one or more comma-delimited values: group, ownerChanged, repo, time, lines. (default: [])</td>
|
|
220
|
+
</tr>
|
|
221
|
+
<tr>
|
|
222
|
+
<td>-g, --global</td>
|
|
223
|
+
<td>Check global packages instead of in the current project.</td>
|
|
224
|
+
</tr>
|
|
225
|
+
<tr>
|
|
226
|
+
<td>groupFunction <fn></td>
|
|
227
|
+
<td>Customize how packages are divided into groups when using <code>--format group</code>.</td>
|
|
228
|
+
</tr>
|
|
229
|
+
<tr>
|
|
230
|
+
<td>-i, --interactive</td>
|
|
231
|
+
<td>Enable interactive prompts for each dependency; implies <code>-u</code> unless one of the json options are set.</td>
|
|
232
|
+
</tr>
|
|
233
|
+
<tr>
|
|
234
|
+
<td>-j, --jsonAll</td>
|
|
235
|
+
<td>Output new package file instead of human-readable message.</td>
|
|
236
|
+
</tr>
|
|
237
|
+
<tr>
|
|
238
|
+
<td>--jsonDeps</td>
|
|
239
|
+
<td>Like <code>jsonAll</code> but only lists <code>dependencies</code>, <code>devDependencies</code>, <code>optionalDependencies</code>, etc of the new package data.</td>
|
|
240
|
+
</tr>
|
|
241
|
+
<tr>
|
|
242
|
+
<td>--jsonUpgraded</td>
|
|
243
|
+
<td>Output upgraded dependencies in json.</td>
|
|
244
|
+
</tr>
|
|
245
|
+
<tr>
|
|
246
|
+
<td>-l, --loglevel <n></td>
|
|
247
|
+
<td>Amount to log: silent, error, minimal, warn, info, verbose, silly. (default: "warn")</td>
|
|
248
|
+
</tr>
|
|
249
|
+
<tr>
|
|
250
|
+
<td>--mergeConfig</td>
|
|
251
|
+
<td>Merges nested configs with the root config file for <code>--deep</code> or <code>--packageFile</code> options. (default: false)</td>
|
|
252
|
+
</tr>
|
|
253
|
+
<tr>
|
|
254
|
+
<td>-m, --minimal</td>
|
|
255
|
+
<td>Do not upgrade newer versions that are already satisfied by the version range according to semver.</td>
|
|
256
|
+
</tr>
|
|
257
|
+
<tr>
|
|
258
|
+
<td>--packageData <value></td>
|
|
259
|
+
<td>Package file data (you can also use stdin).</td>
|
|
260
|
+
</tr>
|
|
261
|
+
<tr>
|
|
262
|
+
<td>--packageFile <path|glob></td>
|
|
263
|
+
<td>Package file(s) location. (default: ./package.json)</td>
|
|
264
|
+
</tr>
|
|
265
|
+
<tr>
|
|
266
|
+
<td>-p, --packageManager <s></td>
|
|
267
|
+
<td>npm, yarn, pnpm, deno, staticRegistry (default: npm).</td>
|
|
268
|
+
</tr>
|
|
269
|
+
<tr>
|
|
270
|
+
<td>--peer</td>
|
|
271
|
+
<td>Check peer dependencies of installed packages and filter updates to compatible versions.</td>
|
|
272
|
+
</tr>
|
|
273
|
+
<tr>
|
|
274
|
+
<td>--pre <n></td>
|
|
275
|
+
<td>Include prerelease versions, e.g. -alpha.0, -beta.5, -rc.2. Automatically set to 1 when <code>--target</code> is newest or greatest, or when the current version is a prerelease. (default: 0)</td>
|
|
276
|
+
</tr>
|
|
277
|
+
<tr>
|
|
278
|
+
<td>--prefix <path></td>
|
|
279
|
+
<td>Current working directory of npm.</td>
|
|
280
|
+
</tr>
|
|
281
|
+
<tr>
|
|
282
|
+
<td>-r, --registry <uri></td>
|
|
283
|
+
<td>Third-party npm registry.</td>
|
|
284
|
+
</tr>
|
|
285
|
+
<tr>
|
|
286
|
+
<td>-x, --reject <p></td>
|
|
287
|
+
<td>Exclude packages matching the given string, wildcard, glob, comma-or-space-delimited list, /regex/, or predicate function.</td>
|
|
288
|
+
</tr>
|
|
289
|
+
<tr>
|
|
290
|
+
<td>--rejectVersion <p></td>
|
|
291
|
+
<td>Exclude package.json versions using comma-or-space-delimited list, /regex/, or predicate function.</td>
|
|
292
|
+
</tr>
|
|
293
|
+
<tr>
|
|
294
|
+
<td>--removeRange</td>
|
|
295
|
+
<td>Remove version ranges from the final package version.</td>
|
|
296
|
+
</tr>
|
|
297
|
+
<tr>
|
|
298
|
+
<td>--retry <n></td>
|
|
299
|
+
<td>Number of times to retry failed requests for package info. (default: 3)</td>
|
|
300
|
+
</tr>
|
|
301
|
+
<tr>
|
|
302
|
+
<td>--root</td>
|
|
303
|
+
<td>Runs updates on the root project in addition to specified workspaces. Only allowed with <code>--workspace</code> or <code>--workspaces</code>. (default: false)</td>
|
|
304
|
+
</tr>
|
|
305
|
+
<tr>
|
|
306
|
+
<td>-s, --silent</td>
|
|
307
|
+
<td>Don't output anything. Alias for <code>--loglevel</code> silent.</td>
|
|
308
|
+
</tr>
|
|
309
|
+
<tr>
|
|
310
|
+
<td>--stdin</td>
|
|
311
|
+
<td>Read package.json from stdin.</td>
|
|
312
|
+
</tr>
|
|
313
|
+
<tr>
|
|
314
|
+
<td>-t, --target <value></td>
|
|
315
|
+
<td>Determines the version to upgrade to: latest, newest, greatest, minor, patch, @[tag], or [function]. (default: latest)</td>
|
|
316
|
+
</tr>
|
|
317
|
+
<tr>
|
|
318
|
+
<td>--timeout <ms></td>
|
|
319
|
+
<td>Global timeout in milliseconds. (default: no global timeout and 30 seconds per npm-registry-fetch)</td>
|
|
320
|
+
</tr>
|
|
321
|
+
<tr>
|
|
322
|
+
<td>-u, --upgrade</td>
|
|
323
|
+
<td>Overwrite package file with upgraded versions instead of just outputting to console.</td>
|
|
324
|
+
</tr>
|
|
325
|
+
<tr>
|
|
326
|
+
<td>--verbose</td>
|
|
327
|
+
<td>Log additional information for debugging. Alias for <code>--loglevel</code> verbose.</td>
|
|
328
|
+
</tr>
|
|
329
|
+
<tr>
|
|
330
|
+
<td>-w, --workspace <s></td>
|
|
331
|
+
<td>Run on one or more specified workspaces. Add <code>--root</code> to also upgrade the root project. (default: [])</td>
|
|
332
|
+
</tr>
|
|
333
|
+
<tr>
|
|
334
|
+
<td>-ws, --workspaces</td>
|
|
335
|
+
<td>Run on all workspaces. Add <code>--root</code> to also upgrade the root project.</td>
|
|
336
|
+
</tr>
|
|
337
|
+
</table>
|
|
260
338
|
|
|
261
339
|
<!-- END Options -->
|
|
262
340
|
|
|
@@ -330,6 +408,8 @@ Example:
|
|
|
330
408
|
|
|
331
409
|
Filters out upgrades based on a user provided function.
|
|
332
410
|
|
|
411
|
+
`filterResults` runs _after_ new versions are fetched, in contrast to `filter` and `filterVersion`, which run _before_. This allows you to filter out upgrades with `filterResults` based on how the version has changed (e.g. a major version change).
|
|
412
|
+
|
|
333
413
|
Only available in .ncurc.js or when importing npm-check-updates as a module.
|
|
334
414
|
|
|
335
415
|
```js
|
|
@@ -543,6 +623,27 @@ For example, `.ncurc.json`:
|
|
|
543
623
|
}
|
|
544
624
|
```
|
|
545
625
|
|
|
626
|
+
If you write `.ncurc` config files using json or yaml, you can add the JSON Schema to your IDE settings for completions.
|
|
627
|
+
|
|
628
|
+
e.g. for VS Code:
|
|
629
|
+
|
|
630
|
+
```json
|
|
631
|
+
"json.schemas": [
|
|
632
|
+
{
|
|
633
|
+
"fileMatch": [
|
|
634
|
+
".ncurc",
|
|
635
|
+
".ncurc.json",
|
|
636
|
+
],
|
|
637
|
+
"url": "https://raw.githubusercontent.com/raineorshine/npm-check-updates/main/src/types/RunOptions.json"
|
|
638
|
+
}
|
|
639
|
+
],
|
|
640
|
+
"yaml.schemas": {
|
|
641
|
+
"https://raw.githubusercontent.com/raineorshine/npm-check-updates/main/src/types/RunOptions.json": [
|
|
642
|
+
".ncurc.yml",
|
|
643
|
+
]
|
|
644
|
+
},
|
|
645
|
+
```
|
|
646
|
+
|
|
546
647
|
## Module/Programmatic Usage
|
|
547
648
|
|
|
548
649
|
npm-check-updates can be imported as a module:
|
package/build/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "npm-check-updates",
|
|
3
|
-
"version": "16.10.
|
|
3
|
+
"version": "16.10.2",
|
|
4
4
|
"author": "Tomas Junnonen <tomas1@gmail.com>",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"contributors": [
|
|
@@ -134,6 +134,7 @@
|
|
|
134
134
|
"strip-ansi": "^7.0.1",
|
|
135
135
|
"ts-node": "^10.9.1",
|
|
136
136
|
"typescript": "^5.0.2",
|
|
137
|
+
"typescript-json-schema": "^0.55.0",
|
|
137
138
|
"yarn": "^1.22.19"
|
|
138
139
|
},
|
|
139
140
|
"files": [
|
package/build/src/bin/cli.js
CHANGED
|
@@ -35,7 +35,10 @@ const package_json_1 = __importDefault(require("../../package.json"));
|
|
|
35
35
|
const cli_options_1 = __importStar(require("../cli-options"));
|
|
36
36
|
const index_1 = __importDefault(require("../index"));
|
|
37
37
|
const chalk_1 = require("../lib/chalk");
|
|
38
|
+
// async global contexts are only available in esm modules -> function
|
|
38
39
|
const getNcuRc_1 = __importDefault(require("../lib/getNcuRc"));
|
|
40
|
+
/** Removes inline code ticks. */
|
|
41
|
+
const uncode = (s) => s.replace(/`/g, '');
|
|
39
42
|
(async () => {
|
|
40
43
|
var _a, _b, _c;
|
|
41
44
|
// importing update-notifier dynamically as esm modules are only allowed to be dynamically imported inside of cjs modules
|
|
@@ -130,7 +133,7 @@ ${chalk.dim.underline(notifier.update.type === 'major' ? releaseUrls.map(url =>
|
|
|
130
133
|
// [bool] is stripped from the help text in configureHelp
|
|
131
134
|
`${short ? `-${short}, ` : ''}--${long}${arg ? ` <${arg}>` : type === 'boolean' ? ' [bool]' : ''}`,
|
|
132
135
|
// point to help in description if extended help text is available
|
|
133
|
-
`${description}${help ? ` Run "ncu --help --${long}" for details.` : ''}`, parse || (type === 'boolean' ? s => s !== 'false' : defaultValue), parse ? defaultValue : undefined);
|
|
136
|
+
`${uncode(description)}${help ? ` Run "ncu --help --${long}" for details.` : ''}`, parse || (type === 'boolean' ? s => s !== 'false' : defaultValue), parse ? defaultValue : undefined);
|
|
134
137
|
});
|
|
135
138
|
// set version option at the end
|
|
136
139
|
commander_1.program.version(package_json_1.default.version);
|
package/build/src/bin/cli.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cli.js","sourceRoot":"","sources":["../../../src/bin/cli.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,uDAAoD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AW,CAAC,CAGjF;IAAC,mBAAe,CAAC,aAAa,GAAG,mBAAmB,CAAA;IACrD,mBAAO,CAAC,KAAK,CAAC,iBAAiB,CAAC,CAAA;IAChC,MAAM,mBAAmB,GAAG,mBAAO,CAAC,IAAI,EAAE,CAAA;IAE1C,wFAAwF;IACxF,MAAM,OAAO,GAAG;QACd,GAAG,CAAC,QAAQ,IAAI,MAAM,CAAC,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,EAAE,YAAY,EAAE,QAAQ,CAAC,QAAQ,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC;QACrG,GAAG,IAAA,gBAAM,EAAC,mBAAO,CAAC,IAAI,EAAE,EAAE,KAAK,CAAC,EAAE,CAAC,KAAK,KAAK,SAAS,CAAC;QACvD,IAAI,EAAE,mBAAO,CAAC,IAAI;QAClB,GAAG,CAAC,mBAAmB,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,MAAM,EAAE,mBAAmB,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC;QAC/E,GAAG,CAAC,mBAAmB,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,MAAM,EAAE,mBAAmB,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC;KAChF,CAAA;IAED,oEAAoE;IAEpE,IAAA,eAAG,EAAC,OAAO,EAAE,EAAE,GAAG,EAAE,IAAI,EAAE,CAAC,CAAA;AAC7B,CAAC,CAAC,EAAE,CAAA"}
|
|
@@ -1,22 +1,5 @@
|
|
|
1
|
+
import CLIOption from './types/CLIOption';
|
|
1
2
|
import { Index } from './types/IndexType';
|
|
2
|
-
/** A function that renders extended help for an option. */
|
|
3
|
-
type ExtendedHelp = string | ((options: {
|
|
4
|
-
markdown?: boolean;
|
|
5
|
-
}) => string);
|
|
6
|
-
export interface CLIOption<T = any> {
|
|
7
|
-
arg?: string;
|
|
8
|
-
choices?: T[];
|
|
9
|
-
/** If false, the option is only usable in the ncurc file, or when using npm-check-updates as a module, not on the command line. */
|
|
10
|
-
cli?: boolean;
|
|
11
|
-
default?: T;
|
|
12
|
-
deprecated?: boolean;
|
|
13
|
-
description: string;
|
|
14
|
-
help?: ExtendedHelp;
|
|
15
|
-
parse?: (s: string, p?: T) => T;
|
|
16
|
-
long: string;
|
|
17
|
-
short?: string;
|
|
18
|
-
type: string;
|
|
19
|
-
}
|
|
20
3
|
/** Renders the extended help for an option with usage information. */
|
|
21
4
|
export declare const renderExtendedHelp: (option: CLIOption, { markdown }?: {
|
|
22
5
|
markdown?: boolean | undefined;
|