Commit 4b495e2
authored
fix: escape regex backslashes in release-it config for scoped commits (#1964)
**Closes:** #1963
### Description of Changes
Commits with scopes (e.g., `docs(adr):`, `fix(auth):`) were not
appearing in [GitHub release
changelogs](https://github.com/NASA-IMPACT/veda-ui/releases/tag/v6.20.3).
The issue seems to be caused by the regex in `.release-it.js` thats
using single backslashes inside a template literal passed to `new
RegExp()`. So things like `\(` was interpreted as `(` (a grouping
operator) instead of a literal parenthesis.
Double-escaping the backslashes should fix the pattern so scoped conv
commits are matched correctly.
### Notes & Questions About Changes
_{Add additonal notes and outstanding questions here related to changes
in this pull request}_
### Validation / Testing
Tested locally by running this utility in my terminal:
```
node -e "
const config = require('./.release-it.js');
const releaseNotes = config.github.releaseNotes;
const changelog = 'feat: add feature\nfix(auth): fix login bug\ndocs(adr): update ADR';
console.log(releaseNotes({ changelog }));
"
```
Before fix: Only feat: add feature appears in output
After fix: All three commits appear, including scoped ones (fix(auth):,
docs(adr):)1 file changed
+1
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
25 | | - | |
| 25 | + | |
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
| |||
0 commit comments