diff options
author | Ruy Adorno <ruyadorno@hotmail.com> | 2021-03-23 14:58:11 -0400 |
---|---|---|
committer | Ruy Adorno <ruyadorno@hotmail.com> | 2021-03-23 22:10:30 -0400 |
commit | 73b3e06c910549a7fd3c8f49324ab14e0adf2c8d (patch) | |
tree | e7f0ab70d8bb09a6212f8a22da25dc07410e6967 /deps/npm/lib/cache.js | |
parent | f2090877f1f727020099ef9e30cc70e10b10f900 (diff) | |
download | node-new-73b3e06c910549a7fd3c8f49324ab14e0adf2c8d.tar.gz |
deps: upgrade npm to 7.7.0
PR-URL: https://github.com/nodejs/node/pull/37879
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Diffstat (limited to 'deps/npm/lib/cache.js')
-rw-r--r-- | deps/npm/lib/cache.js | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/deps/npm/lib/cache.js b/deps/npm/lib/cache.js index 80a5c68ebc..43902f43bb 100644 --- a/deps/npm/lib/cache.js +++ b/deps/npm/lib/cache.js @@ -7,6 +7,10 @@ const rimraf = promisify(require('rimraf')) const BaseCommand = require('./base-command.js') class Cache extends BaseCommand { + static get description () { + return 'Manipulates packages cache' + } + /* istanbul ignore next - see test/lib/load-all-commands.js */ static get name () { return 'cache' @@ -63,7 +67,7 @@ class Cache extends BaseCommand { throw new Error('npm cache clear does not accept arguments') const cachePath = path.join(this.npm.cache, '_cacache') - if (!this.npm.flatOptions.force) { + if (!this.npm.config.get('force')) { throw new Error(`As of npm@5, the npm cache self-heals from corruption issues by treating integrity mismatches as cache misses. As a result, data extracted from the cache is guaranteed to be valid. If you @@ -100,7 +104,6 @@ with --force.`) throw Object.assign(new Error(usage), { code: 'EUSAGE' }) log.silly('cache add', 'spec', spec) - const opts = { ...this.npm.flatOptions } // we ask pacote for the thing, and then just throw the data // away so that it tee-pipes it into the cache like it does @@ -108,7 +111,7 @@ with --force.`) await pacote.tarball.stream(spec, stream => { stream.resume() return stream.promise() - }, opts) + }, this.npm.flatOptions) } async verify () { |