Skip to content

Commit

Permalink
fix: npm install --dev deprecation message
Browse files Browse the repository at this point in the history
- also fix: add npm ci --dev deprecation message
- Related to #1539

PR-URL: #1575
Credit: @sandratatarevicova
Close: #1575
Reviewed-by: @ruyadorno
  • Loading branch information
sandratatarevicova authored and ruyadorno committed Aug 17, 2020
1 parent 42dcb3e commit f5da2b9
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions lib/ci.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,10 @@ function ci (args, cb) {
dirPacker: pack.packGitDep
}

if (npm.config.get('dev')) {
log.warn('ci', 'Usage of the `--dev` option is deprecated. Use `--also=dev` instead.')
}

for (const key in npm.config.list[0]) {
if (!['log', 'cache'].includes(key)) {
opts[key] = npm.config.list[0][key]
Expand Down
2 changes: 1 addition & 1 deletion lib/install.js
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ function install (where, args, cb) {
var dryrun = !!npm.config.get('dry-run')

if (npm.config.get('dev')) {
log.warn('install', 'Usage of the `--dev` option is deprecated. Use `--only=dev` instead.')
log.warn('install', 'Usage of the `--dev` option is deprecated. Use `--also=dev` instead.')
}

if (where === globalTop && !args.length) {
Expand Down

0 comments on commit f5da2b9

Please sign in to comment.