Skip to content

ci(node): default every shared workflow to Node 22 - #450

Merged
rubenvdlinde merged 1 commit into
mainfrom
ci/node-22
Aug 14, 2026
Merged

ci(node): default every shared workflow to Node 22#450
rubenvdlinde merged 1 commit into
mainfrom
ci/node-22

Conversation

@rubenvdlinde

Copy link
Copy Markdown
Contributor

Bumps the node-version input default from "20" to "22" in quality.yml, release.yml and documentation.yml.

Why

@nextcloud/eslint-config@9 cannot run on Node 20: it declares engines.node: ^22.14 || ^24 || >=26 and imports findPackageJSON from node:module, an API that first exists in 22.14. On Node 20.20.2 the eslint job dies before linting a single file:

SyntaxError: The requested module 'node:module' does not provide an export named 'findPackageJSON'

npm reports the mismatch only as an EBADENGINE warning it then continues past, so the crash is the only signal.

Verified at the runner's own layer first

On larpingapp (ConductionNL/larpingapp#325, the first app migrated):

result
node:20-alpine npx eslint src the identical SyntaxError
node:22-alpine npx eslint src exit 0

Risk

Apps still on eslint 8 run fine on Node 22 — nothing pins Node 20 except engines fields, which npm only warns about. node-version stays an input, so any app that must remain behind can say so explicitly. Node 22 is also what Nextcloud's own apps target, so this keeps the fleet matching the upstream toolchain rather than moving ahead of it.

`@nextcloud/eslint-config@9` cannot run on Node 20. It declares
`engines.node: ^22.14 || ^24 || >=26` and its
`dist/plugins/nextcloud/utils/lib-version-parser.js` imports
`findPackageJSON` from `node:module`, an API that first exists in 22.14.
On Node 20.20.2 the eslint job dies before linting a single file:

  SyntaxError: The requested module 'node:module' does not provide an
  export named 'findPackageJSON'

npm reports the mismatch only as an `EBADENGINE` warning that it then
continues past, so the crash is the only signal an app gets.

Verified at the runner's own layer before changing the default:
`node:20-alpine npx eslint src` reproduces the identical SyntaxError and
`node:22-alpine` exits 0, on larpingapp (the first app migrated —
ConductionNL/larpingapp#325).

quality.yml, release.yml and documentation.yml move together: an app whose
devDependencies require Node 22 to lint must build its release artefact and
its docs on the same major.

Node 22 is what Nextcloud's own apps target, so this keeps the fleet
matching the upstream toolchain rather than moving ahead of it. Apps still
on eslint 8 run fine on 22 — nothing pins Node 20 except `engines` fields,
which npm only warns about — and `node-version` remains an input, so any
app that needs to stay behind can still say so explicitly.
@rubenvdlinde
rubenvdlinde merged commit 8fe71f4 into main Aug 14, 2026
35 checks passed
This was referenced Aug 14, 2026
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.

1 participant