Skip to content
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

Yarn should allow users to override registry host in yarn.lock #3558

Closed
OpenGG opened this issue Jun 2, 2017 · 2 comments
Closed

Yarn should allow users to override registry host in yarn.lock #3558

OpenGG opened this issue Jun 2, 2017 · 2 comments

Comments

@OpenGG
Copy link

OpenGG commented Jun 2, 2017

I want to request a feature.

What is the current behavior?

  • When yarn.lock exists, Yarn install command will always try to access resolved url, ignoring registry in .yarnrc.
  • When the host inside resolved is not accessible, Yarn install command will fail.
  • The only way for users to override the host in resolved is modifying the lock files.

What is the expected behavior?

I suggest yarn to take npm behavior:

If you generated your package lock against registry A, and you switch to registry B, npm will now try to install the packages from registry B, instead of A. If you want to use different registries for different packages, use scope-specific registries (npm config set @myscope:registry=https://myownregist.ry/packages/). Different registries for different unscoped packages are not supported anymore.
http://blog.npmjs.org/post/161081169345/v500

Or at lease give users a cli option to override registry host in yarn.lock

Please mention your node.js, yarn and operating system version.

Node.js version: 8.0.0
Yarn version: 0.24.6
NPM version: 5.0.1

You can also check this repo:
https://github.com/OpenGG/yarn-lock-resolved-override-registry

@OpenGG
Copy link
Author

OpenGG commented Jun 2, 2017

Related issues:
yarnpkg/rfcs#64
#3330
#2566

@arcanis
Copy link
Member

arcanis commented Jun 6, 2017

Yep, I'll close this one in favor of #3330 :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants