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(usage): better audit/boolean flag usage output #3497

Merged
merged 1 commit into from Jul 12, 2021

Conversation

wraithgar
Copy link
Member

This adds the audit config item to the usage output of npm ci, and
also tweaks how usage flags are shown for boolean options that do not
default to false. Their usage is shown as the --no-x form of the flag
to better communicate that the flag is needed to turn that normally true
option OFF.

The description of audit was also updated to reflect that it runs on
many different npm commands, not just install. Because this flag is
included in the usage of those commands it's best to let the assocation
happen there instead of trying to be comprehensive in the description
itself.

A small fix to make install-ci-test not try to redefine its own
usage, but to inherit from ci was also included.

References

Closes #2703

@wraithgar wraithgar requested a review from a team as a code owner July 1, 2021 22:04
@wraithgar
Copy link
Member Author

Added a hard-coded usage for --color because its default is dependent on the environment it's ran in.

@darcyclarke darcyclarke added Release 7.x work is associated with a specific npm 7 release semver:patch semver patch level for changes labels Jul 12, 2021
This adds the `audit` config item to the usage output of `npm ci`, and
also tweaks how usage flags are shown for boolean options that do not
default to false.  Their usage is shown as the `--no-x` form of the flag
to better communicate that the flag is needed to turn that normally true
option OFF.

The description of `audit` was also updated to reflect that it runs on
many different npm commands, not just install.  Because this flag is
included in the usage of those commands it's best to let the assocation
happen there instead of trying to be comprehensive in the description
itself.

A small fix to make `install-ci-test` not try to redefine its own
usage, but to inherit from `ci` was also included.

PR-URL: #3497
Credit: @wraithgar
Close: #3497
Reviewed-by: @nlf
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Release 7.x work is associated with a specific npm 7 release semver:patch semver patch level for changes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants