diff options
Diffstat (limited to 'doc/misc/npm-config.md')
-rw-r--r-- | doc/misc/npm-config.md | 38 |
1 files changed, 30 insertions, 8 deletions
diff --git a/doc/misc/npm-config.md b/doc/misc/npm-config.md index 144d42122..cd809bf70 100644 --- a/doc/misc/npm-config.md +++ b/doc/misc/npm-config.md @@ -234,22 +234,18 @@ Number of ms to wait for cache lock files to expire. * Default: Infinity * Type: Number -The maximum time (in seconds) to keep items in the registry cache before -re-checking against the registry. +**DEPRECATED**: This option has been deprecated in favor of `--prefer-online`. -Note that no purging is done unless the `npm cache clean` command is -explicitly used, and that only GET requests use the cache. +`--cache-max=0` is an alias for `--prefer-online`. ### cache-min * Default: 10 * Type: Number -The minimum time (in seconds) to keep items in the registry cache before -re-checking against the registry. +**DEPRECATED**: This option has been deprecated in favor of `--prefer-offline`. -Note that no purging is done unless the `npm cache clean` command is -explicitly used, and that only GET requests use the cache. +`--cache-min=9999 (or bigger)` is an alias for `--prefer-offline`. ### cert @@ -636,6 +632,14 @@ The registry you want to send cli metrics to if `send-metrics` is true. The node version to use when checking a package's `engines` map. +### offline + +* Default: false +* Type: Boolean + +Force offline mode: no network requests will be done during install. To allow +the CLI to fill in missing cache data, see `--prefer-offline`. + ### onload-script * Default: false @@ -679,6 +683,24 @@ process is not aborted. Output parseable results from commands that write to standard output. For `npm search`, this will be tab-separated table format. +### prefer-offline + +* Default: false +* Type: Boolean + +If true, staleness checks for cached data will be bypassed, but missing data +will be requested from the server. To force full offline mode, use `--offline`. + +This option is effectively equivalent to `--cache-min=9999999`. + +### prefer-online + +* Default: false +* Type: Boolean + +If true, staleness checks for cached data will be forced, making the CLI look +for updates immediately even for fresh package data. + ### prefix * Default: see npm-folders(5) |