feat: add support for optional env var replacements in .npmrc
This solves problem described in #8335 in a backwards-compatible way.
This PR adds possibility to have env var replacements in .npmrc configs written as ${VAR?} which will cause them to get replaced with an empty string if the variable is not defined. Old behavior where undefined variables are left unreplaced is not changed.
References
Fixes #8335
I know linting checks for this but I also manually validated via https://devina.io/redos-checker
@aczekajski any update on this PR? thank you for your work on it
@alexsch01 I completely forgot about the change suggestions waiting for my action, sorry. Gonna have a look at them soon! Thank you for the reminder ^^
@alexsch01 @owlstronaut I commited the suggested changes so I believe the PR is ready for review.