feat: add support for optional env var replacements in .npmrc#8359
Merged
owlstronaut merged 5 commits intonpm:latestfrom Sep 3, 2025
Merged
feat: add support for optional env var replacements in .npmrc#8359owlstronaut merged 5 commits intonpm:latestfrom
owlstronaut merged 5 commits intonpm:latestfrom
Conversation
Member
|
I know linting checks for this but I also manually validated via https://devina.io/redos-checker |
owlstronaut
requested changes
Jul 1, 2025
Contributor
owlstronaut
left a comment
There was a problem hiding this comment.
Looks like a great feature! Just a couple nits
Contributor
|
@aczekajski any update on this PR? thank you for your work on it |
Contributor
Author
|
@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 ^^ |
Co-authored-by: Michael Smith <owlstronaut@github.com>
Co-authored-by: Michael Smith <owlstronaut@github.com>
Co-authored-by: Michael Smith <owlstronaut@github.com>
Contributor
Author
|
@alexsch01 @owlstronaut I commited the suggested changes so I believe the PR is ready for review. |
owlstronaut
approved these changes
Sep 3, 2025
reggi
approved these changes
Sep 3, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

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