chore: add web-login proxy doneUrl regression for npm-profile fix#9560
Draft
manzoorwanijk wants to merge 1 commit into
Draft
chore: add web-login proxy doneUrl regression for npm-profile fix#9560manzoorwanijk wants to merge 1 commit into
manzoorwanijk wants to merge 1 commit into
Conversation
e07a39d to
24f64a5
Compare
Contributor
Author
|
@owlstronaut we can update and land this once npm/npm-profile#191 lands in this repo after release and bump. |
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.
Adds a regression test for #8875. The fix is in npm-profile (npm/npm-profile#191).
This test is expected to be red until bundled
npm-profileis bumped to the release with the fix, and turns green after that.Why
npm login --auth-type=websilently fails behind a proxy/mirror: the returneddoneUrlpoints at the canonicalregistry.npmjs.orginstead of the proxy, so npm polls the wrong host, gets a403, and falls back to couch auth (which also fails). Fixed in npm-profile by rewritingdoneUrlto the configured registry origin.How
@npmcli/mock-registry:weblogin()gains an optionaldoneRegistryto emulate a proxy advertising adoneUrlon another origin.test/lib/commands/login.js: proxy registry whosedoneUrlis onregistry.npmjs.org; asserts the token is saved with no couch fallback. Fails with the current bundled npm-profile, passes once it is bumped.References
Fixes #8875
Depends on: npm/npm-profile#191
Related: #9550