Skip to content
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

feat(access): Deprecate & warn for subcommands #500

Closed
7 tasks done
Tracked by #489
darcyclarke opened this issue May 2, 2022 · 6 comments
Closed
7 tasks done
Tracked by #489

feat(access): Deprecate & warn for subcommands #500

darcyclarke opened this issue May 2, 2022 · 6 comments
Assignees
Labels

Comments

@darcyclarke
Copy link
Contributor

darcyclarke commented May 2, 2022

Summary

We will be removing a number of npm access commands in v9 (ref. #486); show warnings when someone uses them in v8.x.

Exit Criteria

  • start throwing a warning for deprecation of 2fa-required
  • start throwing a warning for deprecation of 2fa-not-required
  • start throwing a warning for deprecation of public
  • start throwing a warning for deprecation of restricted
  • start throwing a warning for deprecation of edit
  • start throwing a warning for deprecation of ls-packages
  • start throwing a warning for deprecation of ls-collaborators
@darcyclarke darcyclarke transferred this issue from npm/cli May 2, 2022
@darcyclarke darcyclarke added feature and removed chore labels May 16, 2022
@darcyclarke darcyclarke changed the title chore(access): Deprecate & warn for subcommands feat(access): Deprecate & warn for subcommands May 16, 2022
@wraithgar wraithgar self-assigned this Aug 22, 2022
@wraithgar
Copy link
Member

edit is not implemented yet so no warning is needed.

  async edit () {
    throw new Error('edit subcommand is not implemented yet')
  }

@wraithgar
Copy link
Member

PR implementing this is here, ready for copy editing if needs be npm/cli#5347

@jaswrks
Copy link

jaswrks commented Jan 21, 2023

@wraithgar Hi. Was grant / revoke intended to be a part of this and deprecated? If so, do you know what is going to replace them? I don't see any other functionality in the CLI that's equivalent, and these were not deprecated in the latest release.

@wraithgar
Copy link
Member

Those subcommands are still part of npm access and I don't see where they were ever deprecated.

~/D/n/c/b/main (latest|✔) $ npm -v
9.3.1
~/D/n/c/b/main (latest|✔) $ npm access -h
Set access level on published packages

Usage:
[...]
npm access grant <read-only|read-write> <scope:team> [<package>]
npm access revoke <scope:team> [<package>]

They are also included in the tests that ensure they result in actual http calls to the registry.

@jaswrks
Copy link

jaswrks commented Jan 23, 2023

@wraithgar Thanks for confirming. So the docs state they are deprecated, though.
https://docs.npmjs.com/cli/v9/commands/npm-access

grant / revoke (deprecated): Add or remove the ability of users and teams to have read-only or read-write access to a package.

@wraithgar
Copy link
Member

Looks like the docs weren't updated to reflect the new v9 api npm/cli#5445

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants