diff options
author | Kat Marchán <kzm@zkat.tech> | 2019-01-29 14:43:00 -0800 |
---|---|---|
committer | Myles Borins <mylesborins@google.com> | 2019-02-12 00:06:29 -0800 |
commit | 43dd49c9782848c25e5b03448c8a0f923f13c158 (patch) | |
tree | f7ac5d645019b2b844f26be66c291bbae734d097 /deps/npm/node_modules/npm-registry-client/lib/deprecate.js | |
parent | b361f9577fbd72e518438d3fa0b01f7d34d814a5 (diff) | |
download | android-node-v8-43dd49c9782848c25e5b03448c8a0f923f13c158.tar.gz android-node-v8-43dd49c9782848c25e5b03448c8a0f923f13c158.tar.bz2 android-node-v8-43dd49c9782848c25e5b03448c8a0f923f13c158.zip |
deps: upgrade npm to 6.7.0
PR-URL: https://github.com/nodejs/node/pull/25804
Reviewed-By: Myles Borins <myles.borins@gmail.com>
Diffstat (limited to 'deps/npm/node_modules/npm-registry-client/lib/deprecate.js')
-rw-r--r-- | deps/npm/node_modules/npm-registry-client/lib/deprecate.js | 42 |
1 files changed, 0 insertions, 42 deletions
diff --git a/deps/npm/node_modules/npm-registry-client/lib/deprecate.js b/deps/npm/node_modules/npm-registry-client/lib/deprecate.js deleted file mode 100644 index 5ff3a8891f..0000000000 --- a/deps/npm/node_modules/npm-registry-client/lib/deprecate.js +++ /dev/null @@ -1,42 +0,0 @@ -module.exports = deprecate - -var assert = require('assert') -var semver = require('semver') - -function deprecate (uri, params, cb) { - assert(typeof uri === 'string', 'must pass registry URI to deprecate') - assert(params && typeof params === 'object', 'must pass params to deprecate') - assert(typeof cb === 'function', 'must pass callback to deprecate') - - assert(typeof params.version === 'string', 'must pass version to deprecate') - assert(typeof params.message === 'string', 'must pass message to deprecate') - assert( - params.auth && typeof params.auth === 'object', - 'must pass auth to deprecate' - ) - - var version = params.version - var message = params.message - var auth = params.auth - - if (semver.validRange(version) === null) { - return cb(new Error('invalid version range: ' + version)) - } - - this.get(uri + '?write=true', { auth: auth }, function (er, data) { - if (er) return cb(er) - // filter all the versions that match - Object.keys(data.versions).filter(function (v) { - return semver.satisfies(v, version) - }).forEach(function (v) { - data.versions[v].deprecated = message - }) - // now update the doc on the registry - var options = { - method: 'PUT', - body: data, - auth: auth - } - this.request(uri, options, cb) - }.bind(this)) -} |