Skip to content

feat(pm): add outdated command - #3229

Draft
elrrrrrrr wants to merge 3 commits into
nextfrom
codex/ut-outdated
Draft

feat(pm): add outdated command#3229
elrrrrrrr wants to merge 3 commits into
nextfrom
codex/ut-outdated

Conversation

@elrrrrrrr

Copy link
Copy Markdown
Contributor

Summary

  • add ut outdated [patterns...] with the ut out alias
  • report lockfile Current, range-compatible Wanted, registry Latest, location, and dependent
  • support direct dependencies across root/workspace selection, npm aliases, catalogs, workspace protocols, and overrides
  • reuse cache-clean package pattern matching, registry manifest caching, and lockfile edge lookup
  • add deterministic local-registry E2E coverage for normal, scoped, alias, override, filtering, and exit-code cases

Behavior

  • exits with status 1 when outdated or missing production dependencies are found
  • exits with status 0 and no output when the result is empty
  • keeps workspace and non-registry dependencies local/skipped instead of querying the registry
  • applies matching Utoo overrides before calculating Wanted

Validation

  • cargo test -p utoo-pm (331 passed, 3 ignored)
  • cargo clippy --all-targets -- -D warnings --no-deps
  • cargo fmt --check
  • focused local-registry outdated E2E
  • Biome and typos checks for changed files
  • git diff --check

Closes #3228

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces a new outdated command to check for outdated direct dependencies by comparing local versions from the lockfile with those available on the registry. The feedback focuses on improving the resilience of the command by gracefully handling missing .utoo.toml files, failed manifest fetches, and version resolution errors instead of failing the entire command. Additionally, a logic issue was identified where packages already at the latest version might be incorrectly reported as outdated.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

Comment thread crates/pm/src/service/outdated.rs Outdated
Comment thread crates/pm/src/service/outdated.rs Outdated
Comment thread crates/pm/src/service/outdated.rs Outdated
Comment on lines +160 to +162
if dependency.current.as_deref() == Some(wanted.as_str()) && wanted == latest {
continue;
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

If the current version of a package is already equal to the latest version available on the registry, it is fully up-to-date and should be skipped. The current check only skips when current == wanted == latest, which incorrectly reports packages as outdated if they are at the latest version but have a different wanted version (e.g., due to an override or manual lockfile modification).

Suggested change
if dependency.current.as_deref() == Some(wanted.as_str()) && wanted == latest {
continue;
}
if dependency.current.as_deref() == Some(latest.as_str()) {
continue;
}

Comment thread crates/pm/src/service/outdated.rs Outdated
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

RFC: add ut outdated for direct dependencies

1 participant