feat(cli): add package manager utility commands#280
Conversation
This stack of pull requests is managed by Graphite. Learn more about stacking. |
9cedb9c to
7bc67f9
Compare
7bc67f9 to
b2a7e69
Compare
b2a7e69 to
cff898a
Compare
af8244b to
d3abd34
Compare
f4aae74 to
e3f5c66
Compare
d3abd34 to
bc8bf05
Compare
a9fa64e to
923d5fb
Compare
923d5fb to
cc95199
Compare
bc8bf05 to
a030058
Compare
cc95199 to
f1a0a92
Compare
f1a0a92 to
fa7f229
Compare
There was a problem hiding this comment.
Pull Request Overview
This PR introduces a vite pm command group that provides unified access to package manager utilities (like cache management, package publishing, configuration, etc.) across different package managers (pnpm, npm, yarn). The implementation includes:
- An RFC document detailing the design and implementation
- Test utility updates to handle new output patterns from package manager commands
- Comprehensive snapshot tests for various
pmsubcommands across different package managers
Reviewed Changes
Copilot reviewed 176 out of 176 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| rfcs/pm-command-group.md | Complete RFC documenting the new vite pm command group with detailed subcommand mappings and examples |
| packages/tools/src/utils.ts | Enhanced test utilities to normalize variable output (sizes, hashes, registry URLs, speeds) in snapshot tests |
| packages/tools/src/tests/utils.spec.ts | Added tests for new output normalization patterns |
| packages/tools/src/tests/snapshots/utils.spec.ts.snap | Snapshot expectations for utility test cases |
| packages/global/snap-tests/command-/ | Extensive snapshot test files for pm subcommands (view, publish, prune, pack, list, owner, config, cache) across pnpm10, npm10, yarn1, and yarn4 |
| packages/global/snap-tests/command--with-workspace/ | Workspace-specific snapshot tests for pm commands |
| packages/global/snap-tests/command-why-/ | Updated snapshots removing "Running:" debug output lines |
| packages/global/snap-tests/command-update-/ | Updated snapshots removing "Running:" debug output lines |
| packages/global/snap-tests/command-/ | Multiple other command snapshot updates removing "Running:" output |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
fa7f229 to
5514ec2
Compare
c91191b to
3cc727b
Compare
c1cf227 to
5316503
Compare
There was a problem hiding this comment.
Pull Request Overview
Copilot reviewed 176 out of 176 changed files in this pull request and generated no new comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
5316503 to
ed04c6c
Compare
ed04c6c to
27599d8
Compare
290f4ac to
08631e2
Compare
27599d8 to
3fda230
Compare
There was a problem hiding this comment.
Pull Request Overview
Copilot reviewed 176 out of 176 changed files in this pull request and generated no new comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
@branchseer It also ran on Windows, you can take a look |
f24c99a to
d539372
Compare
There was a problem hiding this comment.
Pull Request Overview
Copilot reviewed 134 out of 134 changed files in this pull request and generated no new comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Brooooooklyn
left a comment
There was a problem hiding this comment.
Let's combine it and improve it as we move forward.

TL;DR
Added a new
vite pmcommand group that provides unified access to package manager utilities across pnpm, npm, and yarn.What changed?
vite pmcommand group with several subcommands:prune: Remove unnecessary packagespack: Create a tarball of the packagelist/ls: List installed packagesview: View package information from registrypublish: Publish package to registryowner: Manage package ownerscache: Manage package cacheconfig: Manage package manager configurationHow to test?
Test the new commands with different package managers:
Why make this change?
This change provides a unified interface to package manager utilities, which: