Repository navigation
Commit 05953a0
fix(npm): Show publish stderr at info level (#877)
## Summary
npm sends publish notices and warnings to stderr. Craft currently logs
that stream only at Trace, so normal Info-level publish runs hide those
diagnostics even when npm exits successfully.
- Add an opt-in `showStderr` option to `spawnProcess`, matching the
existing `showStdout` behavior.
- Enable it for the npm target's token and OIDC publish paths (including
the existing Yarn fallback).
- Keep other subprocesses trace-only by default. Do not change stdout
return values, exit-code handling, auth, or publish commands.
- Extend the subprocess tests for default logging, visible stderr on
success/failure, and the npm target tests for both auth paths.
This exposes future publish output. It cannot recover stderr from
earlier runs and does not retry or verify a registry publish. The
publishing image must pick up this change after merge/release before it
affects runs.
## Validation
- Frozen pnpm install, 54 focused tests, typecheck, formatting, and diff
checks pass.
- Lint passes with seven existing warnings outside these files.
- Local build and CLI version smoke test pass. The first `pnpm build`
exited 0 but its optional Sentry upload reported HTTP 413; rebuilding
with `env -u SENTRY_AUTH_TOKEN pnpm build` succeeded without the upload.
- `env -u SENTRY_AUTH_TOKEN pnpm test` exits 1: 1,200 passed, three
failed, one skipped. The three `prepare-dry-run.e2e.test.ts` failures
report `Git author was not set to the Junior identity` because the
fixtures set `Test User`. Two also encounter GitHub's unresolved
`test-owner/test-repo` fixture. A snapshot becomes obsolete because the
failing test never reaches its assertion. No runtime identity guards or
fixture behavior were changed.
<!-- junior-request-attribution:start -->
via **David Cramer**.
<!-- junior-request-attribution:end -->
<!-- junior-session-footer:start -->
<!-- junior-conversation-id:slack%3AC0B595QDZLL%3A1790001522.417909 -->
--
[View Junior
Session](https://junior-prod.sentry.dev/conversations/slack%3AC0B595QDZLL%3A1790001522.417909)
[[Sentry]](https://sentry.sentry.io/explore/conversations/slack%3AC0B595QDZLL%3A1790001522.417909/?project=4510944073809921)
<!-- junior-session-footer:end -->
Co-authored-by: sentry-junior[bot] <264270552+sentry-junior[bot]@users.noreply.github.com>
Co-authored-by: David Cramer <david@sentry.io>1 parent c17a278 commit 05953a0
4 files changed
Lines changed: 83 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
518 | 518 | | |
519 | 519 | | |
520 | 520 | | |
| 521 | + | |
| 522 | + | |
| 523 | + | |
| 524 | + | |
| 525 | + | |
| 526 | + | |
| 527 | + | |
| 528 | + | |
| 529 | + | |
| 530 | + | |
| 531 | + | |
| 532 | + | |
| 533 | + | |
| 534 | + | |
| 535 | + | |
| 536 | + | |
| 537 | + | |
| 538 | + | |
| 539 | + | |
| 540 | + | |
| 541 | + | |
| 542 | + | |
| 543 | + | |
| 544 | + | |
| 545 | + | |
| 546 | + | |
| 547 | + | |
| 548 | + | |
| 549 | + | |
| 550 | + | |
| 551 | + | |
| 552 | + | |
| 553 | + | |
521 | 554 | | |
522 | 555 | | |
523 | 556 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
848 | 848 | | |
849 | 849 | | |
850 | 850 | | |
851 | | - | |
| 851 | + | |
| 852 | + | |
| 853 | + | |
| 854 | + | |
852 | 855 | | |
853 | 856 | | |
854 | 857 | | |
| |||
869 | 872 | | |
870 | 873 | | |
871 | 874 | | |
| 875 | + | |
872 | 876 | | |
873 | 877 | | |
874 | 878 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
78 | 78 | | |
79 | 79 | | |
80 | 80 | | |
81 | | - | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
82 | 85 | | |
83 | 86 | | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
84 | 90 | | |
85 | 91 | | |
86 | 92 | | |
| |||
97 | 103 | | |
98 | 104 | | |
99 | 105 | | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
100 | 137 | | |
101 | 138 | | |
102 | 139 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
106 | 106 | | |
107 | 107 | | |
108 | 108 | | |
| 109 | + | |
| 110 | + | |
109 | 111 | | |
110 | 112 | | |
111 | 113 | | |
| |||
210 | 212 | | |
211 | 213 | | |
212 | 214 | | |
213 | | - | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
214 | 220 | | |
215 | 221 | | |
216 | 222 | | |
| |||
0 commit comments