Commit bdcc10d
feat: add support for optional env var replacements in .npmrc (#8359)
<!-- What / Why -->
This solves problem described in #8335 in a backwards-compatible way.
<!-- Describe the request in detail. What it does and why it's being
changed. -->
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
<!-- Examples:
Related to #0
Depends on #0
Blocked by #0
Fixes #0
Closes #0
-->
Fixes #8335
---------
Co-authored-by: Michael Smith <[email protected]>1 parent dd4cee9 commit bdcc10d
File tree
3 files changed
+24
-9
lines changed- docs/lib/content/configuring-npm
- workspaces/config
- lib
- test
3 files changed
+24
-9
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
28 | | - | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
29 | 31 | | |
30 | 32 | | |
31 | 33 | | |
32 | 34 | | |
| 35 | + | |
33 | 36 | | |
34 | 37 | | |
35 | 38 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
| 2 | + | |
2 | 3 | | |
3 | | - | |
| 4 | + | |
4 | 5 | | |
5 | | - | |
6 | | - | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
7 | 9 | | |
8 | 10 | | |
9 | 11 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
9 | | - | |
10 | | - | |
11 | | - | |
12 | | - | |
13 | | - | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
0 commit comments