[rush] Allow global configuration of package manager settings that Rush passes during install #1994
Open
1 of 2 tasks
Labels
general discussion
Not a bug or enhancement, just a discussion
needs design
The next step is for someone to propose the details of an approach for solving the problem
Is this a feature or a bug?
Please describe the actual behavior.
There are some settings/features that package managers provide that users may want to set every time they run an install. A good example of this would be network timeout settings, which
fetch-retry-factor
in PNPM, ornetwork-timeout
in Yarn)Currently, Rush does not support passing in any package manager specific values that aren't explicitly supported on the
rush install
/rush update
CLI, or specified inrush.json
package manager options. This is limiting becauserush.json
file is checked in, and settings that are optimal for one developer may not necessarily apply to anotherWhat is the expected behavior?
These types of settings do not materially impact how the Rush repo may be expected to install, but instead are modifiers to improve developer experience. That's not to say some solution should/shouldn't allow changing things that materially affect install, though this is more of a slippery slope that I'm not trying to address with this issue. I'm personally of the opinion that dangerous settings like that should be tightly controlled by the repo manager (as is currently done with package manager-specific settings in
rush.json
).One option would be to use a settings file (or files) in the home directory (under
~/.rush
, for example) to store these settings. This file (or files) could be strongly validated against a schema, or compared against a whitelist of known parameters that could be used to warn if a provided value was not known to be supported. The values inside this file would then be passed on to the package manager wheneverrush install
orrush update
is run.The text was updated successfully, but these errors were encountered: