-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
[BUG] npm ls --omit=dev
does not omit dev dependencies
#4739
Comments
npm ls --help
?--prod
to the list of options available under npm ls --help
?
hmm, i'd expect |
This definitely seems like a bug. The docs explicitly call out:
|
Yes, well I suppose the correct usage is with |
--prod
to the list of options available under npm ls --help
?npm ls --omit=dev
does not omit dev dependencies
This makes `npm ls` use the same logic as other commands (eg `outdated`) when parsing config items that filter the output based on package type. Previously `--development` and `--production` has special semantics when used with `npm ls` that were inconsistent with the rest of the CLI. To achieve the same behavior as these deprecated flags use: - in place of `--development` use `--omit peer --omit prod --omit optional` - in place of `--production` use `--omit dev --omit peer` Fixes #4739
This makes `npm ls` use the same logic as other commands (eg `outdated`) when parsing config items that filter the output based on package type. Previously `--development` and `--production` has special semantics when used with `npm ls` that were inconsistent with the rest of the CLI. To achieve the same behavior as these deprecated flags use: - in place of `--development` use `--omit peer --omit prod --omit optional` - in place of `--production` use `--omit dev --omit peer` Fixes #4739
This makes `npm ls` use the same logic as other commands (eg `outdated`) when parsing config items that filter the output based on package type. Previously `--development` and `--production` has special semantics when used with `npm ls` that were inconsistent with the rest of the CLI. To achieve the same behavior as these deprecated flags use: - in place of `--development` use `--omit peer --omit prod --omit optional` - in place of `--production` use `--omit dev --omit peer` Fixes #4739
Thanks! |
Is there an existing issue for this?
This issue exists in the latest npm version
Current Behavior
npm ls --help
does not show--prod
between the list of options available this command accepts.It forces me google for it to remember it and
--omit dev
still lists both prod and dev dependencies together so this might be the source of a different issueExpected Behavior
Should list
--prod
among the list of optionsSteps To Reproduce
npm ls --help
--prod
is missingEnvironment
The text was updated successfully, but these errors were encountered: