Closed bachp closed 8 years ago
This PR looks good as long as we commit to keeping up-to-date the hardcoded URL https://registry.npmjs.org/
So far this has been up to npm itself to provide up-to-date default registry URLs.
In my opinion, defining NPM_REGISTRY
in local.conf
is not something that should be universally encouraged. It's only for those who really know what they are doing :)
There is no promise that this custom registry provides all publicly available packages required.
For that reason, I think that people should be encouraged to define their custom registries per recipe basis by setting the NPM_REGISTRY
there. That way they can control the availability of dependencies better.
For your first comment, I also tough about not providing the default URL but I couldn't come up with a nice solution to add the flag only if NPM_REGISTRY
is set, if you have an idea I'm happy if we could change it.
I disagree with your second point. I have a use case where the public registry is not available in the network, but instead an internal caching registry is used, this registry provides access to all public npm packages as well as some private packages. But you are right most people prooably don't need this and that's also why it is not documented like this.
Users with custom npm registries can set
NPM_REGISTRY
in theirlocal.conf
and all recipes using thenpm.bbclass
should use it.