Skip to content

ci(npm-release): pin npm upgrade to 11.x, not @latest - #16

Merged
spacedevin merged 1 commit into
mainfrom
fix/npm-release-sigstore-npm12
Jul 9, 2026
Merged

ci(npm-release): pin npm upgrade to 11.x, not @latest#16
spacedevin merged 1 commit into
mainfrom
fix/npm-release-sigstore-npm12

Conversation

@spacedevin

Copy link
Copy Markdown
Member

Summary

Fixes the failing "Publish to npm" job in the v4.0.1 release runnpm publish crashed with:

npm error code MODULE_NOT_FOUND
npm error Cannot find module 'sigstore'

Not a lattish code change. This is the exact same bug already diagnosed and fixed in tishlang/tish's own release workflow (tishlang/tish#480): npm install -g npm@latest now resolves to npm 12.0.0, which is independently broken for publishing — its own package.json lists sigstore in bundleDependencies, but the published tarball doesn't actually contain it. libnpmpublish's publish path requires it unconditionally at module load, so every npm publish crashes — regardless of Node version, and regardless of NPM_CONFIG_PROVENANCE (already false in this workflow).

Fix

Same fix as tishlang/tish#480: bump the runner to Node 24 (more headroom against future engine-floor bumps) but hold npm at 11.x instead of floating to @latest/12.x — 11.18.0 has sigstore bundled correctly, publishes cleanly, and still satisfies this workflow's own >=11.5.1 OIDC trusted-publishing requirement.

Verify

  • YAML validated.
  • The Node 24 + npm@^11 combination was already validated locally end-to-end (real npm publish --dry-run against a throwaway package, provenance off) while fixing ci(npm-release): pin npm upgrade to 11.x, not @latest tish#480 — identical npm version resolution applies here.
  • Once merged, the v4.0.1 release needs release: edited to re-trigger (this workflow's on: includes edited).

The v4.0.1 release run failed identically to tishlang/tish's
v2.36.1 npm-release run: `npm install -g npm@latest` now resolves
to npm 12.0.0, which is independently broken for publishing — its
package.json lists `sigstore` in bundleDependencies but the
published tarball omits it, and libnpmpublish's publish path
requires it unconditionally at module load (even with
NPM_CONFIG_PROVENANCE=false, already set here) — every `npm
publish` crashes with `Cannot find module 'sigstore'`.

Bump the runner to Node 24 (more headroom against future
engine-floor bumps) but hold npm at 11.x, matching the fix already
applied and locally validated in tishlang/tish (see
tishlang/tish#480).
@codacy-production

Copy link
Copy Markdown

Up to standards ✅

🟢 Issues 0 issues

Results:
0 new issues

View in Codacy

NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.

@spacedevin
spacedevin merged commit 73564a7 into main Jul 9, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant