Skip to content

Commit 08a11f1

Browse files
authored
feat(cli): add outdated command for checking package updates (#262)
### TL;DR Added a new `vite outdated` command to check for outdated packages, with support for all package managers (pnpm, npm, yarn). ### What changed? - Added a new `outdated` command to the Vite CLI that checks for outdated packages - Implemented package manager-specific command resolution for pnpm, npm, and yarn - Added support for various output formats (table, list, JSON) - Implemented workspace filtering with `--filter` flag - Added dependency type filtering options (`--prod`, `--dev`, `--no-optional`) - Added support for global package checking with `-g` flag - Implemented special handling for yarn@2+ which uses `upgrade-interactive` - Added appropriate warnings when flags aren't supported by specific package managers ### How to test? ```bash # Basic usage vite outdated # Check specific packages vite outdated react lodash # Output formats vite outdated --format json vite outdated --format list vite outdated --long # Workspace operations vite outdated --filter app vite outdated -r # Dependency type filtering (pnpm-specific) vite outdated --prod vite outdated --dev vite outdated --no-optional # Global packages vite outdated -g ``` ### Why make this change? This command simplifies dependency management by providing a unified interface for checking outdated packages across all package managers. It automatically adapts to the detected package manager (pnpm/npm/yarn) and translates flags appropriately, making it easier for developers to maintain up-to-date dependencies without needing to remember different syntaxes for each package manager.
1 parent d2e67f7 commit 08a11f1

28 files changed

Lines changed: 2752 additions & 17 deletions

File tree

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
pub mod add;
22
pub mod dedupe;
33
mod install;
4+
pub mod outdated;
45
pub mod remove;
56
pub mod update;

0 commit comments

Comments
 (0)