Commit 9656baa
Stefano Verna
Refuse a hand-typed npm publish
This repo's root is the published package, so 'npm publish' typed at the
repo root reaches the registry: it skips the tests, the changelog, the tag
and the GitHub release, and npm takes it whenever the working tree carries a
version the registry has not seen. Today a clean checkout carries the version
already published, so the registry answers 403 - a side effect, not a
decision, and it stops holding the moment somebody bumps by hand.
prepublishOnly now runs 'release-toolchain --assert-release', which passes
only while the release script is the one publishing. 'npm pack' runs prepack
instead, so reading a tarball still works and the pkg-pr-new previews, which
pack rather than publish, are untouched.
Also moves the toolchain pin to v1.2.0. The lockfile is the substantive half
of that: changing the spec alone left the previous SHA resolved, so 'npm ci'
kept installing v1.0.0 while package.json claimed otherwise.
Claude-Session: https://claude.ai/code/session_01XaYAhzmiJwysZeq1XC5xrQ1 parent 5beee92 commit 9656baa
2 files changed
Lines changed: 8 additions & 7 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
26 | | - | |
| 26 | + | |
| 27 | + | |
27 | 28 | | |
28 | 29 | | |
29 | 30 | | |
| |||
55 | 56 | | |
56 | 57 | | |
57 | 58 | | |
58 | | - | |
| 59 | + | |
59 | 60 | | |
60 | 61 | | |
61 | 62 | | |
| |||
0 commit comments