Skip to content

Commit

Permalink
Set default retry to 3.
Browse files Browse the repository at this point in the history
  • Loading branch information
raineorshine committed Jan 20, 2022
1 parent 28aca8e commit 97f0631
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 12 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,8 @@ ncu "/^(?!react-).*$/" # windows
comma-or-space-delimited list, or /regex/.
--removeRange Remove version ranges from the final package
version.
--retry <n> Number of times to retry failed requests for
package info. (default: 3)
--semverLevel <value> DEPRECATED. Renamed to --target.
-s, --silent Don't output anything (--loglevel silent).
-t, --target <value> Target version to upgrade to: latest, newest,
Expand Down
14 changes: 7 additions & 7 deletions src/cli-options.ts
Original file line number Diff line number Diff line change
Expand Up @@ -283,6 +283,13 @@ As a comparison: without using the --peer option, ncu will suggest the latest ve
long: 'removeRange',
description: 'Remove version ranges from the final package version.'
},
{
long: 'retry',
arg: 'n',
description: 'Number of times to retry failed requests for package info.',
parse: s => parseInt(s, 10),
default: 3,
},
{
long: 'semverLevel',
arg: 'value',
Expand All @@ -306,13 +313,6 @@ As a comparison: without using the --peer option, ncu will suggest the latest ve
arg: 'ms',
description: 'Global timeout in milliseconds. (default: no global timeout and 30 seconds per npm-registry-fetch).',
},
{
long: 'retry',
arg: 'rt',
description: 'Global request retries.',
parse: s => parseInt(s, 10),
default: 2,
},
{
long: 'upgrade',
short: 'u',
Expand Down
10 changes: 5 additions & 5 deletions src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -266,6 +266,11 @@ export interface RunOptions {
*/
removeRange?: boolean,

/**
* Number of times to retry failed requests for package info. (default: 3)
*/
retry?: number,

/**
* DEPRECATED. Renamed to --target.
*
Expand All @@ -288,11 +293,6 @@ export interface RunOptions {
*/
timeout?: number,

/**
* Global request retries. (default: 3).
*/
retry?: number,

/**
* Overwrite package file with upgraded versions instead of just outputting to console.
*/
Expand Down

0 comments on commit 97f0631

Please sign in to comment.