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

Options parsing: fix and optimize #4011

Closed
wants to merge 2 commits into from
Closed

Conversation

juergba
Copy link
Contributor

@juergba juergba commented Sep 6, 2019

Description

We take advantage of two new yargs-parser configuration settings in order to:

  • fix a bug while parsing camel-cased options
  • optimize the parsing result: we just keep the canonical or its camel-cased versions of the option names.

Description of the Change

Additional settings of yargs-parser configuration:

  • 'camel-case-expansion': true:
    for correct parsing of camel-cased options, eg. watchFiles ==> watch-files
  • 'strip-aliased': true:
    aliases are removed from result.
  • 'strip-dashed': true:
    dashed options (watch-files) are removed from result, we keep only the camel-cased versions (watchFiles)

@coveralls
Copy link

coveralls commented Sep 6, 2019

Coverage Status

Coverage decreased (-0.003%) to 92.662% when pulling a116357 on juergba/clean-options into eed38d7 on master.

@stale
Copy link

stale bot commented Jan 20, 2020

I am a bot that watches issues for inactivity.
This issue hasn't had any recent activity, and I'm labeling it stale. In 14 days, if there are no further comments or activity, I will close this issue.
Thanks for contributing to Mocha!

@stale stale bot added the stale this has been inactive for a while... label Jan 20, 2020
@juergba juergba removed the stale this has been inactive for a while... label Jan 23, 2020
@stale
Copy link

stale bot commented May 19, 2020

I am a bot that watches issues for inactivity.
This issue hasn't had any recent activity, and I'm labeling it stale. In 14 days, if there are no further comments or activity, I will close this issue.
Thanks for contributing to Mocha!

@stale stale bot added the stale this has been inactive for a while... label May 19, 2020
@outsideris outsideris removed the stale this has been inactive for a while... label May 23, 2020
@stale
Copy link

stale bot commented Sep 20, 2020

I am a bot that watches issues for inactivity.
This issue hasn't had any recent activity, and I'm labeling it stale. In 14 days, if there are no further comments or activity, I will close this issue.
Thanks for contributing to Mocha!

@stale stale bot added the stale this has been inactive for a while... label Sep 20, 2020
@stale stale bot closed this Oct 4, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stale this has been inactive for a while...
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants