diff options
Diffstat (limited to 'lib/commands/access.js')
-rw-r--r-- | lib/commands/access.js | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/lib/commands/access.js b/lib/commands/access.js index 0a80da8dd..362186153 100644 --- a/lib/commands/access.js +++ b/lib/commands/access.js @@ -5,6 +5,7 @@ const readPackageJson = require('read-package-json-fast') const otplease = require('../utils/otplease.js') const getIdentity = require('../utils/get-identity.js') +const log = require('../utils/log-shim.js') const BaseCommand = require('../base-command.js') const subcommands = [ @@ -19,6 +20,15 @@ const subcommands = [ '2fa-not-required', ] +const deprecated = [ + '2fa-not-required', + '2fa-required', + 'ls-collaborators', + 'ls-packages', + 'public', + 'restricted', +] + class Access extends BaseCommand { static description = 'Set access level on published packages' static name = 'access' @@ -78,6 +88,10 @@ class Access extends BaseCommand { throw this.usageError(`${cmd} is not a recognized subcommand.`) } + if (deprecated.includes(cmd)) { + log.warn('access', `${cmd} subcommand will be removed in the next version of npm`) + } + return this[cmd](args, { ...this.npm.flatOptions, }) @@ -175,7 +189,7 @@ class Access extends BaseCommand { } async edit () { - throw new Error('edit subcommand is not implemented yet') + throw new Error('edit subcommand is not implemented') } modifyPackage (pkg, opts, fn, requireScope = true) { |