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(publish): Add --legacy-auth
flag
#2347
Conversation
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 half-inclined to only allow this config via lerna.json
, avoiding the CLI bloat. Thoughts?
commands/publish/command.js
Outdated
@@ -35,6 +35,11 @@ exports.builder = yargs => { | |||
type: "string", | |||
requiresArg: true, | |||
}, | |||
"legacy-auth": { | |||
describe: "Legacy Base64 Encoded username and password.", | |||
alias: "_auth", |
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.
--_auth
is an extremely odd option name. Please don't add this alias.
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.
This is actually the same as the npm _auth
flag. So using that as a signal that it's a pass through. But I can remove it and then put this in the description/docs.
We will still use _auth internally because that is what NPM expects.
@evocateur thank you so much for the review! Conflicts still need to be fixed, but let me know if everything else looks ok to you. This will be huge for us if merged in 😄 |
--legacy-auth
flag
Thanks for your patience! |
Hey @evocateur thank you for merging this in! Any idea when you would like to publish the next release? Did you want to wait till after the holidays? |
Description
This PR adds a new(ish)
_auth/legacy-auth
flag to thepublish
command that allows users of lerna work with NPM registries that still use the "legacy" authorization type for publishing their packages. This_auth
flag is already supported by npm, so the change is small.Motivation and Context
There are some registries that still use the legacy NPM
_auth
flag for authorization. In the NPM docs they refer this auth type as "legacy". Lerna today does not support this flag, but it is supported by the npmpublish
command. Which means that if we need to pass in this authorization we have to opt out of all the goodnesslerna publish
command provides and uselerna exec
to run thenpm publish --_auth=Base64Str
command.How Has This Been Tested?
Types of changes
Checklist: