-
Notifications
You must be signed in to change notification settings - Fork 2.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
new npm access
and libnpmaccess
interfaces
#5445
Conversation
no statistically significant performance changes detected timing results
|
83e9fe2
to
4ead473
Compare
testComp(['npm', 'access', 'list'], ['packages', 'collaborators']) | ||
testComp(['npm', 'access', 'ls'], ['packages', 'collaborators']) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
npm owner add
suggests s/collaborators/owners
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
They are interacting with totally different api endpoints. One adds/removes folks from maintainers
in the packument, the other interacts with a /-/package/[name]/collaborators
endpoint. There's obviously overlap there but we are providing access to the two api methods we have.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I’m just speaking to the terminology - user-facing terms should be consistent even if api endpoints weren’t built to be.
4ead473
to
cdfda5f
Compare
BREAKING CHANGE: the api for libnpmaccess is different now It is aligned more with how npm uses it, consolidating the mfa functions into a single command, and renames the functions to be easier to eventually consolidate into a registry client library. See the README for the new api.
cdfda5f
to
f0bbcdf
Compare
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>]
f0bbcdf
to
85ffcd1
Compare
Output is no longer json by default, but human readable.
We should decide if this output is ok, and what to output for the commands that currently have no output (TODOs in the code).
Closes: npm/statusboard#477
Closes: npm/statusboard#486