Skip to content

chore: require Node 22, test on 22 and 24 - #19

Merged
gorandodig merged 2 commits into
mainfrom
chore/require-node-22
Aug 28, 2026
Merged

chore: require Node 22, test on 22 and 24#19
gorandodig merged 2 commits into
mainfrom
chore/require-node-22

Conversation

@gorandodig

Copy link
Copy Markdown
Member

Node 18 and 20 are both past end of life (2025-04-30 and 2026-04-30). The test
matrix was exercising two unsupported runtimes and engines advertised them.

  • Matrix moves to 22 and 24; engines becomes >=22, matching what is tested.
  • The publish job moves to 24. npm 12 requires
    ^22.22.2 || ^24.15.0 || >=26.0.0, and 24 is LTS until 2028-04-30, so
    npm@latest keeps resolving there for longer than the 22 line allows.
  • The pre-publish test gate runs on 22, the declared floor, so a 24-only API
    fails before anything is published.
  • @types/node stays on ^22 deliberately: types should describe the floor,
    not the newest runtime, or 24-only APIs type-check and then break for
    consumers on 22.

This changes the required status check names on main. They are generated
from the matrix, so Test (node 18) and Test (node 20) will never report
again. Update branch protection to require Test (node 22) and
Test (node 24) in the same window, or pull requests will sit unmergeable.

Raising the engines floor drops support for Node 18 and 20 consumers.

@gorandodig
gorandodig requested a review from zanjonke August 25, 2026 07:07

@zanjonke zanjonke left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

A great change. Left a minor comment.

Comment thread .github/workflows/publish.yml Outdated
- uses: actions/setup-node@v4
with:
node-version: 20
node-version: 22 # the engines floor

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I think it would be better to use the same node version for both test and publish jobs. WDYT?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Agreed, both are 24 now, in 8c003d9.

Copy link
Copy Markdown
Member Author

Addressed, take a peak.

@gorandodig
gorandodig requested a review from zanjonke August 25, 2026 15:01

@zanjonke zanjonke left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

🚀

Node 18 and 20 are both past end of life (2025-04-30 and 2026-04-30), so the
matrix was exercising two unsupported runtimes and engines advertised them.

The publish job moves to 24: npm 12 requires ^22.22.2 || ^24.15.0 || >=26.0.0,
and 24 is LTS until 2028-04-30, so npm@latest keeps resolving there for longer
than the 22 line allows. The pre-publish test gate runs on 22 instead, the
declared floor, so a 24-only API fails before anything is published.

@types/node stays on ^22 deliberately: types should describe the floor, not the
newest runtime, or 24-only APIs type-check and then break for consumers on 22.

Raising the engines floor drops support for Node 18 and 20 consumers. The
matrix rename also changes the required status check names on main.
The gate ran on 22 to cover the engines floor, but ci.yml already tests the
whole supported matrix on every pull request. Matching the publish runtime makes
the gate test what actually ships.
@gorandodig
gorandodig force-pushed the chore/require-node-22 branch from 8c003d9 to 0a5e52b Compare August 28, 2026 15:35
@gorandodig
gorandodig merged commit 55f13d7 into main Aug 28, 2026
3 checks passed
@gorandodig
gorandodig deleted the chore/require-node-22 branch August 28, 2026 15:49
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