Skip to content

fix(release): use Node 22 so npm@latest (v12) install succeeds#304

Merged
garrity-miepub merged 4 commits into
mainfrom
fix/release-node22-npm12
Jul 9, 2026
Merged

fix(release): use Node 22 so npm@latest (v12) install succeeds#304
garrity-miepub merged 4 commits into
mainfrom
fix/release-node22-npm12

Conversation

@garrity-miepub

@garrity-miepub garrity-miepub commented Jul 9, 2026

Copy link
Copy Markdown
Collaborator

Problem

The Release workflow has been failing on every main push 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:

  • The workflow pinned the runner to Node 20.
  • npm@latest is now v12, whose engine requires node ^22.22.2 || ^24.15.0 || >=26.
  • npm install -g npm@latest on Node 20 fails with an engine error, aborting the job before the Publish to npm step.

As a result, @next is stuck at 0.6.1-dev.159 even though #303 (datavis NITRO dark mode) and #299 (clinical components) are merged to main.

Fix

  • Bump the release runner from Node 20 → Node 22 (current LTS; satisfies npm 12's engine and clears the "Node 20 is deprecated" runner warning).
  • Remove the now-unnecessary Upgrade npm / Show npm version after upgrade steps — 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 (MessageListWithTyping a11y smoke test). It's a pre-existing bug (authored 2026-01-21, unrelated to the workflow change): light-mode text-neutral-500 (#737373) on bg-neutral-100 (#f5f5f5) is 4.34:1, below WCAG AA's 4.5:1. The async typing story means axe only sometimes catches it, so main stayed green while this PR flaked.

  • Bump the separator's light-mode text to neutral-600 (~7:1). Dark-mode variant already passed. One-line, deterministic fix.

Scope / risk

  • Workflow change is CI-only; the a11y change is a single Tailwind class on one decorative separator. No src/ logic, dependencies, build config, or package exports change.
  • The published artifact is produced by the same 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 — clean
  • pnpm build — exit 0, dist/index.{js,cjs,d.ts} present
  • npm pack --dry-runmieweb-ui-0.6.1.tgz, 3.0 MB, 756 files (unchanged)
  • eslint on the changed component — clean
  • Workflow YAML validated (no tabs, node-version: '22')

After merge

Merging to main triggers 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 on main will kick it off.

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).
Copilot AI review requested due to automatic review settings July 9, 2026 00:45

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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@latest upgrade step (and its follow-up version print), since it was the failing point.

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Jul 9, 2026

Copy link
Copy Markdown

Deploying ui with  Cloudflare Pages  Cloudflare Pages

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

View logs

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.
Copilot AI review requested due to automatic review settings July 9, 2026 00:57

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

Comment thread .github/workflows/release.yml Outdated
Copilot AI review requested due to automatic review settings July 9, 2026 01:01

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

Comment thread .github/workflows/release.yml Outdated
Copilot AI review requested due to automatic review settings July 9, 2026 01:11

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated no new comments.

@garrity-miepub garrity-miepub merged commit 1b80c47 into main Jul 9, 2026
11 checks passed
@garrity-miepub garrity-miepub deleted the fix/release-node22-npm12 branch July 9, 2026 01:22
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.

2 participants