Repository navigation
Commit 330adf0
fix(publish): R1 — 2 Cursor Bugbot High + CodeRabbit Minor on PR #36
Cursor Bugbot caught two genuine blockers that would have made the
first release-after-merge fail at the npm publish step:
1. Node 20 too old for OIDC Trusted Publishing. npm Trusted Publishing
requires npm CLI 11.5.1+ which ships with Node 22.14+. Node 20
bundles npm 10.x with no OIDC publish-auth path — would fail
ENEEDAUTH. Bumped node-version: 20 → 22.
2. setup-node + registry-url writes _authToken=${NODE_AUTH_TOKEN} to
~/.npmrc. With NODE_AUTH_TOKEN unset, the empty auth line tricks
npm into thinking auth is configured, so it SKIPS the OIDC token
exchange. Added a sed step after setup-node that strips the stale
//registry.npmjs.org/:_authToken= line so OIDC activates. Documented
issue: actions/setup-node#1551.
CodeRabbit Minor: AGENTS.md still said publishes use 'a CI-only
NPM_TOKEN secret.' Rewrote that section to reflect the OIDC path +
added a stronger warning against manual laptop publishes (referencing
v0.2.7's unattested-release gap as the canonical example).
Test plan:
- npm test: 32 pass
- First post-merge release will exercise the new path end-to-end
- Post-publish attestation gate in publish.yml (unchanged) will fail
loudly if anything is misconfigured
Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>1 parent 67f80e5 commit 330adf0
2 files changed
Lines changed: 23 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
29 | 34 | | |
30 | 35 | | |
31 | | - | |
| 36 | + | |
32 | 37 | | |
33 | 38 | | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
34 | 54 | | |
35 | 55 | | |
36 | 56 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
36 | 36 | | |
37 | 37 | | |
38 | 38 | | |
39 | | - | |
| 39 | + | |
40 | 40 | | |
41 | | - | |
| 41 | + | |
42 | 42 | | |
43 | 43 | | |
44 | 44 | | |
| |||
0 commit comments