You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[BUG] Overriding package.json config values does not work. #3475
A "config" object can be used to set configuration parameters used in package scripts that persist across upgrades. For instance, if a package had the following:
{
"name": "foo",
"config": {
"port": "8080"
}
}
and then had a "start" command that then referenced the npm_package_config_port environment variable, then the user could override that by doing npm config set foo:port 8001.
The override appears to have stopped working in v7, it would appear from RFC 21 that this is intentional.
npm_package_config_* Each key in the config object will be included, but npm will not override values with a : config value if one exists.
However
It is still listed as a feature in the docs.
It is very useful and no indication of a suitable alternative has been provided.
Expected Behavior
I would like this behaviour to be re-introduced or an alternative way of doing the same thing provided.
The docs do need to be cleaned up to reflect the new behavior. As far as a suitable alternative, suggesting that would be best done through the rfc process.
I agree with the OP: this was useful, and its removal is breaking things. So be it. But there still seems to be no recommendations for "suitable alternatives" to have come out of this process anywhere I can see?
Activity
wraithgar commentedon Jun 30, 2021
The docs do need to be cleaned up to reflect the new behavior. As far as a suitable alternative, suggesting that would be best done through the rfc process.
wu-lee commentedon Oct 24, 2022
I agree with the OP: this was useful, and its removal is breaking things. So be it. But there still seems to be no recommendations for "suitable alternatives" to have come out of this process anywhere I can see?