-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Fix installing from private registry.npmjs.org #1896
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
Conversation
@KidkArolis, this change looks reasonable but it is hard to see the side effects. |
89865bd
to
32c4d59
Compare
Hm, so I tried adding a test, but then realised I couldn't reproduce the issue discussed in #1666. I bought an npm subscription to investigate this further. I think what happens is this:
So, yeah, it works though, so in a way, this isn't an issue. Let me see if I can summon @SEAPUNK and ask him to reproduce. |
@SEAPUNK , if you follow these instructions, does it work for you?
|
@KidkArolis OH, didn't notice this until now. I'll try it out later tonight, if I remember to. |
ping, @KidkArolis, could you rebase? |
Previously, when URLs got rewritten, the npm-registry would fail to find the right token in the config file.
32c4d59
to
af048a0
Compare
Any update on this? It work for me! 👍 |
@KidkArolis could you rebase once more please? |
import {addSuffix, removePrefix} from '../util/misc'; | ||
import {YARN_REGISTRY} from '../constants.js'; | ||
|
||
const NPM_REGISTRY = /http[s]:\/\/registry.npmjs.org/g; |
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 think this should be https?
, not http[s]
, right?
Sorry for forgetting about this is it still relevant? |
As it is not in a mergeable state I am closing the PR. |
First attempt at fixing #1895. Discussed in more detail in #1666.
The issue this tries to fix is that rewriting npmjs.org > yarnpkg.com will confuse any logic that relies on reading per registry configuration from the .npmrc file, such as reading authTokens.
I thinks this PR might affect how the lock files get generated, not sure if that's a problem.