[RRFC] require authentication only once during one single npm publish using workspaces
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 778
- Forks
- 266
- PR merge metrics
- No merged PRs in 30d
Description
Motivation ("The Why")
I have a lot of mono-repos, which want to be published every once in a while. When using the workspace option to publish multiple packages at once, I get multiple prompts for authentication.
Yes, I can check the checkbox in the web-UI to not be prompted within the next 5 minutes, but that is not my intention in this case. I only want to publish the specified packages. The option to not be bothered for 5 minutes also seems like an unnecessary risk for this use-case.
I remember, that at least some time ago, lerna was able to publish multiple packages with one OTP prompt. Not sure how they did it, but that was comfortable. Not sure if they still support it though, haven't used it in a while.
Example
I have a mono-repo with 3 packages.
- I adjust the versions on 2 of them and want to publish them via CLI.
- I run
npm publish --access public -w pack1 -w pack2 - I have published my packages successfully
How
Current Behaviour
When I run npm publish --access public -w pack1 -w pack2, I have two options for authentication:
- open the web-UI authentication link once per package to be released
- open the first web-UI authentication link and check the checkbox to not be bothered for the next 5 minutes
Desired Behaviour
When I run npm publish --access public -w pack1 -w pack2, I get only one web-UI authentication link, even if I don't check the checkbox to not be bothered for 5 minutes.
References
- n/a
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
No files or tests are named. Start with the RFC discussion and the npm publish command using -w workspace options, then trace how authentication is handled across selected packages. Done means a decided proposal specifying one authentication prompt for all selected packages without relying on the five-minute bypass.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- authentication, cli, release
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100