diff options
author | Gar <gar+gh@danger.computer> | 2022-08-31 18:37:26 +0300 |
---|---|---|
committer | Nathan Fritz <fritzy@github.com> | 2022-09-15 02:08:53 +0300 |
commit | 9c32c6c8d6fc5bdfd6af685731fe26920d7e5446 (patch) | |
tree | ae380e4350d71ce22d54e11f993c13727be3f408 /tap-snapshots | |
parent | 854521baa49ef88ff9586ec2cc5f1fbaee7fa364 (diff) |
feat(rewrite): rewrite `npm access`
BREAKING CHANGE: renames most of the `npm access` subcommands
- `edit`, having never been implemented, is removed
- `public` is now `set status=public`
- `restricted` is now `set status=private`
- `ls-packages` is now `list packages`
- `ls-collaborators` is now `list collaborators`
- `2fa-required` is now `set mfa=publish`
- `2fa-not-required` is now `set mfa=none`
- `set mfa=automation` is added
- output is no longer in json by default
Usage:
npm access list packages [<user>|<scope>|<scope:team> [<package>]
npm access list collaborators [<package> [<user>]]
npm access get status [<package>]
npm access set status=public|private [<package>]
npm access set mfa=false|publish|automation [<package>]
npm access grant <read-only|read-write> <scope:team> [<package>]
npm access revoke <scope:team> [<package>]
Options:
[--json] [--otp <otp>] [--registry <registry>]
Diffstat (limited to 'tap-snapshots')
-rw-r--r-- | tap-snapshots/test/lib/commands/completion.js.test.cjs | 16 | ||||
-rw-r--r-- | tap-snapshots/test/lib/load-all-commands.js.test.cjs | 14 | ||||
-rw-r--r-- | tap-snapshots/test/lib/npm.js.test.cjs | 14 |
3 files changed, 16 insertions, 28 deletions
diff --git a/tap-snapshots/test/lib/commands/completion.js.test.cjs b/tap-snapshots/test/lib/commands/completion.js.test.cjs index fb4c53a02..85a883bd5 100644 --- a/tap-snapshots/test/lib/commands/completion.js.test.cjs +++ b/tap-snapshots/test/lib/commands/completion.js.test.cjs @@ -172,11 +172,7 @@ Array [ ` exports[`test/lib/commands/completion.js TAP completion filtered subcommands > filtered subcommands 1`] = ` -Array [ - Array [ - "public", - ], -] +Array [] ` exports[`test/lib/commands/completion.js TAP completion flags > flags 1`] = ` @@ -220,15 +216,11 @@ exports[`test/lib/commands/completion.js TAP completion subcommand completion > Array [ Array [ String( - public - restricted + get grant + list revoke - ls-packages - ls-collaborators - edit - 2fa-required - 2fa-not-required + set ), ], ] diff --git a/tap-snapshots/test/lib/load-all-commands.js.test.cjs b/tap-snapshots/test/lib/load-all-commands.js.test.cjs index d4a340431..038121be9 100644 --- a/tap-snapshots/test/lib/load-all-commands.js.test.cjs +++ b/tap-snapshots/test/lib/load-all-commands.js.test.cjs @@ -9,18 +9,16 @@ exports[`test/lib/load-all-commands.js TAP load each command access > must match Set access level on published packages Usage: -npm access public [<package>] -npm access restricted [<package>] +npm access list packages [<user>|<scope>|<scope:team> [<package>] +npm access list collaborators [<package> [<user>]] +npm access get status [<package>] +npm access set status=public|private [<package>] +npm access set mfa=none|publish|automation [<package>] npm access grant <read-only|read-write> <scope:team> [<package>] npm access revoke <scope:team> [<package>] -npm access 2fa-required [<package>] -npm access 2fa-not-required [<package>] -npm access ls-packages [<user>|<scope>|<scope:team>] -npm access ls-collaborators [<package> [<user>]] -npm access edit [<package>] Options: -[--registry <registry>] [--otp <otp>] +[--json] [--otp <otp>] [--registry <registry>] Run "npm help access" for more info ` diff --git a/tap-snapshots/test/lib/npm.js.test.cjs b/tap-snapshots/test/lib/npm.js.test.cjs index 68adb5551..1c3dbe39b 100644 --- a/tap-snapshots/test/lib/npm.js.test.cjs +++ b/tap-snapshots/test/lib/npm.js.test.cjs @@ -168,18 +168,16 @@ All commands: access Set access level on published packages Usage: - npm access public [<package>] - npm access restricted [<package>] + npm access list packages [<user>|<scope>|<scope:team> [<package>] + npm access list collaborators [<package> [<user>]] + npm access get status [<package>] + npm access set status=public|private [<package>] + npm access set mfa=none|publish|automation [<package>] npm access grant <read-only|read-write> <scope:team> [<package>] npm access revoke <scope:team> [<package>] - npm access 2fa-required [<package>] - npm access 2fa-not-required [<package>] - npm access ls-packages [<user>|<scope>|<scope:team>] - npm access ls-collaborators [<package> [<user>]] - npm access edit [<package>] Options: - [--registry <registry>] [--otp <otp>] + [--json] [--otp <otp>] [--registry <registry>] Run "npm help access" for more info |