Skip to content

fix(sbom): suppress reporter to prevent warnings from polluting stdout - #10924

Merged
zkochan merged 2 commits into
pnpm:mainfrom
Saturate:fix/sbom-stdout-warnings
Mar 12, 2026
Merged

zkochan merged 2 commits into
pnpm:mainfrom
Saturate:fix/sbom-stdout-warnings

Conversation

@Saturate

@Saturate Saturate commented Mar 9, 2026 •

Copy link
Copy Markdown
Contributor

pnpm sbom always outputs JSON to stdout, but the pnpm log reporter could write warnings (e.g. engine mismatch) before the JSON; breaking parsers and file piping.

This sets useStderr for the sbom command, same as dlx and create already do, so warnings go to stderr and stdout stays clean. Also adds e2e tests for the command.

Fixes #10923
Refs #10592

@Saturate
Saturate requested a review from zkochan as a code owner March 9, 2026 13:59
@welcome

welcome Bot commented Mar 9, 2026

Copy link
Copy Markdown

💖 Thanks for opening this pull request! 💖
Please be patient and we will get back to you as soon as we can.

@Saturate
Saturate force-pushed the fix/sbom-stdout-warnings branch 2 times, most recently from b2fe94e to 18c4492 Compare March 9, 2026 14:13
sbom always outputs JSON to stdout, but the pnpm log reporter could
write warnings (e.g. engine mismatch) to stdout before the JSON,
breaking parsers and piping to files.

Refs: pnpm#10592, pnpm#10923
@Saturate
Saturate force-pushed the fix/sbom-stdout-warnings branch from 18c4492 to cbd1f32 Compare March 9, 2026 14:21
@zkochan
zkochan merged commit 99b07f5 into pnpm:main Mar 12, 2026
10 checks passed
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.

pnpm sbom output might contain logs, breaking the json

2 participants