Skip to content

feat!: drop Node 18 support and add 24#598

Merged
mkilpatrick merged 4 commits intomainfrom
node
Dec 30, 2025
Merged

feat!: drop Node 18 support and add 24#598
mkilpatrick merged 4 commits intomainfrom
node

Conversation

@mkilpatrick
Copy link
Collaborator

No description provided.

@mkilpatrick mkilpatrick requested a review from a team as a code owner November 20, 2025 20:23
@coderabbitai
Copy link

coderabbitai bot commented Nov 20, 2025

Walkthrough

Workflows: CI job matrices updated to Node versions [20.x, 22.x, 24.x] (removed 18.x); several workflow steps renamed/normalized, secret descriptions standardized, BOT_REPO_SCOPED_TOKEN marked required: true, and minor formatting/quote normalizations applied. package.json files: engines.node updated project-wide from ranges including Node 18 to ^20.6.0 || ^22 || ^24. packages/pages: spawn.ts removed Node-version branching and now always imports node:module and registers the loader before spawning. pagesUpdater: internal NODE_ENGINES constant and validation updated to match the new ranges.

Sequence Diagram(s)

mermaid
sequenceDiagram
participant Dev as Developer
participant CI as GitHub Actions
participant Runner as Node Process
participant Loader as Loader (module/loader)

Note over CI,Runner #F3F4F6: CI matrix changed — Node versions now 20/22/24
Dev->>CI: push PR / trigger workflows
CI->>Runner: start job with selected Node version (20/22/24)

Note over Runner,Loader #E8F6EE: Previous spawn.ts (conditional behavior)
Runner->>Runner: check Node version
alt Node 18 (old)
Runner->>Runner: append --experimental-specifier-resolution=node
Runner->>Loader: register loader via flag
else Node >=20 (old)
Runner->>Loader: import node:module and register loader
end

Note over Runner,Loader #FFF4E6: New spawn.ts (unified behavior)
Runner->>Runner: initialize experimental flags (no version-specific flag)
Runner->>Loader: import node:module and register loader (always)
Runner->>Runner: spawn child with loader initialized

Pre-merge checks

❌ Failed checks (1 inconclusive)
Check name Status Explanation Resolution
Description check ❓ Inconclusive No description was provided by the author; however, the PR title and objectives provide sufficient context about the changes. Consider adding a description explaining the rationale for dropping Node 18 and adding Node 24 support, and any migration guidance for users.
✅ Passed checks (1 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and specifically describes the main change: dropping Node 18 support and adding Node 24 support, which is reflected throughout the changeset.

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.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
packages/pages/src/upgrade/pagesUpdater.ts (1)

553-572: Update version check to align with dropped Node 18 support.

The checkNodeVersion function at line 564 still explicitly checks for Node 18 (if (version !== 18 && version !== 20)), which is inconsistent with the updated NODE_ENGINES constant that no longer includes Node 18 support.

Apply this diff to update the version check:

-    if (version !== 18 && version !== 20) {
+    if (version !== 20 && version !== 22 && version !== 24) {
       console.error(
         `You are currently using an unsupported node version ${nodeVersion}. Please install node ${NODE_ENGINES}.`
       );
🧹 Nitpick comments (1)
packages/pages/src/bin/spawn.ts (1)

13-18: Remove or comment out unused nodeVersion calculation.

The nodeVersion constant is calculated but never used. This wastes resources by spawning a node process on every invocation. Additionally, the comment incorrectly refers to it as a "function."

Option 1 (preferred): Remove the dead code entirely.

-// Keeping this unused function in case it's needed again
-const nodeVersion = Number(
-  spawnSync("node", ["-v"], { encoding: "utf-8" })
-    .stdout.substring(1)
-    .split(".")[0]
-);
-

Option 2: Comment it out if truly needed for reference.

-// Keeping this unused function in case it's needed again
-const nodeVersion = Number(
-  spawnSync("node", ["-v"], { encoding: "utf-8" })
-    .stdout.substring(1)
-    .split(".")[0]
-);
+// Commented out - can be restored if Node version checks are needed:
+// const nodeVersion = Number(
+//   spawnSync("node", ["-v"], { encoding: "utf-8" })
+//     .stdout.substring(1)
+//     .split(".")[0]
+// );
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 14cda16 and 6109bcc.

📒 Files selected for processing (11)
  • .github/workflows/build.yml (1 hunks)
  • .github/workflows/jstest.yml (2 hunks)
  • .github/workflows/playwright.yml (4 hunks)
  • .github/workflows/third_party_notices_check.yml (4 hunks)
  • .github/workflows/unit_test.yml (2 hunks)
  • package.json (2 hunks)
  • packages/pages/package.json (2 hunks)
  • packages/pages/src/bin/spawn.ts (1 hunks)
  • packages/pages/src/upgrade/pagesUpdater.ts (1 hunks)
  • playground/locations-site/package.json (2 hunks)
  • playground/multibrand-site/package.json (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). (14)
  • GitHub Check: call_playwright / acceptance (windows-latest, 24.x)
  • GitHub Check: call_playwright / acceptance (macos-latest, 24.x)
  • GitHub Check: call_playwright / acceptance (macos-latest, 22.x)
  • GitHub Check: call_playwright / acceptance (macos-latest, 20.x)
  • GitHub Check: call_playwright / acceptance (windows-latest, 22.x)
  • GitHub Check: call_playwright / acceptance (ubuntu-latest, 22.x)
  • GitHub Check: call_playwright / acceptance (ubuntu-latest, 20.x)
  • GitHub Check: call_playwright / acceptance (ubuntu-latest, 24.x)
  • GitHub Check: call_playwright / acceptance (windows-latest, 20.x)
  • GitHub Check: call_unit_test / unit_tests (22.x)
  • GitHub Check: call_jstest / jstest
  • GitHub Check: call_unit_test / unit_tests (20.x)
  • GitHub Check: call_unit_test / unit_tests (24.x)
  • GitHub Check: semgrep/ci
🔇 Additional comments (13)
packages/pages/src/upgrade/pagesUpdater.ts (1)

527-528: LGTM! Node engine range updated correctly.

The constant now reflects the new supported Node versions (20.2.0+, 22, and 24), aligning with the PR objective to drop Node 18 support.

.github/workflows/unit_test.yml (1)

19-43: LGTM! Test matrix updated to reflect new Node version support.

The workflow now tests on Node 20.x, 22.x, and 24.x, correctly dropping Node 18 support as intended.

.github/workflows/third_party_notices_check.yml (2)

15-16: LGTM! Node version updated appropriately.

The workflow now uses Node 20.x, aligning with the updated minimum supported version.


25-46: LGTM! Syntax normalization improves consistency.

The workflow syntax has been normalized (removing extra space in run: directives) and quote style standardized.

.github/workflows/build.yml (1)

19-45: LGTM! Build matrix updated correctly.

The build workflow now targets Node 20.x, 22.x, and 24.x, consistent with the updated engine requirements.

package.json (1)

25-27: LGTM! Engine specification updated correctly.

The Node engine requirement now enforces the new minimum version (20.2.0) and adds support for Node 24, while dropping Node 18.

playground/locations-site/package.json (1)

14-16: LGTM! Engine specification aligned with project requirements.

The playground package now enforces the same Node version requirements as the root package, ensuring consistency across the monorepo.

.github/workflows/playwright.yml (2)

6-7: LGTM! Secret requirement explicit.

Adding required: true to the secret declaration is a good practice that makes the workflow dependency clear.


15-68: LGTM! Playwright tests updated for new Node versions.

The test matrix now includes Node 20.x, 22.x, and 24.x across all operating systems (Windows, Ubuntu, macOS), ensuring comprehensive coverage.

.github/workflows/jstest.yml (2)

5-6: LGTM! Quote style normalized.

The description now uses double quotes, consistent with other workflow files in this PR.


21-25: LGTM! JavaScript tests updated to Node 20.

The workflow now uses Node 20 for building and testing, aligning with the new minimum supported version.

playground/multibrand-site/package.json (1)

15-15: LGTM! Node version constraint updated correctly.

The engines.node update appropriately drops Node 18 support and adds Node 24, aligning with the PR objectives.

packages/pages/package.json (1)

39-39: All dependencies verified compatible with Node 24; change is safe.

VitePress 1.5.0 declares a broad Node requirement (>=14.6.0) and depends on Vite, which explicitly requires Node 20.19+ or 22.12+—directly compatible with your engines specification. Rollup 4.27.2, Express 4.18.3, and TypeScript 5.4.2 all support Node 24 through their permissive engine constraints. No breaking incompatibilities identified.

@asanehisa
Copy link
Contributor

lgtm but not sure why call_unit_test / unit_tests (18.x) is trying to run still

benlife5
benlife5 previously approved these changes Nov 20, 2025
@benlife5
Copy link
Contributor

unit_tests (18.x) is required in the GitHub settings so it's expecting it to run -- that will need to be updated

@mkilpatrick
Copy link
Collaborator Author

unit_tests (18.x) is required in the GitHub settings so it's expecting it to run -- that will need to be updated

updated

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
packages/pages/src/upgrade/pagesUpdater.ts (1)

552-571: Critical: Update the hardcoded version check to match NODE_ENGINES.

The checkNodeVersion() function still checks for Node 18 and 20 only, but the NODE_ENGINES constant now supports "^20.6.0 || ^22 || ^24". This inconsistency will cause:

  • Node 18 to be incorrectly accepted (should be rejected)
  • Node 22 and 24 to be incorrectly rejected (should be accepted)

Apply this diff to fix the version check:

     const version = parseInt(nodeVersion.toString().split(".")[0].substring(1));
-    if (version !== 18 && version !== 20) {
+    if (version !== 20 && version !== 22 && version !== 24) {
       console.error(
         `You are currently using an unsupported node version ${nodeVersion}. Please install node ${NODE_ENGINES}.`
       );
     }

Note: This simplified check only validates the major version. Consider whether the minimum Node 20.6.0 requirement needs additional validation.

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 6109bcc and b868056.

📒 Files selected for processing (5)
  • package.json (2 hunks)
  • packages/pages/package.json (2 hunks)
  • packages/pages/src/upgrade/pagesUpdater.ts (1 hunks)
  • playground/locations-site/package.json (2 hunks)
  • playground/multibrand-site/package.json (2 hunks)
🚧 Files skipped from review as they are similar to previous changes (4)
  • playground/multibrand-site/package.json
  • packages/pages/package.json
  • package.json
  • playground/locations-site/package.json
⏰ 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). (14)
  • GitHub Check: call_playwright / acceptance (macos-latest, 24.x)
  • GitHub Check: call_playwright / acceptance (windows-latest, 24.x)
  • GitHub Check: call_playwright / acceptance (macos-latest, 22.x)
  • GitHub Check: call_playwright / acceptance (macos-latest, 20.x)
  • GitHub Check: call_playwright / acceptance (ubuntu-latest, 24.x)
  • GitHub Check: call_playwright / acceptance (ubuntu-latest, 20.x)
  • GitHub Check: call_unit_test / unit_tests (22.x)
  • GitHub Check: call_playwright / acceptance (windows-latest, 20.x)
  • GitHub Check: call_playwright / acceptance (windows-latest, 22.x)
  • GitHub Check: call_playwright / acceptance (ubuntu-latest, 22.x)
  • GitHub Check: call_unit_test / unit_tests (24.x)
  • GitHub Check: call_unit_test / unit_tests (20.x)
  • GitHub Check: call_jstest / jstest
  • GitHub Check: semgrep/ci

Copy link

@coderabbitai coderabbitai bot left a comment

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)
packages/pages/package.json (1)

39-39: Node version constraint is correct and production-ready.

The engines.node update to "^20.6.0 || ^22 || ^24" properly drops Node 18 support and adds Node 24, which entered Active LTS in October 2025 with support through April 2028. The constraint format is valid.

Consider updating @types/node from ^20.11.28 to a version that covers Node 24 types (e.g., ^24.0.0) to ensure developers have accurate type definitions when working with Node 24 features.

📜 Review details

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 81607f1 and 6e09b9f.

📒 Files selected for processing (1)
  • packages/pages/package.json
⏰ 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). (11)
  • GitHub Check: call_playwright / acceptance (ubuntu-latest, 20.x)
  • GitHub Check: call_playwright / acceptance (macos-latest, 20.x)
  • GitHub Check: call_playwright / acceptance (ubuntu-latest, 22.x)
  • GitHub Check: call_playwright / acceptance (macos-latest, 24.x)
  • GitHub Check: call_playwright / acceptance (macos-latest, 22.x)
  • GitHub Check: call_playwright / acceptance (windows-latest, 20.x)
  • GitHub Check: call_playwright / acceptance (windows-latest, 22.x)
  • GitHub Check: call_playwright / acceptance (ubuntu-latest, 24.x)
  • GitHub Check: call_playwright / acceptance (windows-latest, 24.x)
  • GitHub Check: call_jstest / jstest
  • GitHub Check: semgrep/ci

@mkilpatrick mkilpatrick merged commit 4be6e46 into main Dec 30, 2025
22 checks passed
@mkilpatrick mkilpatrick deleted the node branch December 30, 2025 21:22
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.

3 participants