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 --dev deprecation message #1575

Conversation

sandratatarevicova
Copy link
Contributor

Summary

When using --dev option with npm install, the command prints this deprecation message:

npm WARN install Usage of the `--dev` option is deprecated. Use `--only=dev` instead.

The --only option was added within npm/npm#9024 and with --only=dev, only devDependencies are installed. This PR also introduced the --also option which can install both dependencies and devDependencies. I have checked that npm install --dev installs both dependencies and devDependencies (see https://github.com/npm/cli/blob/latest/lib/install.js#L233), so I think that the correct message should be:

npm WARN install Usage of the `--dev` option is deprecated. Use `--also=dev` instead.

I have added the deprecation message also to npm ci --dev. If this PR is approved I will add the --also option to npm install documentation.

References

@sandratatarevicova sandratatarevicova requested a review from a team as a code owner July 28, 2020 16:45
Copy link
Collaborator

@ruyadorno ruyadorno left a comment

Choose a reason for hiding this comment

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

awesome finding! 🤩 thank you so much!

@ruyadorno ruyadorno added Release 6.x work is associated with a specific npm 6 release semver:patch semver patch level for changes labels Aug 17, 2020
ruyadorno pushed a commit that referenced this pull request Aug 17, 2020
- also fix: add npm ci --dev deprecation message
- Related to #1539

PR-URL: #1575
Credit: @sandratatarevicova
Close: #1575
Reviewed-by: @ruyadorno
ruyadorno pushed a commit that referenced this pull request Aug 17, 2020
- also fix: add npm ci --dev deprecation message
- Related to #1539

PR-URL: #1575
Credit: @sandratatarevicova
Close: #1575
Reviewed-by: @ruyadorno
@ruyadorno ruyadorno closed this in f5da2b9 Aug 17, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Release 6.x work is associated with a specific npm 6 release semver:patch semver patch level for changes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants