feat(pm): add remove command for package dependencies#237
Merged
Conversation
This was referenced Oct 20, 2025
Member
Author
This stack of pull requests is managed by Graphite. Learn more about stacking. |
59f8647 to
88d9620
Compare
f8f51e7 to
ead3479
Compare
88d9620 to
4d14157
Compare
This was referenced Oct 22, 2025
Closed
4d14157 to
0da1898
Compare
ead3479 to
1776b0f
Compare
0da1898 to
a082d7d
Compare
1776b0f to
777bd7c
Compare
a082d7d to
80f4466
Compare
20d51ba to
23ad827
Compare
80f4466 to
9c80889
Compare
23ad827 to
320d654
Compare
c7552de to
419e76d
Compare
320d654 to
c6a3c8c
Compare
419e76d to
2d3b5b1
Compare
25352cf to
805bfae
Compare
2d3b5b1 to
6ad482c
Compare
805bfae to
5004b6b
Compare
5412a3b to
e66535f
Compare
5004b6b to
6086205
Compare
e66535f to
693ceed
Compare
6086205 to
cce1331
Compare
693ceed to
cba738c
Compare
cce1331 to
1f4e6a9
Compare
cba738c to
8a0976e
Compare
1f4e6a9 to
e687c62
Compare
8f1cdb9 to
d14b33b
Compare
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR adds a remove command to the Vite CLI for uninstalling package dependencies, providing a unified interface that automatically translates to the appropriate syntax for npm, yarn, and pnpm.
Key changes:
- Implements a
removecommand with support for workspace operations, dependency type filtering, and global packages - Adds comprehensive test coverage for all three package managers (npm, yarn, pnpm) in both standalone and workspace scenarios
- Updates CLI to include the new command with aliases (
rm,un,uninstall)
Reviewed Changes
Copilot reviewed 34 out of 34 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
rfcs/add-remove-package-commands.md |
Updated command mapping table to reflect correct syntax for yarn and npm workspace operations |
packages/cli/binding/src/commands/remove.rs |
New module implementing the RemoveCommand struct with execution logic |
packages/cli/binding/src/cli.rs |
Integrated remove command into CLI with argument parsing and command dispatching |
crates/vite_package_manager/src/remove.rs |
Core implementation translating remove options to package manager-specific commands |
packages/global/snap-tests/* |
Comprehensive snap tests validating remove command behavior across all package managers |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
branchseer
approved these changes
Oct 23, 2025
d14b33b to
89fcdb4
Compare
Member
Author
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

TL;DR
Added a new
removecommand to the package manager to uninstall dependencies with support for npm, yarn, and pnpm.What changed?
remove.rsmodule tovite_package_managercrate that implements package removal functionalityRemoveCommandOptionsstruct to handle various removal options (workspace, recursive, global, etc.)removecommand to the CLI with aliases (rm,un,uninstall)How to test?
You can test the new command with:
Why make this change?
This complements the existing
addcommand, providing a complete package management experience within the Vite CLI. Users can now both add and remove dependencies without having to remember the specific syntax for different package managers. The implementation handles the differences between npm, yarn, and pnpm, making it easier for users to work with monorepos and different dependency types.