voidzero-dev / voidzero-dev/vite-plus
Warn for unsupported package manager flags instead of silently ignoring
- Dominant language
- Rust
- Stars
- 5.8k
- Forks
- 262
- Avg merge
- 1d 34m
- Merged PRs (30d)
- 135
Description
### Description
`vp pm` is a package manager compatibility layer, since different underlying package managers can have some small differences. It is common to meet cases that there is a `--abc` flag can be passed to Xpm, but not to Ypm.
The current Vite+'s behavior is not united. It sometimes prints a warning (e.g. `--fix-lockfile`, `--offline`, `--latest`) but it also silently ignores some of them (e.g. `--workspace`, `--save-catalog`), which may make users confused.
### Suggested solution
We are supposed to show warnings for these cases instead of silently ignoring, it can help users or agents know how to use the package manager correctly.
As for the implementation, I think checking and writing all of them by hand can be a little bit troublesome. We'd better to find a way to check them unitedly or use Rust's language feature like macro or `Drop` trait to reduce complex works.
Contributor guide
Research direction
Start at the `vp pm` package-manager compatibility layer and trace how supported and unsupported flags are handled, comparing existing warnings with flags that are silently ignored. Done means unsupported flags consistently produce warnings without changing the behavior of supported flags; the issue does not identify specific files or tests to run.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- cli, tooling
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100