fix: silence verify-deps auto-install output#11679
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (6)
✅ Files skipped from review due to trivial changes (1)
🚧 Files skipped from review as they are similar to previous changes (5)
📜 Recent review details⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
📝 WalkthroughWalkthroughAdds an optional ChangesReporter threading and tests
Sequence Diagram(s)sequenceDiagram
participant ExecCommand as Exec command
participant DepsCheck as runDepsStatusCheck
participant CliRunner as runPnpmCli
participant PNPM as pnpm process
ExecCommand->>DepsCheck: invoke with opts.reporter
DepsCheck->>CliRunner: start install runner ({ cwd, reporter })
CliRunner->>PNPM: exec cliCommand (includes --reporter=<reporter>)
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
| const execOpts = { | ||
| cwd, | ||
| stdio: 'inherit' as const, | ||
| stdio: silent ? ['inherit', 'ignore', 'inherit'] as const : 'inherit' as const, |
There was a problem hiding this comment.
why is this needed if reporter already set to silent?
|
|
||
| const command = ['install', ...createInstallArgs(workspaceState?.settings)] | ||
| const install = runPnpmCli.bind(null, command, { cwd: opts.dir }) | ||
| const install = runPnpmCli.bind(null, command, { cwd: opts.dir, silent: opts.reporter === 'silent' }) |
There was a problem hiding this comment.
why not passing in the reporter itself?
|
Updated this PR to address the review feedback:
Local verification:
Note: I also attempted the narrow Jest specs directly from |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@exec/pnpm-cli-runner/src/index.ts`:
- Around line 11-14: The current execOpts object hardcodes stdio: 'inherit'
which prevents silent installs; update index.ts to compute stdio from the
runner's reporter parameter instead of always using 'inherit' (e.g., set
execOpts.stdio = reporter === 'silent' ? ['ignore','ignore','inherit'] :
'inherit') so callers can suppress stdout, and ensure runDepsStatusCheck.ts
(which invokes the install) can pass or receive that stdio value when
verifyDepsBeforeRun: install is used; adjust any call sites that construct
execOpts or call the internal install command to use the new computed stdio
logic.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro Plus
Run ID: 16f8bdf0-3a47-4f0b-9d07-96094783bbb4
📒 Files selected for processing (2)
exec/commands/src/runDepsStatusCheck.tsexec/pnpm-cli-runner/src/index.ts
🚧 Files skipped from review as they are similar to previous changes (1)
- exec/commands/src/runDepsStatusCheck.ts
📜 Review details
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
- GitHub Check: Compile & Lint
🧰 Additional context used
📓 Path-based instructions (1)
**/*.{ts,tsx,js,jsx}
📄 CodeRabbit inference engine (AGENTS.md)
**/*.{ts,tsx,js,jsx}: Use Standard Style with modifications: trailing commas are used, functions are preferred over classes, functions are declared after they are used (hoisting is relied upon).
Functions should have no more than two or three arguments. If a function needs more parameters, use a single options object instead.
Maintain import order: (1) Standard libraries, (2) External dependencies (sorted alphabetically), (3) Relative imports.
Files:
exec/pnpm-cli-runner/src/index.ts
🧠 Learnings (1)
📚 Learning: 2026-05-14T09:04:00.133Z
Learnt from: zkochan
Repo: pnpm/pnpm PR: 11622
File: resolving/npm-resolver/test/publishedBy.test.ts:350-354
Timestamp: 2026-05-14T09:04:00.133Z
Learning: In the pnpm/pnpm repository, ESLint is the authoritative style linter. Do not raise review findings for missing trailing commas in multiline function calls (e.g., `fs.writeFileSync(...)`) when this repo’s ESLint configuration does not report them and lint passes. Prefer deferring to the ESLint results for this specific trailing-comma rule rather than enforcing it manually in code review.
Applied to files:
exec/pnpm-cli-runner/src/index.ts
ff725bf to
e5dc81f
Compare
… in new test fixtures origin/main advanced with four PRs touching files this branch also changes: - #11679 (fix: silence verify-deps auto-install output) — TS only, no conflict with pacquet/. - #11705 (feat: tighten minimumReleaseAge) — TS only, no conflict. - #11708 (refactor(pacquet): optional DI pattern + documentation) — renames the test-DI seam (`Api` generic → `Sys`, `RealApi` → `Host`, `FsReadString` → `FsReadToString`, fakes drop `*Api` suffix) across modules-yaml / cmd-shim / config / reporter / package-manager / cli, and adds a "Dependency injection for tests" section to `pacquet/CODE_STYLE_GUIDE.md` plus a corresponding rule 7 in `pacquet/AGENTS.md`. Most files auto-merged cleanly with this branch's single-letter renames; only `pacquet/crates/patching/Cargo.toml` needed a manual resolve where this branch added `[lints] workspace = true` and main added `text-block-macros` to dev-dependencies — combined. - #11710 (test(pacquet): coverage) — adds 44 unit + integration tests. Two of the new closures (`|v|` in `registry/package/tests.rs:84` and `|e|` in `lockfile/save_lockfile/tests.rs:337`) tripped `perfectionist::single_letter_closure_param` because they predate this branch's enablement of the rule; renamed to `|version|` / `|entry|` to keep dylint at zero warnings post-merge. Verified: `cargo check --workspace --tests --locked` clean, `cargo dylint --all -- --all-targets --workspace` clean, `cargo fmt --check` clean.
|
verifyDepsBeforeRun seems now be In my docker setup using pnpm v11 it will try to run a Workaround: I need to set |
Summary
verifyDepsBeforeRun: installauto-install path.pnpm runandpnpm execso auto-install output cannot contaminate stdout.Fixes #11636
Tests
pnpm --filter @pnpm/exec.pnpm-cli-runner run compilepnpm --filter @pnpm/exec.commands run compilepnpm --filter pnpm run compileNODE_OPTIONS="--experimental-vm-modules --disable-warning=ExperimentalWarning --disable-warning=DEP0169" /root/.hermes/node/bin/node "$JEST_BIN" --no-coverage --runInBand test/createInstallArgs.test.tsfromexec/commandsNODE_OPTIONS="--experimental-vm-modules --disable-warning=ExperimentalWarning --disable-warning=DEP0169" /root/.hermes/node/bin/node "$JEST_BIN" --no-coverage --runInBand test/verifyDepsBeforeRun.tsfromexec/commandsNODE_OPTIONS="--experimental-vm-modules --disable-warning=ExperimentalWarning --disable-warning=DEP0169" /root/.hermes/node/bin/node "$JEST_BIN" --no-coverage --runInBand test/run.ts -t 'silent run does not print verifyDepsBeforeRun install output'frompnpmNODE_OPTIONS="--experimental-vm-modules --disable-warning=ExperimentalWarning --disable-warning=DEP0169" /root/.hermes/node/bin/node "$JEST_BIN" --no-coverage --runInBand test/exec.ts -t 'silent exec does not print verifyDepsBeforeRun install output'frompnpmgit diff --cached --checkgit diff --checkNotes
No pacquet change is included: this is in the TypeScript-only
run/execpath, while pacquet currently only implementsinstall.Written by an agent (Hermes Agent, gpt-5.5).
Summary by CodeRabbit
Bug Fixes
--silentnow correctly suppresses auto-install output when dependencies are installed before runningpnpm runorpnpm exec, so only the invoked script’s output appears on stdout.Tests
--silentbehavior for bothrunandexecscenarios with auto-dependency installation.Chores