Repository navigation
Commit 5df51c4
fix(release): preflight npm auth, and keep the post-publish smoke out of /tmp
Two gaps the 0.24.0 cut walked into, both fixed where the release script already
refuses things.
AUTH IS NOW A PREFLIGHT. `release.mjs` checked the tree, the tag and the target
version, but never that publishing was POSSIBLE. The version bump is committed and
pushed long before the first `bun publish`, so a dead credential strands the release
mid-flight — which is exactly what happened: BOTH npm paths were dead at once (the
local token had been revoked, per RELEASING.md's own advice to revoke after each
release, and the NPM_TOKEN secret was empty), discovered only after PyPI and NuGet had
shipped 0.24.0 irreversibly, leaving the registries out of lockstep pending a human.
`npm whoami` now runs in phase 0. The message names the trap that cost the most time:
a "Publish" token authenticates and reads fine, then returns EOTP on every write, and
`bun publish` falls back to an interactive browser flow that cannot complete
non-interactively. It must be an Automation / bypass-2FA token.
THE SMOKE TEST NO LONGER RUNS UNDER tmpdir(). Node's resolution walks UP from the
scratch dir, so a stale /tmp/node_modules shadows anything the throwaway project does
not hoist itself. The release box held a 0.21.5 install there and it made a real
external smoke report a MISSING export that had in fact shipped correctly. It fails
BOTH ways, and the false green is the dangerous one: a genuinely absent export
resolves against the stale copy and the gate passes. The smoke now runs under
~/.cache and REFUSES to start if any ancestor holds a node_modules, rather than
silently measuring the wrong tree.
Both guards were proved by creating the condition they exist for: `npm whoami` exits
non-zero for a missing token (ENEEDAUTH) and a dead one, and the ancestor walk is
silent on a clean tree and names the directory when one is planted.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DhpswkF1NvwxhFWMmdAT151 parent d46221c commit 5df51c4
1 file changed
Lines changed: 41 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
20 | | - | |
21 | | - | |
22 | | - | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
30 | 42 | | |
31 | 43 | | |
32 | 44 | | |
| |||
51 | 63 | | |
52 | 64 | | |
53 | 65 | | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
54 | 85 | | |
55 | 86 | | |
56 | 87 | | |
| |||
149 | 180 | | |
150 | 181 | | |
151 | 182 | | |
152 | | - | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
153 | 190 | | |
154 | 191 | | |
155 | 192 | | |
| |||
0 commit comments