Skip to content

fix(rush): default rush-pnpm query commands to recursive#5822

Merged
iclanton merged 2 commits into
microsoft:mainfrom
kiranmagic7:kiran/rush-pnpm-recursive-query-5035
Jun 7, 2026
Merged

fix(rush): default rush-pnpm query commands to recursive#5822
iclanton merged 2 commits into
microsoft:mainfrom
kiranmagic7:kiran/rush-pnpm-recursive-query-5035

Conversation

@kiranmagic7
Copy link
Copy Markdown
Contributor

Fixes #5035.

What changed

  • Defaults rush-pnpm outdated and rush-pnpm why to pass --recursive when the caller has not already provided -r/--recursive or --global.
  • Adds unit coverage for default insertion, explicit recursive flags, and global outdated checks.
  • Adds a Rush change file for @microsoft/rush.

Why

outdated and why are workspace query commands in Rush repos. Without recursive mode, they can query the wrong importer or no importer; defaulting these two commands to recursive mode matches the workaround discussed in #5035 while preserving explicit caller flags.

Compatibility / risk

This only changes the default flags for rush-pnpm outdated and rush-pnpm why. Explicit recursive flags are preserved, and global outdated checks are left unchanged.

Tests

  • RUSH_ALLOW_UNSUPPORTED_NODEJS=1 node common/scripts/install-run-rush.js build --to @microsoft/rush-lib --verbose - passed
  • git diff HEAD^..HEAD --check - passed
  • RUSH_ALLOW_UNSUPPORTED_NODEJS=1 node common/scripts/install-run-rush.js test --to @microsoft/rush-lib --verbose - the new RushPnpmCommandLineParser.test passed; the full suite failed locally under unsupported Node 25.6.1 due unrelated RushXCommandLine snapshots expecting mocked Node 12.12.12 (LTS) but receiving (unstable).

Co-authored-by: Ian Clanton-Thuon <iclanton@users.noreply.github.com>
@iclanton iclanton enabled auto-merge (squash) June 7, 2026 17:42
@kiranmagic7
Copy link
Copy Markdown
Contributor Author

@microsoft-github-policy-service agree

@iclanton iclanton merged commit d4dcf0a into microsoft:main Jun 7, 2026
6 checks passed
@github-project-automation github-project-automation Bot moved this from Needs triage to Closed in Bug Triage Jun 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Closed

Development

Successfully merging this pull request may close these issues.

[rush] rush-pnpm outdated does not work

2 participants