imyller / meta-nodejs

OpenEmbedded layer for latest Node.js releases
MIT License
79 stars 87 forks source link

Add NPM_REGISTRY variable that allows to use a custom npm registry. #15

Closed bachp closed 8 years ago

bachp commented 9 years ago

Users with custom npm registries can set NPM_REGISTRY in their local.conf and all recipes using the npm.bbclass should use it.

imyller commented 9 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.

imyller commented 9 years ago

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.

bachp commented 9 years ago

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.