mirror of
https://github.com/pnpm/pnpm.git
synced 2025-12-23 23:29:17 -05:00
fix: pnpm add a-module-already-in-dev-deps should show message that it wasn't moved to dependencies (#7319)
close #926
This commit is contained in:
6
.changeset/eleven-kids-exist.md
Normal file
6
.changeset/eleven-kids-exist.md
Normal file
@@ -0,0 +1,6 @@
|
||||
---
|
||||
"@pnpm/default-reporter": patch
|
||||
"pnpm": patch
|
||||
---
|
||||
|
||||
`pnpm add a-module-already-in-dev-deps` will show a message to notice the user that the package was not moved to "dependencies" [#926](https://github.com/pnpm/pnpm/issues/926).
|
||||
@@ -71,6 +71,11 @@ export function reportSummary (
|
||||
msg += EOL
|
||||
msg += _printDiffs(diffs)
|
||||
msg += EOL
|
||||
if (depType === 'dev' && opts.pnpmConfig?.saveDev === false) {
|
||||
msg += EOL
|
||||
msg += `The dependency was already listed in devDependencies.${EOL}If you want to make it a prod dependency, then move it manually.`
|
||||
msg += EOL
|
||||
}
|
||||
} else if (opts.pnpmConfig?.[CONFIG_BY_DEP_TYPE[depType]] === false) {
|
||||
msg += EOL
|
||||
msg += `${chalk.cyanBright(`${propertyByDependencyType[depType] as string}:`)} skipped`
|
||||
|
||||
Reference in New Issue
Block a user