Repository navigation
Conversation
pnpm collects warnings raised while reading config and prints them with console.warn — to stderr, outside the reporter — while pacquet routed its one config-load warning (the ignored `pnpm` field of package.json) through LogEvent::Global into the default reporter's stdout frame. A script capturing stdout got the warning mixed into the command's own output. Add a config-warning channel (cli_args::config_warnings) that writes a [WARN]-labelled line straight to stderr, and emit the ignored-field warning through it. Reporter-emitted warnings stay on stdout, where the two stacks already agree; the $-override deprecation warning keeps its reporter routing because pnpm emits it through globalWarn, not the config-warnings array. Future config-load warnings inherit the stderr routing by going through the same channel. Closes #13361 Co-Authored-By: Claude Fable 5 <[email protected]>
miette wraps the failure report at the terminal width, and the wrap point depends on the temp-dir path the message names. With a long-enough TMPDIR the asserted phrase gets split across lines and the verbatim substring match fails. Co-Authored-By: Claude Fable 5 <[email protected]>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughWalkthroughAdds a dedicated stderr channel for configuration-load warnings, routes legacy ChangesConfig warning stderr routing
Estimated code review effort: 2 (Simple) | ~10 minutes Assessment against linked issues
Possibly related PRs
Suggested labels: Suggested reviewers: ✨ Finishing Touches📝 Generate docstrings
🧪 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 |
PR Summary by QodoFix pacquet CLI config-load warnings to print on stderr
AI Description
Diagram
High-Level Assessment
Files changed (8)
|
Confidence Score: 5/5The PR appears safe to merge. The previously reported stderr-failure path is fixed because the warning now uses Reviews (2): Last reviewed commit: "fix(cli): discard a failed config-warnin..." | Re-trigger Greptile |
Micro-Benchmark ResultsLinux |
Code Review by Qodo
Context used✅ Compliance rules (platform):
24 rules 1. Unrelated test refactor in custom_resolvers
|
PR Code Suggestions ✨Warning
No code suggestions found for the PR. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #13416 +/- ##
=======================================
Coverage 87.58% 87.58%
=======================================
Files 544 545 +1
Lines 93561 93567 +6
=======================================
+ Hits 81941 81949 +8
+ Misses 11620 11618 -2 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
eprintln! panics when the write fails (a closed stderr, a consumer that exited early), which would abort an otherwise-successful command over a nonessential warning. The reporter sinks discard their write errors; the config-warning channel now does the same. Co-Authored-By: Claude Fable 5 <[email protected]>
|
Addressing the Qodo review findings:
Written by an agent (Claude Code, claude-fable-5). |
|
Code review by qodo was updated up to the latest commit 0ab4aab |
PR Code Suggestions ✨Warning
No code suggestions found for the PR. |
Summary
Closes #13361.
pnpm 11 prints config-load warnings to stderr (
getConfigcollects them while reading config and prints them withconsole.warn), while pacquet routed its one config-load warning — the "install settings left underpackage.json'spnpmfield" warning from #13359 — throughLogEvent::Globalinto the default reporter's stdout frame. A script capturing stdout got the warning mixed into the command's own output.This PR gives pacquet a config-warning channel (
cli_args::config_warnings::emit_config_warning) that writes a[WARN]-labelled line straight to stderr, outside the reporter, and emits the ignored-field warning through it:console.warnin the TypeScript CLI'sgetConfig.formatWarn's use of chalk's default, stdout-probing instance.workspaces-field warning) inherit the stderr routing by going through the same channel, which is why the fix lands in a channel rather than at the single call site.Warnings emitted through the reporter stay on stdout, where the two stacks already agree — in particular the
$-override deprecation warning keeps its reporter routing, because pnpm emits it throughglobalWarn, not the config-warnings array.This is a pacquet-only fix: the TypeScript CLI already prints config-load warnings to stderr, so no parity work is needed on that side.
Verified against the issue's repro:
pnpm install --lockfile-only 2>/dev/nullnow prints nothing (warning went to stderr), matching pnpm 11.Squash Commit Body
Checklist
pnpm/port, or the description notes what still needs porting.(pacquet-only fix — the TypeScript CLI already prints config-load
warnings to stderr.)
pnpm changeset) if this PR changes any publishedpackage. Keep it short and written for pnpm users — it becomes a release note.
Written by an agent (Claude Code, claude-fable-5).
Need help on this PR? Tag
@codesmith-botwith what you need. Autofix is disabled.Summary by CodeRabbit
Bug Fixes
pnpmsettings) are now printed to stderr instead of stdout.[WARN]label and remain readable even when output wraps by terminal width.Tests