rfcs
rfcs copied to clipboard
[RRFC] --registry=default or --default-registry support
Motivation
At times for most of the CLI commands that provide support for --registry we would override the proxy with providing the default npm registry URL, rather this would be simpler if we were to have --registry=default option that would set it or use the default npm reg.
Example
npm install --registry=https://registry.npmjs.org/
# isn't of ^ we can use
npm install --registry=default
# or
npm install --default-registry
npm config set registry https://registry.npmjs.org/
# isn't of ^ we can use
npm config set registry default
How
Current Behaviour
There is not options other than specifying the URL
Desired Behaviour
Support for --registry=default
References
- n/a
This realistically would end up needing to be a separate config item telling config which values to revert back to their defaults, since --registry is already a string so we can't just say "these values can't be set to this config item"
Or we always default to https://registry.npmjs.org/ ?
It already is the default. I believe if there were a way to delete a config entry this would functionally do the same thing?
But that may not work because you really would want to be able to do that on the cli. What this really does need is a new config item that says "These config items should be set to their default"
i.e.
npm install --use-default=registry