-
-
Notifications
You must be signed in to change notification settings - Fork 27
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
Allow overriding the registry URL #31
Comments
Not a big fan of this idea. I would prefer it to be fully automatic or if that's not possible, for |
Also note that |
It does, but it won't be able to correctly check the name of a private package in case the package is a private package which is published to a custom private registry, while the currently configured npm registry is a different one (probably https://registry.npmjs.org in the issues I've mentioned above). |
Since I accepted sindresorhus/package-json@53c40f2, I guess I should accept this too, but it too should come with a big warning about when and when not to use it. |
I'll work on a PR to add this 👌🏻 |
In some cases (e.g. in np - see sindresorhus/np#350 and sindresorhus/np#317) you want to resolve a package name for a given registry that wasn't configured to be the user's default registry. I think that
npm-name
should still use the registry URL returned byregistry-url
as the default one, but also accept an optional registry URL as the second argument, i.e.npmName(name, [registryUrl])
andnpmName.many(names, [registryUrl])
.// cc @weekens @jdziat
The text was updated successfully, but these errors were encountered: