Commit 3898396
fix(publish-npm): verify version landed on registry to catch silent failures
The publish-npm block currently trusts the publisher CLI's exit code, but
`bunx clean-publish` (and `bunx`-wrapped commands generally) can swallow
`npm publish`'s non-zero exit. The OIDC branch additionally catches its
own publish failures to fall through to the token path. Together, these
mean a job can finish green with nothing on npm — which is exactly what
happened to spectrum-ts 1.10.0..1.11.1 (four silent-fail releases under
an expired NPM_TOKEN).
Add a final assertion that probes registry.npmjs.org for the just-
published <name>@<version> (resolved from package.json, the source of
truth both publish paths consume). Six retries spaced 5s apart absorb
npm CDN propagation. Runs only on real publishes (not --dry-run). On
failure, prints the most likely root causes — token revoked, scope
narrowed, OIDC misconfigured, or publisher CLI swallowed an error — so
operators don't have to re-derive the diagnosis each time.
Co-authored-by: Cursor <cursoragent@cursor.com>1 parent 15ee35b commit 3898396
1 file changed
Lines changed: 49 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
122 | 122 | | |
123 | 123 | | |
124 | 124 | | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
0 commit comments