Skip to content

Commit f3c6463

Browse files
sandratatarevicovaruyadorno
authored andcommitted
fix: npm install --dev deprecation message
- also fix: add npm ci --dev deprecation message - Related to #1539 PR-URL: #1575 Credit: @sandratatarevicova Close: #1575 Reviewed-by: @ruyadorno
1 parent e9faa88 commit f3c6463

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

lib/ci.js

+4
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,10 @@ function ci (args, cb) {
3232
dirPacker: pack.packGitDep
3333
}
3434

35+
if (npm.config.get('dev')) {
36+
log.warn('ci', 'Usage of the `--dev` option is deprecated. Use `--also=dev` instead.')
37+
}
38+
3539
for (const key in npm.config.list[0]) {
3640
if (!['log', 'cache'].includes(key)) {
3741
opts[key] = npm.config.list[0][key]

lib/install.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,7 @@ function install (where, args, cb) {
197197
var dryrun = !!npm.config.get('dry-run')
198198

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

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

0 commit comments

Comments
 (0)