Skip to content

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

Open
chrisgervang wants to merge 4 commits intomasterfrom
claude/upgrade-node-22-CtVWP
Open

chore: upgrade Node.js from 20 to 22#10051
chrisgervang wants to merge 4 commits intomasterfrom
claude/upgrade-node-22-CtVWP

Conversation

@chrisgervang
Copy link
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
Moderate risk because it raises the minimum runtime/tooling version across the repo, which can break local dev/CI environments still on Node 20. Test code changes are small but touch headless browser timing and Node/JSDOM globals.

Overview
Updates the repo’s required Node version to Node 22 by bumping .nvmrc, engines.node in both root and website/package.json, and the Node requirement noted in CONTRIBUTING.md.

Adjusts Node-based tests for compatibility: replaces deprecated Puppeteer page.waitFor usage with an explicit sleep helper in test/node-examples.js, and removes the JSDOM navigator global assignment in test/node.ts.

Written by Cursor Bugbot for commit 2c1db97. 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

@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.

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
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