Skip to content

Commit e50fff0

Browse files
committed
Clarify --cache* and --format repo options.
1 parent a30fdd1 commit e50fff0

File tree

3 files changed

+28
-26
lines changed

3 files changed

+28
-26
lines changed

README.md

Lines changed: 17 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -134,13 +134,14 @@ ncu "/^(?!react-).*$/" # windows
134134
<!-- 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. -->
135135

136136
```text
137-
--cache Cache versions to the cache file
137+
--cache Cache versions to the cache file.
138138
--cacheClear Clear the default cache, or the cache file
139-
specified by --cacheFile
140-
--cacheExpiration <min> Cache expiration in minutes (default: 10)
141-
--cacheFile <path> Filepath for the cache file (default:
142-
"~/.ncu-cache.json")
143-
--color Force color in terminal
139+
specified by --cacheFile.
140+
--cacheExpiration <min> Cache expiration in minutes. Only works with
141+
--cache. (default: 10)
142+
--cacheFile <path> Filepath for the cache file. Only works with
143+
--cache. (default: "~/.ncu-cache.json")
144+
--color Force color in terminal.
144145
--concurrency <n> Max number of concurrent HTTP requests to
145146
registry. (default: 8)
146147
--configFileName <s> Config file name. (default: .ncurc.{json,yml,js})
@@ -324,15 +325,16 @@ Usage:
324325

325326
Modify the output formatting or show additional information. Specify one or more comma-delimited values.
326327

327-
┌──────────────┬─────────────────────────────────────────────────────────────────────────┐
328-
│ group │ Groups packages by major, minor, patch, and major version zero updates. │
329-
├──────────────┼─────────────────────────────────────────────────────────────────────────┤
330-
│ ownerChanged │ Shows if the package owner has changed. │
331-
├──────────────┼─────────────────────────────────────────────────────────────────────────┤
332-
│ repo │ Infers and displays links to the package's source code repository. │
333-
├──────────────┼─────────────────────────────────────────────────────────────────────────┤
334-
│ time │ Shows the publish time of each upgrade. │
335-
└──────────────┴─────────────────────────────────────────────────────────────────────────┘
328+
┌──────────────┬────────────────────────────────────────────────────────────────────────────────────────────┐
329+
│ group │ Groups packages by major, minor, patch, and major version zero updates. │
330+
├──────────────┼────────────────────────────────────────────────────────────────────────────────────────────┤
331+
│ ownerChanged │ Shows if the package owner has changed. │
332+
├──────────────┼────────────────────────────────────────────────────────────────────────────────────────────┤
333+
│ repo │ Infers and displays links to the package's source code repository. Requires packages to be │
334+
│ │ installed. │
335+
├──────────────┼────────────────────────────────────────────────────────────────────────────────────────────┤
336+
│ time │ Shows the publish time of each upgrade. │
337+
└──────────────┴────────────────────────────────────────────────────────────────────────────────────────────┘
336338

337339
## groupFunction
338340

src/cli-options.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ const extendedHelpFormat = (): string => {
155155
rows: wrapRows([
156156
['group', `Groups packages by major, minor, patch, and major version zero updates.`],
157157
['ownerChanged', `Shows if the package owner has changed.`],
158-
['repo', `Infers and displays links to the package's source code repository.`],
158+
['repo', `Infers and displays links to the package's source code repository. Requires packages to be installed.`],
159159
['time', 'Shows the publish time of each upgrade.'],
160160
]),
161161
// coerce type until rows is added @types/cli-table
@@ -311,33 +311,33 @@ As a comparison: without using the --peer option, ncu will suggest the latest ve
311311
const cliOptions: CLIOption[] = [
312312
{
313313
long: 'cache',
314-
description: 'Cache versions to the cache file',
314+
description: 'Cache versions to the cache file.',
315315
type: 'boolean',
316316
},
317317
{
318318
long: 'cacheClear',
319-
description: 'Clear the default cache, or the cache file specified by --cacheFile',
319+
description: 'Clear the default cache, or the cache file specified by --cacheFile.',
320320
type: 'boolean',
321321
},
322322
{
323323
long: 'cacheExpiration',
324324
arg: 'min',
325-
description: 'Cache expiration in minutes',
325+
description: 'Cache expiration in minutes. Only works with --cache.',
326326
parse: s => parseInt(s, 10),
327327
default: 10,
328328
type: 'number',
329329
},
330330
{
331331
long: 'cacheFile',
332332
arg: 'path',
333-
description: 'Filepath for the cache file',
333+
description: 'Filepath for the cache file. Only works with --cache.',
334334
parse: s => (path.isAbsolute(s) ? s : path.join(process.cwd(), s)),
335335
default: defaultCacheFile,
336336
type: 'string',
337337
},
338338
{
339339
long: 'color',
340-
description: 'Force color in terminal',
340+
description: 'Force color in terminal.',
341341
type: 'boolean',
342342
},
343343
{

src/types/RunOptions.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,19 +6,19 @@ import { TargetFunction } from './TargetFunction'
66

77
/** Options that can be given on the CLI or passed to the ncu module to control all behavior. */
88
export interface RunOptions {
9-
/** Cache versions to the cache file */
9+
/** Cache versions to the cache file. */
1010
cache?: boolean
1111

12-
/** Clear the default cache, or the cache file specified by --cacheFile */
12+
/** Clear the default cache, or the cache file specified by --cacheFile. */
1313
cacheClear?: boolean
1414

15-
/** Cache expiration in minutes (default: 10) */
15+
/** Cache expiration in minutes. Only works with --cache. (default: 10) */
1616
cacheExpiration?: number
1717

18-
/** Filepath for the cache file (default: "~/.ncu-cache.json") */
18+
/** Filepath for the cache file. Only works with --cache. (default: "~/.ncu-cache.json") */
1919
cacheFile?: string
2020

21-
/** Force color in terminal */
21+
/** Force color in terminal. */
2222
color?: boolean
2323

2424
/** Max number of concurrent HTTP requests to registry. (default: 8) */

0 commit comments

Comments
 (0)