fix(publish): follow all configs for registry auth check#2602
Merged
ruyadorno merged 1 commit intorelease/v7.5.3from Feb 4, 2021
Merged
fix(publish): follow all configs for registry auth check#2602ruyadorno merged 1 commit intorelease/v7.5.3from
ruyadorno merged 1 commit intorelease/v7.5.3from
Conversation
7a7de8e to
a8e6155
Compare
This was referenced Feb 3, 2021
Member
Author
|
Found bugs while improving the tests around this. More commits incoming. |
8572e95 to
ff241c4
Compare
ef15bd3 to
e84e9d3
Compare
ruyadorno
approved these changes
Feb 4, 2021
PR-URL: #2602 Credit: @wraithgar Close: #2602 Reviewed-by: @ruyadorno
e84e9d3 to
1c986d6
Compare
This was referenced Feb 4, 2021
Merged
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.
The "do you have auth configured" only takes into consideration a hard-coded
"registry" config, which means that if you don't have auth configured for
the npm registry, but you do for the one you have tied to a scope elsewhere
in your npmrc, we would erroneously tell you that to add a token.
This uses the same method that the rest of the publish chain uses to determine
which registry it would be publishing to, then sees if you have auth for THAT registry.
Because that other function does a hard fallback to the npm registry, there is no more
need for the exception we throw if you do not have one configured. Also, the npm cli
already defaults that config item, so you can't even set it to a falsey value if you
wanted
References
Closes #2567