Skip to content

chore: upgrade Node.js from 20 to 22#10051

Merged
ibgreen merged 8 commits intomasterfrom
claude/upgrade-node-22-CtVWP
Mar 22, 2026
Merged

chore: upgrade Node.js from 20 to 22#10051
ibgreen merged 8 commits intomasterfrom
claude/upgrade-node-22-CtVWP

Conversation

@chrisgervang
Copy link
Copy Markdown
Collaborator

@chrisgervang chrisgervang commented Feb 27, 2026

Node.js 20 reaches EOL in April 2026; this moves to Node 22 LTS.

Changes:

  • Bump .nvmrc from 20.19.0 → 22.14.0
  • Replace deprecated page.waitFor() calls (removed in Puppeteer 19) with a setTimeout-based sleep helper in test/node-examples.js
  • Remove manual navigator polyfill from test/node.ts — Node.js 22 provides it natively

Note

Medium Risk
Raising the minimum Node version can break local dev/CI environments and expose incompatibilities in transitive tooling (e.g., puppeteer/jsdom). Code changes are small, but the runtime/toolchain upgrade impacts all builds and tests.

Overview
Updates the repo to require Node.js 22 by bumping .nvmrc and the engines.node constraints in both the root and website package.json, and updating contributor docs accordingly.

Adjusts Node-based tests for compatibility by replacing deprecated Puppeteer page.waitFor() calls with a sleep() helper in test/node-examples.js, and removes the JSDOM navigator global polyfill from test/node.ts.

Written by Cursor Bugbot for commit 0f9378d. This will update automatically on new commits. Configure here.

- .nvmrc: 20.19.0 → 22.14.0
- package.json engines: >=20 → >=22
- website/package.json engines: >=20 → >=22
- CONTRIBUTING.md: update documented requirement

Node 22 is the current LTS release.

https://claude.ai/code/session_016oyFSyGm7hYU1e1KDXqjnW
@chrisgervang chrisgervang changed the title Upgrade Node.js from 20 to 22 chore: upgrade Node.js from 20 to 22 Feb 27, 2026
page.waitFor() was removed in Puppeteer 19. Replace all three call
sites in node-examples.js with a local sleep helper using setTimeout.

https://claude.ai/code/session_016oyFSyGm7hYU1e1KDXqjnW
Copy link
Copy Markdown

@cursor cursor Bot left a comment

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.

Comment thread package.json
claude and others added 3 commits February 27, 2026 08:03
Node.js 22 added navigator as a getter-only Web-compatible global.
Direct assignment throws TypeError. Use Object.defineProperty to
override it with the JSDOM value instead.

https://claude.ai/code/session_016oyFSyGm7hYU1e1KDXqjnW
Node.js 21+ ships navigator as a built-in global. The manual assignment
from JSDOM was originally needed when Node lacked it, and nothing in the
Node test suite actually requires the JSDOM navigator value.

https://claude.ai/code/session_016oyFSyGm7hYU1e1KDXqjnW
@coveralls
Copy link
Copy Markdown

coveralls commented Mar 9, 2026

Coverage Status

coverage: 91.066%. remained the same
when pulling 0b89d30 on claude/upgrade-node-22-CtVWP
into 61e8dde on master.

@ibgreen ibgreen closed this Mar 22, 2026
@ibgreen ibgreen reopened this Mar 22, 2026
@ibgreen ibgreen merged commit e61bc7d into master Mar 22, 2026
5 checks passed
@ibgreen ibgreen deleted the claude/upgrade-node-22-CtVWP branch March 22, 2026 16:09
@chrisgervang chrisgervang added this to the v9.3 milestone Apr 1, 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.

5 participants