Skip to content

chore(repo): drop Node.js 18 and 20 from test matrix - #3053

Merged
Patrycja-dz merged 7 commits into
developfrom
chore/drop-node-18-20-ci-matrix-and-fix-test-harness
Aug 28, 2026
Merged

chore(repo): drop Node.js 18 and 20 from test matrix#3053
Patrycja-dz merged 7 commits into
developfrom
chore/drop-node-18-20-ci-matrix-and-fix-test-harness

Conversation

@Patrycja-dz

@Patrycja-dz Patrycja-dz commented Aug 28, 2026

Copy link
Copy Markdown
Contributor

Drops Node.js 18 and 20 from the CI test matrix. The supported matrix is now 22.23.2, 24.18.1, 26.5.1.

Removing Node 18 turned out to require three follow-on changes, because the test harness had been pinned to run only on Node 18:

  • name: Test harness
    if: matrix.node-version == '18.20.8'

Repointing that guard to 22.23.2 ran the harness on Node 22 for the first time, which surfaced two latent problems:

  1. @yao-pkg/pkg@5.11.0 cannot build a Node 22 binary - the packaging step failed with No available node version satisfies 'v22'. Upgraded to 6.22.0.
  2. Node 22 emits DEP0040 (punycode deprecation) at runtime, which Node 18 did not. The harness asserts stderr is empty, so nearly every harness test failed. Added stripDeprecationWarnings in test-harness/src/utils.ts, called from both runtimes before normalizeLineEndings.

The ordering there matters: normalizeLineEndings strips all newlines, so once it runs the warning is fused onto the same line as the real message and can no longer be separated. The helper must run first - noted in a comment above it.

Also fixed a dead conditional: test-windows has no strmatrix.node-version == '18.20.8' guard was never true and the Windows harness had never actually run. The guard is removed and the version passed explicitly.

Checklist

  • Tests added / updated
  • Docs added / updated

Does this PR introduce a breaking change?

  • Yes
  • No

@stoplight/spectral-cli raises its engines.node from ^16.20 || ^18.18 || >= 20.17 to ^22.0 || >= 24.0. Installing the CLI on Node 16, 18, or 20 will now produce an engine warning, or fail outright under engine-strict.

The published standalone binaries also now embed a Nodode 18, which may drop support for older glibc and macOS versions.

Additional context

Two things reviewers should weigh in on, both pre-existing inconsistencies this PR brushes up against rather than introduces:

  • engines was raised only in packages/cli. The other eleven packages and the workspace root still declare ^16.20 || ^18.18 || >= 20.17. Either the rest should be raised in this PR for consistency, or the CLI change should be split into its own release-noted PR.
  • release-docker.yml still passes node-version: '18' to build-binary at seven call sites, and the action's own default is '18'. Whether @yao-pkg/pkg@6.22.0 can still produce node18-* targets is not verified - that workflow only runs on release, so nothing in this PR's CI exercises it. Worth confirming before the next release.

Also included: a yarn.lock dedup merging two duplicate hasown descriptors into one. Both already resolved to the same version, resolution, and checksum, so no dependency moves. Without it, yarn install --immutable failed with YN0028 and all three jobs died atthe Cached dependencies step before any test ran.

Harness locally: 65 passed, 2 failed. Both failures are macOS-only and unrelated — script -qfec uses the GNU-only -f flag, and the other cannot reach unpkg.com through TLS interception.

@Patrycja-dz
Patrycja-dz marked this pull request as ready for review August 28, 2026 05:42
@Patrycja-dz
Patrycja-dz requested a review from a team as a code owner August 28, 2026 05:42
@Patrycja-dz
Patrycja-dz requested a lite review from Copilot August 28, 2026 05:42

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

This PR updates the CI workflow to stop running the commit test jobs on Node.js 18 and 20, leaving a newer set of Node.js versions in the test matrix.

Changes:

  • Removed Node.js 18.20.8 and 20.20.2 from the test-node matrix.
  • Updated the “Test harness” step gating to run on Node.js 22.23.2 instead of 18.20.8.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread .github/workflows/commit.yml
knieczyszczak
knieczyszczak previously approved these changes Aug 28, 2026
kopernic-pl
kopernic-pl previously approved these changes Aug 28, 2026
knieczyszczak
knieczyszczak previously approved these changes Aug 28, 2026
@Patrycja-dz
Patrycja-dz dismissed stale reviews from knieczyszczak and kopernic-pl via 675a066 August 28, 2026 08:32
@Patrycja-dz
Patrycja-dz force-pushed the chore/drop-node-18-20-ci-matrix-and-fix-test-harness branch from 675a066 to 1b77227 Compare August 28, 2026 08:37
@Patrycja-dz
Patrycja-dz merged commit 7767ec1 into develop Aug 28, 2026
9 checks passed
@Patrycja-dz
Patrycja-dz deleted the chore/drop-node-18-20-ci-matrix-and-fix-test-harness branch August 28, 2026 09:52
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.

5 participants