new npm access and libnpmaccess interfaces#5445
Merged
Merged
Conversation
Collaborator
|
no statistically significant performance changes detected timing results
|
83e9fe2 to
4ead473
Compare
ljharb
reviewed
Aug 31, 2022
ljharb
reviewed
Aug 31, 2022
Comment on lines
+18
to
+19
| testComp(['npm', 'access', 'list'], ['packages', 'collaborators']) | ||
| testComp(['npm', 'access', 'ls'], ['packages', 'collaborators']) |
Contributor
There was a problem hiding this comment.
npm owner add suggests s/collaborators/owners?
Contributor
Author
There was a problem hiding this comment.
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.
Contributor
There was a problem hiding this comment.
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
darcyclarke
suggested changes
Sep 13, 2022
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
darcyclarke
approved these changes
Sep 14, 2022
7 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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