Skip to content

Bump node to v24#6704

Merged
PavelVanecek merged 5 commits into
mainfrom
node24
Dec 1, 2025
Merged

Bump node to v24#6704
PavelVanecek merged 5 commits into
mainfrom
node24

Conversation

@PavelVanecek

@PavelVanecek PavelVanecek commented Nov 28, 2025

Copy link
Copy Markdown
Collaborator

Description

Storybook v10 requires node22+, and node 24+ also allows running typescript directly without a compilation step which is nice and makes our lives easier so let's bump up to 24.

Summary by CodeRabbit

  • Chores

    • Upgraded Node.js target from 20 to 24 across CI, deployment, publishing, and automation workflows.
    • Updated dev dependency types to align with Node.js 24 and added an environment file specifying Node 24.
    • No changes to runtime engine requirement (engines.node remains unchanged) or application-facing APIs.
  • Documentation

    • Updated Copilot setup guidance to require Node.js 24+.

✏️ Tip: You can customize this high-level summary in your review settings.

@coderabbitai

coderabbitai Bot commented Nov 28, 2025

Copy link
Copy Markdown
Contributor

Walkthrough

Node.js version references updated from 20 to 24 across CI/CD workflows and Copilot docs; @types/node devDependency bumped to 24.x; a new .nvmrc file with "24" was added. engines.node in package.json remains unchanged (>=18).

Changes

Cohort / File(s) Summary
GitHub Actions workflows
.github/workflows/...
\.github/workflows/ci.yml`, `.github/workflows/copilot-setup-steps.yml`, `.github/workflows/deploy-staging.yml`, `.github/workflows/deploy-website.yml`, `.github/workflows/npm-publish.yml`, `.github/workflows/sync-playwright-versions.yml`, `.github/workflows/update-vr-snapshots.yml``
Updated Node.js version references/env values from 20 or 20.x to 24 or 24.x (including actions/setup-node steps and env.NODE_VERSION). No other workflow logic changed.
Documentation
.github/copilot.md
Updated Copilot environment documentation to require Node.js 24 (was 20).
Package configuration
package.json
Bumped devDependency @types/node from 20.x.x to 24.x.x. engines.node remains >=18.
Local dev config
.nvmrc
Added new .nvmrc file containing the literal version string 24.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

  • Check consistency of node-version / env.NODE_VERSION across all workflow files.
  • Verify CI job steps that run install/build/test are compatible with Node 24.
  • Review @types/node bump for potential TypeScript type conflicts.
  • Confirm .nvmrc and .github/copilot.md match and communicate the intended local dev version.

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The PR title 'Bump node to v24' directly and clearly summarizes the main change across all modified files—updating Node.js from v20 to v24.
Description check ✅ Passed The PR description provides clear motivation (Storybook v10 requirement, TypeScript direct execution) but is missing most template sections like Related Issue, Testing details, and Type of changes checklist.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch node24

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 3f6a4f6 and c2bfb43.

⛔ Files ignored due to path filters (1)
  • package-lock.json is excluded by !**/package-lock.json
📒 Files selected for processing (1)
  • .github/workflows/ci.yml (2 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
  • GitHub Check: Build, Test, Pack
  • GitHub Check: Analyze (javascript-typescript)
🔇 Additional comments (1)
.github/workflows/ci.yml (1)

17-18: LGTM – NODE_VERSION environment variable updated correctly.

The NODE_VERSION environment variable is now set to 24.x across the workflow, aligning with the PR objective and Storybook v10 requirements.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🧹 Nitpick comments (2)
.github/workflows/copilot-setup-steps.yml (1)

39-39: Consider normalizing Node version specification.

While node-version: "24" works correctly, other workflows in this PR consistently use "24.x" format. For consistency across the codebase, consider updating this to match.

      - name: Set up Node.js
        uses: actions/setup-node@v4
        with:
-          node-version: "24"
+          node-version: "24.x"
          cache: "npm"
.github/workflows/npm-publish.yml (1)

20-20: Consider normalizing Node version specification.

While node-version: 24 works correctly with setup-node@v3, other workflows consistently use "24.x" format. For consistency, consider updating this to match the pattern used in other workflows (e.g., ci.yml, deploy-website.yml).

      - uses: actions/setup-node@v3
        with:
-          node-version: 24
+          node-version: "24.x"
          registry-url: https://registry.npmjs.org/
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between d3ccaac and 2aa5996.

⛔ Files ignored due to path filters (1)
  • package-lock.json is excluded by !**/package-lock.json
📒 Files selected for processing (9)
  • .github/copilot.md (1 hunks)
  • .github/workflows/ci.yml (1 hunks)
  • .github/workflows/copilot-setup-steps.yml (1 hunks)
  • .github/workflows/deploy-staging.yml (1 hunks)
  • .github/workflows/deploy-website.yml (1 hunks)
  • .github/workflows/npm-publish.yml (1 hunks)
  • .github/workflows/sync-playwright-versions.yml (1 hunks)
  • .github/workflows/update-vr-snapshots.yml (1 hunks)
  • package.json (2 hunks)
🧰 Additional context used
🧠 Learnings (2)
📚 Learning: 2025-11-25T01:23:14.964Z
Learnt from: CR
Repo: recharts/recharts PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-11-25T01:23:14.964Z
Learning: ALWAYS unset `NODE_ENV` environment variable when working in this project

Applied to files:

  • .github/copilot.md
📚 Learning: 2025-11-25T01:22:48.279Z
Learnt from: CR
Repo: recharts/recharts PR: 0
File: DEVELOPING.md:0-0
Timestamp: 2025-11-25T01:22:48.279Z
Learning: Applies to test-vr/__snapshots__/** : Commit new or updated visual regression test snapshots from the `test-vr/__snapshots__` directory to the repository

Applied to files:

  • .github/workflows/update-vr-snapshots.yml
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
  • GitHub Check: Build, Test, Pack
  • GitHub Check: Analyze (javascript-typescript)
🔇 Additional comments (6)
.github/workflows/sync-playwright-versions.yml (1)

34-34: LGTM!

Node.js version update is consistent with other workflows in this PR.

.github/workflows/update-vr-snapshots.yml (1)

19-19: LGTM!

Node.js environment variable updated correctly and used consistently throughout the workflow.

.github/workflows/deploy-website.yml (1)

13-13: LGTM!

Node.js environment variable update is consistent with other workflows.

.github/copilot.md (1)

22-22: LGTM!

Documentation accurately reflects Node.js version requirement update.

.github/workflows/ci.yml (1)

18-18: LGTM!

Node.js environment variable correctly updated and consistently applied throughout the workflow.

package.json (1)

130-130: @types/[email protected] is the correct version specifier for Node.js 24.

The web search confirms that @types/node v24 is the proper TypeScript typings package aligned with Node.js 24. The 24.x.x version specification matches the Node.js 24 runtime and will include the appropriate Node.js 24 APIs in type definitions. No compatibility issues were found.


env:
NODE_VERSION: 20.x
NODE_VERSION: 24.x

@coderabbitai coderabbitai Bot Nov 28, 2025

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🔴 Critical

🧩 Analysis chain

🌐 Web query:

actions/setup-node@v4 Node.js 24.x support compatibility

💡 Result:

Short answer: use a newer setup-node release. actions/setup-node@v4 was not updated to run on Node 24 as its action runtime; GitHub’s migration to Node 24 is handled at the runner level and newer setup-node releases (v5+/v6) explicitly mention Node‑24 compatibility. For reliable Node 24 usage prefer the latest setup-node (or v6) and ensure your runners support Node 24 (you can force-test Node 24 on runners with FORCE_JAVASCRIPT_ACTIONS_TO_NODE24=true). [1][2]

Sources:

  • actions/setup-node repository (action releases / usage notes). [1]
  • GitHub changelog: deprecation/migration to Node 24 on Actions runners (how to test/opt out). [2]

🌐 Web query:

Node.js 24 breaking changes npm compatibility

💡 Result:

Short summary — Node.js 24 (Current, released 2025) includes some breaking/behavior changes you should check and upgrades npm compatibility:

Key compatibility facts

  • Node 24 ships bundled with npm 11.0.x. npm 11’s stated Node support range is ^20.17.0 || >=22.9.0 (npm 11 is the shipped client for Node 24). [1][2]

npm-related breaking/behavior changes to watch

  • npm 11 removes the npm hook command. [1]
  • --ignore-scripts now applies to all lifecycle scripts (including prepare). This can change install/build behavior for projects that relied on prepare or other lifecycle scripts being skipped. [1][2]
  • npm init adds a new type prompt and may produce a different sorted package.json layout. [1][2]
  • npm no longer falls back to the old audit endpoint if the bulk advisory request fails (affects audit behavior). [1]

Node.js 24 runtime changes that affect packages

  • Undici upgraded to v7 (HTTP client) — some Undici v7 breaking changes may affect libraries or code using fetch/undici directly. [1][3]
  • V8 → 13.6 (new JS features); AsyncLocalStorage internals changed (AsyncContextFrame), URLPattern is global now, and some legacy APIs were removed/deprecated (legacy URL parser, certain tls/zlib usages). These runtime changes can surface as compatibility issues in dependencies or native modules. [3][4]

Practical upgrade checklist

  • Rebuild native modules (npm rebuild / reinstall native deps). [2]
  • Upgrade CI images / engine fields to node 24 where appropriate and run full test suite.
  • If you depend on lifecycle scripts, review prepare/build script behavior because of npm 11’s --ignore-scripts change.
  • Audit any direct uses of Undici/fetch, legacy URL/tls/zlib APIs, and code relying on previous AsyncLocalStorage behavior.

Sources

  • Node.js / OpenJS Foundation release notes and highlights for v24. [3]
  • NodeSource / community summaries noting npm 11, Undici 7 and npm changes. [1]
  • Blog/upgrade guides summarizing npm 11 behavior and upgrade steps. [2][4]

Upgrade to actions/setup-node@v5 or v6 required; actions/setup-node@v4 does not officially support Node.js 24.x.

The original review incorrectly approved this change. Web verification reveals critical compatibility issues:

  1. actions/setup-node@v4 is not officially updated for Node.js 24.x. GitHub's migration to Node 24 occurs at the runner level, but newer action versions (v5+/v6) explicitly document Node 24 support. Using v4 with Node 24 is not guaranteed to work reliably.

  2. Node.js 24 includes breaking changes affecting CI/CD:

    • npm 11 (bundled with Node 24) removes the npm hook command and changes --ignore-scripts behavior to apply to all lifecycle scripts (including prepare), which can alter install/build behavior.
    • Undici upgraded to v7 with potential breaking changes for HTTP/fetch operations.
    • V8 13.6 and deprecated legacy APIs (URL parser, tls/zlib) may affect dependencies or native modules.
  3. Workflow action version must be upgraded: Change line 27–30 from actions/setup-node@v4 to actions/setup-node@v6 (or v5) to ensure explicit Node.js 24 compatibility.

  4. Validate npm 11 behavior: The workflow's npm install and build steps should be tested to confirm no lifecycle script breakage or dependency resolution issues.

🤖 Prompt for AI Agents
.github/workflows/deploy-staging.yml around line 11 (and change block lines
~27–30): the workflow sets NODE_VERSION: 24.x but still uses
actions/setup-node@v4 which doesn’t officially support Node 24; update the setup
action to actions/setup-node@v6 (or @v5) by replacing the v4 reference, keep
NODE_VERSION: 24.x, and run CI locally/once in staging to validate npm 11
behavior (install/build/lifecycle scripts) and confirm no failures from
undici/V8/native deps; if npm lifecycle or native module issues appear, pin a
compatible Node version or add explicit npm flags/workarounds as needed.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

actions/setup-node v4 looks like it works just fine with node24. Where does it say it's incompatible?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🧩 Analysis chain

🌐 Web query:

actions/setup-node v4 Node.js 24 compatibility official documentation

💡 Result:

Short answer: actions/setup-node v4 can install/use Node.js 24 for your workflow jobs (you can set node-version: 24), but the action runtime itself was not upgraded to run on Node 24 until later releases (v5/v6). See the official action README for supported node-version syntax and examples, and the releases/changelog showing the action runtime upgrade to Node 24 and the runner compatibility note. [1][2][3]

Sources

  • actions/setup-node (README) — supported node-version examples and usage (shows using 24). [1]
  • actions/setup-node releases — notes about upgrading the action runtime to Node24 in later releases. [2]
  • GitHub Changelog — runner / Node24 compatibility and migration guidance. [3]

@PavelVanecek You're absolutely right, and I apologize for the confusion in my previous comment.

actions/setup-node@v4 works perfectly fine with Node.js 24.x for your use case. The action can successfully install and configure Node.js 24 when you specify node-version: 24.x.

The confusion arose from conflating two different things:

  1. The Node version the action installs for your workflow (which v4 supports, including Node 24) ✅
  2. The Node version the action's own runtime uses internally (which was upgraded to Node 24 in v5/v6, but doesn't affect your workflow)

For your workflow's purposes—installing and using Node 24.x to build your project—actions/setup-node@v4 with NODE_VERSION: 24.x is completely valid and will work as expected. There's no need to upgrade the action version.

Your current configuration is fine. Sorry for the noise! 🐰


🧠 Learnings used
Learnt from: CR
Repo: recharts/recharts PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-11-25T01:23:14.964Z
Learning: ALWAYS unset `NODE_ENV` environment variable when working in this project

Comment thread package.json Outdated
@PavelVanecek

Copy link
Copy Markdown
Collaborator Author

Couple tests are failing because the rounding has changed.

ckifer pushed a commit that referenced this pull request Nov 30, 2025
## Description

Round numbers to 4 decimal places before using them as paths. Also
updates all relevant tests.

## Related Issue

#6704

## Motivation and Context

Something between node22 and node24 changed how floating numbers are
calculated and that made our numbers differ somewhere at 10th decimal
place. Since we're dealing with pixels we don't care about anything
after the decimal dot so I figured we may just as well round it. I tried
rounding to 0 decimal places but that creates ton of visual diff
(somehow), so I made it 4 decimal places. The tests are now passing at
node22, node24, and 25 the same.

I have considered rounding in the test helpers instead but that's an
uphill battle.


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

* **New Features**
* Added automatic rounding of numeric coordinates to improve consistency
and predictability in chart rendering.

* **Bug Fixes**
* Reduced floating-point precision artifacts in visualization outputs,
resulting in cleaner and more consistent display of pie charts, bar
charts, radar charts, and other diagram types.

<sub>✏️ Tip: You can customize this high-level summary in your review
settings.</sub>

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
@PavelVanecek

Copy link
Copy Markdown
Collaborator Author

@copilot rebase on main

Copilot AI commented Nov 30, 2025

Copy link
Copy Markdown
Contributor

@PavelVanecek I've opened a new pull request, #6709, to work on those changes. Once the pull request is ready, I'll request review from you.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Nitpick comments (1)
.github/workflows/npm-publish.yml (1)

17-21: Align Node.js version format and update setup-node action to v4.

Two maintenance concerns:

  1. Version format inconsistency: This file uses 24 (unquoted, no .x) while sync-playwright-versions.yml uses '24.x'. Consider standardizing across all workflows to '24.x' for consistency.
  2. setup-node action version: Line 18 uses actions/setup-node@v3, which is older than the @v4 used in other workflows in this PR. For npm publish (a security-critical path), upgrading to @v4 is recommended for access to latest bug fixes and security patches.

Apply this diff to align with best practices:

       - uses: actions/checkout@v3
-      - uses: actions/setup-node@v3
+      - uses: actions/setup-node@v4
         with:
-          node-version: 24
+          node-version: '24.x'
           registry-url: https://registry.npmjs.org/
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 2aa5996 and 3f6a4f6.

⛔ Files ignored due to path filters (1)
  • package-lock.json is excluded by !**/package-lock.json
📒 Files selected for processing (10)
  • .github/copilot.md (1 hunks)
  • .github/workflows/ci.yml (1 hunks)
  • .github/workflows/copilot-setup-steps.yml (1 hunks)
  • .github/workflows/deploy-staging.yml (1 hunks)
  • .github/workflows/deploy-website.yml (1 hunks)
  • .github/workflows/npm-publish.yml (1 hunks)
  • .github/workflows/sync-playwright-versions.yml (1 hunks)
  • .github/workflows/update-vr-snapshots.yml (1 hunks)
  • .nvmrc (1 hunks)
  • package.json (1 hunks)
✅ Files skipped from review due to trivial changes (1)
  • .nvmrc
🚧 Files skipped from review as they are similar to previous changes (7)
  • .github/workflows/deploy-website.yml
  • package.json
  • .github/workflows/update-vr-snapshots.yml
  • .github/workflows/ci.yml
  • .github/copilot.md
  • .github/workflows/deploy-staging.yml
  • .github/workflows/copilot-setup-steps.yml
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
  • GitHub Check: Build, Test, Pack
  • GitHub Check: Analyze (javascript-typescript)
🔇 Additional comments (1)
.github/workflows/sync-playwright-versions.yml (1)

31-35: Node.js version update is straightforward and consistent.

The version bump to Node.js 24.x is properly formatted and aligns with actions/setup-node@v4 expectations. The workflow commands (npm ci, npm run, and node script execution) are compatible with Node.js 24.

@codecov

codecov Bot commented Nov 30, 2025

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 94.03%. Comparing base (efd8824) to head (c2bfb43).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #6704   +/-   ##
=======================================
  Coverage   94.03%   94.03%           
=======================================
  Files         500      500           
  Lines       42657    42657           
  Branches     4901     4901           
=======================================
  Hits        40111    40111           
  Misses       2541     2541           
  Partials        5        5           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@codecov

codecov Bot commented Nov 30, 2025

Copy link
Copy Markdown

Bundle Report

Bundle size has no change ✅

@PavelVanecek

Copy link
Copy Markdown
Collaborator Author

All tests are passing now. @ckifer thoughts? This should be a dev-only change.

@PavelVanecek

Copy link
Copy Markdown
Collaborator Author

AHA nvm, the workflow file needs one more fix

@PavelVanecek

Copy link
Copy Markdown
Collaborator Author

I'm going to merge this to unblock other PRs - I have bumped myself into a corner.

@PavelVanecek
PavelVanecek merged commit bf29f3e into main Dec 1, 2025
38 of 40 checks passed
@PavelVanecek
PavelVanecek deleted the node24 branch December 1, 2025 13:46
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