fix: do not treat option value 1 as a count increment - #548
official-burak wants to merge 1 commit into
Conversation
|
This looks like a drive-by AI contribution. The account created 29 other Pull Requests in 12 days. This may get looked at and used when the issue is prioritised. The human maintainer does not have time to review all AI heavy PRs that are opened. |
Thanks for your feedback. I focus on AI-Native development, so I heavily utilize AI in my coding processes. However, I stand behind the code I submit and believe it adds value to the project. I completely understand the time constraints human maintainers face. I respect your decision to close this PR; feel free to revisit it whenever the issue is prioritized. |
Fixes #506.
parser("-x 3 -x 1")currently returns{ x: 4 }becausesetKeytreats any value of1as a count step (value === increment(), andincrement()returns 1). Count flags now use a unique sentinel instead of the number 1.-x 3 -x 1is now[3, 1]. Withduplicate-arguments-array: falsethe last value stays1. Existing count tests still pass.