Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 11 additions & 7 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,15 +34,19 @@ jobs:
node-version: '22'
cache: npm

- name: Upgrade npm (required for OIDC trusted publishing)
- name: Activate npm 11 via corepack (required for OIDC trusted publishing)
# OIDC trusted publishing requires npm >= 11.5.1. Node 22 ships with
# npm 10.x, which falls back to traditional auth and fails with
# ENEEDAUTH. We pin to npm@11 (major range) rather than @latest to
# avoid a MODULE_NOT_FOUND bug in the bundled npm's self-upgrade
# path when targeting @latest. If this ever breaks, a corepack-based
# fallback (`corepack prepare npm@latest --activate`) is the next
# option to try.
run: npm install -g npm@11
# ENEEDAUTH. The bundled npm 10.x on the runner is corrupted — any
# `npm install -g npm@*` hits MODULE_NOT_FOUND for promise-retry.
# corepack is a Node built-in (since 16.9) that downloads package
# managers from scratch, bypassing the corrupt bundled npm entirely.
# Pinned to 11.5.1 (first version with OIDC trusted publishing
# support) for deterministic behavior.
run: |
corepack enable
corepack prepare npm@11.5.1 --activate
npm --version

# ── Test gate ─────────────────────────────────────────────────────
# Install, build, and test BEFORE any mutating action (version bump,
Expand Down
20 changes: 20 additions & 0 deletions documentation/PULL_REQUESTS/2026-05-01-fix-release-corepack.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
## Problem

Our release pipeline is currently unable to publish new versions to npm. The step that upgrades the installed `npm` to a version new enough to use our secure authentication method fails with an internal error — not because the target version is wrong, but because the copy of `npm` preinstalled on our build server has corrupted dependencies and cannot install anything, including itself.

This has left `v1.1.0` tagged and released on GitHub but not actually published to npm.

## Solution

Switch to a different mechanism for installing the newer `npm`. Instead of asking the broken `npm` to upgrade itself, use the package-manager manager that ships with Node (built in since 2021) to download the version we need directly from the registry.

This bypasses the corrupt installation entirely and is the approach recommended by the Node team for this exact situation.

## Impact

Once this merges, the release workflow can be re-run in "skip bump" mode to finish publishing the stalled `v1.1.0` to npm.

# Credits

- Nabs (Architect)
- JENA (Lead Developer)
Loading