fix(release): use Node 22 so npm@latest (v12) install succeeds#304
Merged
Conversation
The Release workflow failed on runs 160/161 at the 'Upgrade npm' step: npm@latest is now v12, which requires Node >=22 and refuses to install on the pinned Node 20 runner, aborting before the publish step. Bump the runner to Node 22 (LTS, satisfies npm 12's engine and clears the Node 20 deprecation warning) and drop the now-unnecessary manual npm upgrade steps (Node 22's bundled npm already supports --provenance OIDC).
Contributor
There was a problem hiding this comment.
Pull request overview
Updates the Release GitHub Actions workflow to avoid failures caused by upgrading to npm@latest after npm v12’s Node engine requirement dropped Node 20 support, ensuring main pushes can publish the @next dev prerelease again.
Changes:
- Bump the release job’s Node version from 20 to 22 via
actions/setup-node@v4. - Remove the
npm install -g npm@latestupgrade step (and its follow-up version print), since it was the failing point.
Deploying ui with
|
| Latest commit: |
6aed9bd
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://c99f12ae.ui-6d0.pages.dev |
| Branch Preview URL: | https://fix-release-node22-npm12.ui-6d0.pages.dev |
DateSeparator used text-neutral-500 (#737373) on bg-neutral-100 (#f5f5f5), a 4.34:1 ratio that fails WCAG AA (4.5:1) and intermittently failed the MessageListWithTyping a11y smoke test. Bump light-mode text to neutral-600 (~7:1); dark-mode variant already passes.
This was referenced Jul 9, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
The Release workflow has been failing on every
mainpush since npm 12 shipped. Runs #160 (PR #303 merge) and #161 (PR #299 merge) both failed at the "Upgrade npm" step and therefore never published the dev prerelease to@next.Root cause:
npm@latestis now v12, whose engine requiresnode ^22.22.2 || ^24.15.0 || >=26.npm install -g npm@lateston Node 20 fails with an engine error, aborting the job before thePublish to npmstep.As a result,
@nextis stuck at0.6.1-dev.159even though #303 (datavis NITRO dark mode) and #299 (clinical components) are merged tomain.Fix
Upgrade npm/Show npm version after upgradesteps — Node 22's bundled npm already supports--provenance(OIDC Trusted Publishing).Additional fix (a11y) — commit 2
CI on this PR surfaced an intermittent color-contrast failure in the Messaging
DateSeparator(MessageListWithTypinga11y smoke test). It's a pre-existing bug (authored 2026-01-21, unrelated to the workflow change): light-modetext-neutral-500(#737373) onbg-neutral-100(#f5f5f5) is 4.34:1, below WCAG AA's 4.5:1. The async typing story means axe only sometimes catches it, somainstayed green while this PR flaked.neutral-600(~7:1). Dark-mode variant already passed. One-line, deterministic fix.Scope / risk
src/logic, dependencies, build config, or package exports change.pnpm build, so the tarball consumers download is unchanged. Cannot regress any app consuming@mieweb/ui.Verification
Ran the release job's build/verify steps locally:
pnpm typecheck— cleanpnpm build— exit 0,dist/index.{js,cjs,d.ts}presentnpm pack --dry-run—mieweb-ui-0.6.1.tgz, 3.0 MB, 756 files (unchanged)eslinton the changed component — cleannode-version: '22')After merge
Merging to
maintriggers the Release workflow, which should publish the next dev prerelease (0.6.1-dev.162+) to@next. If the run doesn't fire (path-filter negation for.github/**can be flaky), an empty commit onmainwill kick it off.