Skip to content

Conversation

G-Rath
Copy link
Contributor

@G-Rath G-Rath commented Aug 21, 2025

The conventional commits parser expects to be passed an array for headerCorrespondence but currently we're passing a plain string.

Ideally this should be done using newlines like other arrayish inputs, but since that would be a breaking change for now I've just introduced an ugly inline parse and a todo for the next major.

See my testing here: G-Rath#2

Resolves #294

@G-Rath G-Rath force-pushed the split-header-correspondence branch 3 times, most recently from 3bfaeb7 to 7ca51dd Compare August 21, 2025 19:44
@G-Rath G-Rath force-pushed the split-header-correspondence branch from 7ca51dd to 1337dc5 Compare August 21, 2025 19:45
@G-Rath
Copy link
Contributor Author

G-Rath commented Aug 21, 2025

I've not been able to prove this should be working on v5 (G-Rath#3) but I'm happy to chalk that up to having just not put enough effort in 🤷

Ironically this seems like an undocumented breaking change in the parser - pre-v6 a string is supported:

Used to define what capturing group of headerPattern captures what header part. The order of the array should correspond to the order of headerPattern's capturing group. If the part is not captured it is null. If it's a string it will be converted to an array separated by a comma.

but the changelog for v6 does not call out this no longer being supported

Copy link
Owner

@amannn amannn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks a bunch @G-Rath for jumping in here, really appreciate it! ❤️

And yes, I think this fixes exactly what went wrong here. I agree with your reasoning regarding converting this to an array for the next major.

Ironically this seems like an undocumented breaking change in the parser

It seems like, yes! Unfortuantely the test suite also didn't catch it, but the workflow you added should help to avoid regressions related to this in the future.

@amannn amannn merged commit 800da4c into amannn:main Aug 22, 2025
8 checks passed
@github-actions
Copy link

🎉 This PR is included in version 6.1.1 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

@amannn
Copy link
Owner

amannn commented Aug 27, 2025

@G-Rath I haven't had any reports anymore about problems on v6 after this PR, just wanted to thank you again for your help fixing the regression I've introduced. I really appreciate it! ❤️

@G-Rath G-Rath deleted the split-header-correspondence branch August 27, 2025 19:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6.1.0 update breaks functionality?!

2 participants