-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
Consider deprecating registry.yarnpkg.com? #5891
Comments
Edit I changed my view, cf below. You have a valid point, now that npm moved to Cloudflare we can reasonably expect a speed improvement, so using our mirror isn't that important (I personally feel motivated when I see our little stat page going up, but I agree this isn't a reason to keep the thing around if it doesn't benefit the users). However as you mentioned we'll always have to keep the registry around, so I don't think there's any hurry to change things now (which doesn't mean we'll keep using it by default forever, but right now I'd prefer to focus on other things). What I think we should do:
|
I think this will still be a breaking change due to whitelisting in CI environments. Is there a good reason to keep the proxy? |
Yeah, it doesn't matter what is in the yarn.lock, it will be a breaking change because in some CI environments requests to registry.npmjs.org will fail |
I have created a module to help us convert the registry of |
yarn 1.9.4 silently ignores
Would be good it it produced output like "Hey, we are going to ignore your config" |
@jaredbeck That seems to be #6259 |
@arcanis One of the best parts of Yarn is its separation from NPM. When the v5 shenanigans were hurting lots of us, Yarn was there to keep us productive. With another NPM outage today, that has taken Yarn down with it, is there any chance there could be a completely separate Yarn mirror? I understand the benefits of having a single source of truth, but it also puts the entire ecosystem into a single point of failure. The NPM registry could be periodically copied and then have redundant yarnpkg urls pointing to that copy. If the NPM registry goes offline for whatever reason there would be a recent-ish copy to continue pulling from until syncing is resumed. |
@greggb - the solution to that problem is the offline mirror feature in Yarn. Otherwise it is simply not feasible to have a completely separate repo with fast replication and for free. |
@BYK That's a reactive solution though, right? I would like to do some work today, but because I don't have the mirror setup it's too late. Any feelings on a subscription service? I know I'd be willing to look into a supported yarn service if it creates an alternative for JS package management. Edit: As far as I'm aware the offline mirror is also limited to packages one's already installed. |
@greggb - offline mirror is a preemptive measure like backups or the mirror you are proposing. You just have to do it before a disaster happens 😊 I personally don't think we need a mirror under these circumstances and it would just be too costly to maintain without the help of a company like CloudFlare or Akamai. Even then, just the operational overhead and making sure that service stays alive is not easy as you can see from npm folks. |
@BYK You definitely know better than me, thanks for explaining. Just always nice to have options :). Going to go create an offline mirror for all the packages I may potentially want to install in the future 🤣 |
I've updated the title to clarify that this was more a discussion than an action item. Given the way things are going and the relative uncertainty of the long term viability of npm I'm strongly in favor of keeping the registry CNAME up for the foreseeable future. My arguments are:
I'll close this issue for now to avoid confusion (it's not the first time I see it referenced as a fact), feel free to keep discussing if you'd like. |
Opening this to discuss moving to registry.npmjs.org now that they've moved to Cloudflare.
Assuming we want to deprecate the Yarn registry (which seems to be the correct assumption), we need a plan for how to do it because a lot of infrastructure now depends on it.
For starters, we can never ever get rid of registry.yarnpkg.com completely. We shouldn't break those systems that depend on it, and it costs nothing so why would we not just leave it in place permanently.
Also, we cannot switch the registry config over outside of a major version as there are many CI systems that whitelist registry.yarnpkg.com and would break if it was switched.
However, we can start recommending that people change their Yarn configs to the npm registry immediately and start outputting deprecation warnings. Then in Yarn 2.0 we can switch the default registry over.
We could also consider putting something inside yarn.lock which configures the preferred registry and for new yarn.lock files we can use the non registry.
The text was updated successfully, but these errors were encountered: