Skip to content

fix: strip dashed keys at nested option paths - #556

Closed
xiehuanyi wants to merge 2 commits into
yargs:mainfrom
xiehuanyi:fix/strip-nested-dashes-round3
Closed

xiehuanyi wants to merge 2 commits into
yargs:mainfrom
xiehuanyi:fix/strip-nested-dashes-round3

Conversation

@xiehuanyi

@xiehuanyi xiehuanyi commented Oct 6, 2026 •

Copy link
Copy Markdown

With strip-dashed enabled, --outer.inner-dash value currently leaves both inner-dash and innerDash in the nested result. Remove dashed keys at the option and alias paths generated by parsing, preserving the camel-case keys consistently at every depth.

Fixes #223.

Validation: two regressions fail on the original code; controls cover literal dotted keys with dot notation disabled and preserving unrelated keys inside a coerce result. Controls also preserve matching dashed keys in plain and frozen coerce results. All 367 parser tests, 20 TypeScript tests, and lint pass.

Copilot AI balanced review requested due to automatic review settings October 6, 2026 19:04

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@shadowspawn

Copy link
Copy Markdown
Member

This looks like a drive-by AI contribution.

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.

For more, see draft AI Policy yargs/yargs#2606

@shadowspawn shadowspawn closed this Oct 6, 2026
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.

dot-notation doesn't respect strip-dashed

3 participants