[Bug] deprecated package create unnecessary git diff in lock file
Verify latest release
- [x] I verified that the issue exists in the latest pnpm release
pnpm version
10.8.0
Which area(s) of pnpm are affected? (leave empty if unsure)
Lockfile
Link to the code that reproduces this issue or a replay of the bug
No response
Reproduction steps
Install some deprecated packages in the project.
Run: pnpm install / pnpm update / pnpm dedupe
Describe the Bug
If some deprecated packages are installed:
Running pnpm update will add deprecated messages in the lock file if they are missing.
Running pnpm dedupe will remove some deprecated messages in the lock file for unknown reasons.
Running pnpm install will not change the lock file, even though deprecated messages are missing.
The differences in these behaviors have led to useless git diffs, causing unnecessary burdens on the review process.
Expected Behavior
Treat deprecated message the same way, when install, dedupe, or update.
Which Node.js version are you using?
22.10.0
Which operating systems have you used?
- [ ] macOS
- [x] Windows
- [ ] Linux
If your OS is a Linux based, which one it is? (Include the version if relevant)
No response
Just noting this also potentially breaks git hooks / CI checks that dedupe was properly run since it will result in a diff when the deprecated notice is erroneously removed!