Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: call installDeps directly in dedupe command handler (#6403)
* refactor: call installDeps directly in dedupe command handler This allows the dedupe command to pass options to the `installDeps` function that aren't available on the pnpm install command line or config interface. This better matches the setup in the `add` and `update` command handlers, which also call `installDeps` directly. The previous setup mimicked the `prune` command. Keeping the dedupe and install commands as similar as possible was the original goal of having the dedupe command reuse the install command handler, but this may not be necessary due to how small the install command handler is. Small logic related to what dependency fields to use was copied over. There should be no expected behavior changes in this commit. The `frozenLockfile` setting was not necessary to copy the `dedupe` option skips all frozen lockfile logic. * break: remove unused dedupe argument on install command handler This becomes unnecessary now that the dedupe command handler no longer calls the install command handler directly.
- Loading branch information
Showing
4 changed files
with
22 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"@pnpm/plugin-commands-installation": patch | ||
--- | ||
|
||
Internal refactor to call installDeps directly in the pnpm dedupe command handler. No behavior changes are expected with this refactor. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"@pnpm/plugin-commands-installation": major | ||
--- | ||
|
||
Remove the `dedupe` option from `InstallCommandOptions`. This was not intentionally part of the public install command's API when it was added. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters