diff options
Diffstat (limited to 'deps/npm/node_modules/npm-registry-client/lib')
7 files changed, 11 insertions, 12 deletions
diff --git a/deps/npm/node_modules/npm-registry-client/lib/access.js b/deps/npm/node_modules/npm-registry-client/lib/access.js index d8d65a9442..b33d8973f3 100644 --- a/deps/npm/node_modules/npm-registry-client/lib/access.js +++ b/deps/npm/node_modules/npm-registry-client/lib/access.js @@ -93,7 +93,7 @@ function apiUri (registryUri) { function accessAssertions (subcommand, uri, params, cb) { assert(subcommands.hasOwnProperty(subcommand), - 'access subcommand must be one of ' + + 'access subcommand must be one of ' + Object.keys(subcommands).join(', ')) typeChecks({ 'uri': [uri, 'string'], @@ -106,7 +106,7 @@ function accessAssertions (subcommand, uri, params, cb) { ], subcommand)) { typeChecks({ 'package': [params.package, 'string'] }) assert(!!npa(params.package).scope, - 'access commands are only accessible for scoped packages') + 'access commands are only accessible for scoped packages') } if (contains(['grant', 'revoke', 'ls-packages'], subcommand)) { typeChecks({ 'scope': [params.scope, 'string'] }) @@ -118,7 +118,7 @@ function accessAssertions (subcommand, uri, params, cb) { typeChecks({ 'permissions': [params.permissions, 'string'] }) assert(params.permissions === 'read-only' || params.permissions === 'read-write', - 'permissions must be either read-only or read-write') + 'permissions must be either read-only or read-write') } } @@ -127,7 +127,7 @@ function typeChecks (specs) { var checks = specs[key] /* eslint valid-typeof:0 */ assert(typeof checks[0] === checks[1], - key + ' is required and must be of type ' + checks[1]) + key + ' is required and must be of type ' + checks[1]) }) } diff --git a/deps/npm/node_modules/npm-registry-client/lib/adduser.js b/deps/npm/node_modules/npm-registry-client/lib/adduser.js index a31d5b0333..0dd517d946 100644 --- a/deps/npm/node_modules/npm-registry-client/lib/adduser.js +++ b/deps/npm/node_modules/npm-registry-client/lib/adduser.js @@ -2,6 +2,7 @@ module.exports = adduser var url = require('url') var assert = require('assert') +var extend = Object.assign || require('util')._extend function adduser (uri, params, cb) { assert(typeof uri === 'string', 'must pass registry URI to adduser') @@ -67,7 +68,7 @@ function adduser (uri, params, cb) { } this.request( uri, - Object.assign({}, options), + extend({}, options), function (error, data, json, response) { if (!error || !response || response.statusCode !== 409) { return cb(error, data, json, response) diff --git a/deps/npm/node_modules/npm-registry-client/lib/dist-tags/fetch.js b/deps/npm/node_modules/npm-registry-client/lib/dist-tags/fetch.js index 69a126d1f4..558e2cf829 100644 --- a/deps/npm/node_modules/npm-registry-client/lib/dist-tags/fetch.js +++ b/deps/npm/node_modules/npm-registry-client/lib/dist-tags/fetch.js @@ -11,7 +11,7 @@ function fetch (uri, params, cb) { params && typeof params === 'object', 'must pass params to distTags.fetch' ) - assert(typeof cb === 'function', 'must pass callback to distTags.fetch') + assert(typeof cb === 'function', 'muss pass callback to distTags.fetch') assert( typeof params.package === 'string', diff --git a/deps/npm/node_modules/npm-registry-client/lib/org.js b/deps/npm/node_modules/npm-registry-client/lib/org.js index 3072b3817a..7c73caf7da 100644 --- a/deps/npm/node_modules/npm-registry-client/lib/org.js +++ b/deps/npm/node_modules/npm-registry-client/lib/org.js @@ -50,7 +50,7 @@ function apiUri (registryUri) { function orgAssertions (subcommand, uri, params, cb) { assert(subcommand, 'subcommand is required') assert(subcommands.hasOwnProperty(subcommand), - 'org subcommand must be one of ' + Object.keys(subcommands)) + 'org subcommand must be one of ' + Object.keys(subcommands)) assert(typeof uri === 'string', 'registry URI is required') assert(typeof params === 'object', 'params are required') assert(typeof params.auth === 'object', 'auth is required') diff --git a/deps/npm/node_modules/npm-registry-client/lib/publish.js b/deps/npm/node_modules/npm-registry-client/lib/publish.js index fd3adce126..ecf593a4ac 100644 --- a/deps/npm/node_modules/npm-registry-client/lib/publish.js +++ b/deps/npm/node_modules/npm-registry-client/lib/publish.js @@ -95,7 +95,7 @@ function putFirst (registry, data, tarbuffer, access, auth, cb) { // Legacy shasum support data.dist.shasum = integrity['sha1'][0].hexDigest() data.dist.tarball = url.resolve(registry, tbURI) - .replace(/^https:\/\//, 'http://') + .replace(/^https:\/\//, 'http://') root._attachments = {} root._attachments[ tbName ] = { diff --git a/deps/npm/node_modules/npm-registry-client/lib/request.js b/deps/npm/node_modules/npm-registry-client/lib/request.js index 471546c1d2..1b769c3e4f 100644 --- a/deps/npm/node_modules/npm-registry-client/lib/request.js +++ b/deps/npm/node_modules/npm-registry-client/lib/request.js @@ -298,8 +298,6 @@ function requestDone (method, where, cb) { ) } else if (name && parsed.error === 'not_found') { er = makeError('404 Not Found: ' + name, name, response.statusCode) - } else if (name && parsed.error === 'User not found') { - er = makeError('User not found. Check `npm whoami` and make sure you have a NPM account.', name, response.statusCode) } else { er = makeError( parsed.error + ' ' + (parsed.reason || '') + ': ' + (name || w), diff --git a/deps/npm/node_modules/npm-registry-client/lib/team.js b/deps/npm/node_modules/npm-registry-client/lib/team.js index 327fa9cd5a..3e3794e047 100644 --- a/deps/npm/node_modules/npm-registry-client/lib/team.js +++ b/deps/npm/node_modules/npm-registry-client/lib/team.js @@ -85,7 +85,7 @@ function apiUri (registryUri) { function teamAssertions (subcommand, uri, params, cb) { assert(subcommand, 'subcommand is required') assert(subcommands.hasOwnProperty(subcommand), - 'team subcommand must be one of ' + Object.keys(subcommands)) + 'team subcommand must be one of ' + Object.keys(subcommands)) assert(typeof uri === 'string', 'registry URI is required') assert(typeof params === 'object', 'params are required') assert(typeof params.auth === 'object', 'auth is required') @@ -100,6 +100,6 @@ function teamAssertions (subcommand, uri, params, cb) { if (subcommand === 'edit') { assert(typeof params.users === 'object' && params.users.length != null, - 'users is required') + 'users is required') } } |