Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix for #9 #10

Merged
merged 1 commit into from Oct 19, 2022
Merged

Fix for #9 #10

merged 1 commit into from Oct 19, 2022

Conversation

nhz-io
Copy link
Contributor

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

No description provided.

@nhz-io
Copy link
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
Collaborator

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
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!

package.json Outdated Show resolved Hide resolved
test/fixes/issue-09.js Outdated Show resolved Hide resolved
test/fixes/issue-09.js Outdated Show resolved Hide resolved
index.js Show resolved Hide resolved
@nhz-io nhz-io requested a review from ljharb October 18, 2022 06:15
test/parse.js Outdated Show resolved Hide resolved
Copy link
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!

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.

None yet

3 participants