Skip to content

Fix for #9#10

Merged
ljharb merged 1 commit intominimistjs:mainfrom
nhz-io:main
Oct 19, 2022
Merged

Fix for #9#10
ljharb merged 1 commit intominimistjs:mainfrom
nhz-io:main

Conversation

@nhz-io
Copy link
Copy Markdown
Contributor

@nhz-io nhz-io commented Oct 18, 2022

No description provided.

@nhz-io
Copy link
Copy Markdown
Contributor Author

nhz-io commented Oct 18, 2022

To minimize the impact on the rest of the code, i kept the aliases as they are (non-flat, nested).
So the fix is only on the flags.string. The fix is future proof if one day aliases become flat.

@shadowspawn
Copy link
Copy Markdown
Member

I prefer expanding the tests to cover this combination rather than adding a specific regression test for the failure. So the test would be named like "opt.string works with multiple aliases" rather than "Issue #9 fixed".

But wait for a second opinion from @ljharb before changing.

Copy link
Copy Markdown
Member

@ljharb ljharb left a comment

Choose a reason for hiding this comment

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

Fix looks great and backwards-compatible!

Comment thread package.json Outdated
Comment thread test/fixes/issue-09.js Outdated
Comment thread test/fixes/issue-09.js Outdated
Comment thread index.js
@nhz-io nhz-io requested a review from ljharb October 18, 2022 06:15
Comment thread test/parse.js Outdated
Copy link
Copy Markdown
Member

@ljharb ljharb left a comment

Choose a reason for hiding this comment

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

LGTM!

@ljharb ljharb merged commit 2edc957 into minimistjs:main Oct 19, 2022
ljharb pushed a commit that referenced this pull request Oct 19, 2022
ljharb pushed a commit that referenced this pull request Oct 19, 2022
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.

3 participants