Skip to content

Reusable remark workflow: bump Node from 20 to 24#41

Merged
jrfnl merged 1 commit into
PHPCSStandards:mainfrom
rodrigoprimo:reusable-remark-bump-node-22
Jun 18, 2026
Merged

Reusable remark workflow: bump Node from 20 to 24#41
jrfnl merged 1 commit into
PHPCSStandards:mainfrom
rodrigoprimo:reusable-remark-bump-node-22

Conversation

@rodrigoprimo

@rodrigoprimo rodrigoprimo commented Jun 17, 2026

Copy link
Copy Markdown
Contributor

Description

The QA Markdown job has been failing across the org with the following error:

TypeError: webidl.util.markAsUncloneable is not a function

dead-or-alive@1.0.5, pulled in transitively via remark-lint-no-dead-urls, bumped undici to ^8. undici@8 calls markAsUncloneable, a Node API only available from Node 22.10.0, while the workflow uses Node 20.

This PR bumps node-version to "24", which fixes the failure and also moves CI off Node 20 (end of life).

Fixes the failing QA Markdown check on open PRs across the org. Examples: PHPCSStandards/PHPCSExtra#439 and PHPCSStandards/PHP_CodeSniffer#1438.

How this was tested

I tested this change using act on my machine with the following temporary workflow file:

name: Node version test
on: [workflow_dispatch]
jobs:
  call:
    uses: ./.github/workflows/reusable-remark.yml
gh act workflow_dispatch -W .github/workflows/node_version_test.yml

On main the job crashes with the markAsUncloneable error. On this branch it loads .remarkrc and lints successfully.

@jrfnl

jrfnl commented Jun 17, 2026

Copy link
Copy Markdown
Member

Thanks @rodrigoprimo ! One question: why Node 22 ? What I mean by that is: why not bump to Node 24 while we're at it ? Is there anything which would currently block that ?

`dead-or-alive@1.0.5` (2026-06-03), pulled in transitively via
`remark-lint-no-dead-urls`, bumped `undici` to `^8`. `undici@8` calls
`markAsUncloneable`, a Node API only available from Node 22.10.0, so on
Node 20 it fails with `TypeError: webidl.util.markAsUncloneable is not a
function`, which has broken the `QA Markdown` job across the org since
2026-06-05.
@rodrigoprimo rodrigoprimo force-pushed the reusable-remark-bump-node-22 branch from d6a2ffc to 3935999 Compare June 18, 2026 10:49
@rodrigoprimo rodrigoprimo changed the title Reusable remark workflow: bump Node from 20 to 22 Reusable remark workflow: bump Node from 20 to 24 Jun 18, 2026
@rodrigoprimo

Copy link
Copy Markdown
Contributor Author

Good question! I think what happened is that I saw [markAsUnclonable](https://nodejs.org/api/worker_threads.html#worker_threadsmarkasuncloneableobject) was added in Node 22 and bumped to this version without considering newer versions.

I can confirm that everything works with Node 24. I force pushed the original commit and updated the description and title. This PR now suggests updating to Node 24.

@jrfnl jrfnl left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks for the update @rodrigoprimo ! All good from me.

@jrfnl jrfnl merged commit 3d3e6ae into PHPCSStandards:main Jun 18, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants