Skip to content

Conversation

@NeOMakinG
Copy link
Contributor

@NeOMakinG NeOMakinG commented Aug 19, 2025

Description

Says what it does, update the CI to node 22 and types

Issue (if applicable)

closes #10305

Risk

Medium, I've always been using node 23 and it seems to work as expected, but we need to check if the deployment and build works fine from the CI

High Risk PRs Require 2 approvals

What protocols, transaction types, wallets or contract interactions might be affected by this PR?

Testing

  • give a quick smoke test locally
  • Wait for the CI to deploy this branch and see how it goes!

Engineering

Operations

  • 🏁 My feature is behind a flag and doesn't require operations testing (yet)

Screenshots (if applicable)

Nothing to show here really

Summary by CodeRabbit

  • Chores
    • Updated project to target Node.js 22 for development and CI consistency.
    • Bumped Node.js type definitions to ^22.13.14 for improved tooling and compatibility.
    • CI job now runs on GitHub-hosted ubuntu-latest instead of a Node 20 container.
    • No functional or UI changes; end-user behavior remains unchanged.

@coderabbitai
Copy link

coderabbitai bot commented Aug 19, 2025

📝 Walkthrough

Walkthrough

Bumped Node.js from 20 to 22 (.nvmrc and package.json), added engines.node: "22.x", updated @types/node devDependency, and removed the container specification from the CI job so the “Install Lint Type-check” job runs on GitHub-hosted ubuntu-latest.

Changes

Cohort / File(s) Summary
Node runtime files
./.nvmrc
Updated Node version from 20 to 22.
package.json adjustments
./package.json
Added engines.node: "22.x"; updated devDependencies.@types/node from ^20.10.7 to ^22.13.14. No other fields changed.
CI runner change
.github/workflows/ci.yml
Removed the container: node:20-bullseye specification from the “Install Lint Type-check” job; job now runs on GitHub-hosted ubuntu-latest with setup-node still using the version file and same steps.

Sequence Diagram(s)

sequenceDiagram
  autonumber
  participant GH as GitHub Actions
  participant Job as CI Job
  participant Container as Docker Container (node:20-bullseye)
  participant Runner as GitHub-hosted runner (ubuntu-latest)
  note over GH,Job #D6EAF8: Previous flow (before)
  GH->>Container: start container
  Container->>Job: run job steps (setup-node, install, lint, typecheck, test)
  Note right of Job: Node provided by container image

  par Updated flow (after)
    GH->>Runner: start ubuntu-latest runner
    Runner->>Job: run job steps (setup-node, install, lint, typecheck, test)
    Note right of Job: Node provided by setup-node using .nvmrc
  end
Loading

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Poem

I thump my paws—now Node is twenty-two,
Types refreshed, CI runner swapped anew.
I hop through workflows, tidy and light,
Nibble updated deps by moonlight.
A twitch of whiskers—ready for the brew. 🐇✨

Tip

🔌 Remote MCP (Model Context Protocol) integration is now available!

Pro plan users can now connect to remote MCP servers from the Integrations page. Connect with popular remote MCPs such as Notion and Linear to add more context to your reviews and chats.

✨ Finishing Touches
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch update-node

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

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

CodeRabbit Commands (Invoked using PR/Issue comments)

Type @coderabbitai help to get the list of available commands.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Status, Documentation and Community

  • Visit our Status Page to check the current availability of CodeRabbit.
  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

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 (2)
package.json (2)

1-14: Add engines to enforce Node 22 across environments.

This prevents accidental installs/builds on Node 20 or 23 that may pass locally but fail in CI/CD.

Proposed diff (insert after "type"):

   "type": "module",
+  "engines": {
+    "node": ">=22 <23"
+  },

1-14: Optionally pin via Volta if your team uses it.

If Volta is part of your toolchain, adding it will auto-install/enforce Node 22 for contributors.

   "type": "module",
+  "volta": {
+    "node": "22.##"
+  },

Replace ## with the chosen patch if you decide to pin.

📜 Review details

Configuration used: CodeRabbit UI
Review profile: ASSERTIVE
Plan: Pro

💡 Knowledge Base configuration:

  • MCP integration is disabled by default for public repositories
  • Jira integration is disabled
  • Linear integration is disabled

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between 15ccc63 and 26b5794.

⛔ Files ignored due to path filters (1)
  • yarn.lock is excluded by !**/yarn.lock, !**/*.lock
📒 Files selected for processing (2)
  • .nvmrc (1 hunks)
  • package.json (1 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: Deploy Preview
  • GitHub Check: Install Lint Type-check
🔇 Additional comments (2)
.nvmrc (1)

1-1: Node 22 is correctly sourced from .nvmrc in CI
All GitHub Actions workflows (.github/workflows/ci.yml, preview.yml, production.yml) use actions/setup-node@v3 with node-version-file: '.nvmrc', so bumping to Node 22 in .nvmrc is picked up automatically.

package.json (1)

53-53: Node types v22 upgrade: configuration looks correct

tsconfig.json (for src) includes:

  • lib: ["ES2020", "DOM", "DOM.Iterable"]
  • no "types" override (so all @types/* packages—including @types/node—are loaded)
  • skipLibCheck: true suppresses lib conflicts

tsconfig.node.json only applies to tooling (vite.config.ts), so browser code is unaffected by Node-only ts settings. No @types/node imports found under src/.

Action items (optional):

  • Ensure you’re not inadvertently using Node globals (e.g., fetch, WebSocket) that shadow the DOM versions.
  • If you need stricter separation, you can add a "types": [] entry in your tsconfig.json (or maintain a separate tsconfig for Node).

All good to approve.

@kaladinlight kaladinlight merged commit bccee4f into develop Aug 19, 2025
3 of 4 checks passed
@kaladinlight kaladinlight deleted the update-node branch August 19, 2025 17:40
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

📜 Review details

Configuration used: CodeRabbit UI
Review profile: ASSERTIVE
Plan: Pro

💡 Knowledge Base configuration:

  • MCP integration is disabled by default for public repositories
  • Jira integration is disabled
  • Linear integration is disabled

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between 26b5794 and 18988ec.

📒 Files selected for processing (2)
  • .github/workflows/ci.yml (0 hunks)
  • package.json (2 hunks)
💤 Files with no reviewable changes (1)
  • .github/workflows/ci.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). (1)
  • GitHub Check: Deploy Preview
🔇 Additional comments (1)
package.json (1)

6-8: Allow Node 23 by widening the engines range

The lock “node”: "22.x" will prevent anyone using Node 23—even though it’s been verified to work locally. Since your .nvmrc is pinned to “22”, CI and other automation will stay on Node 22 while allowing Node 23 for contributors.

Update package.json as follows:

-  "engines": {
-    "node": "22.x"
-  },
+  "engines": {
+    "node": ">=22 <24"
+  },

"@types/mixpanel-browser": "^2.48.1",
"@types/multicoin-address-validator": "^0",
"@types/node": "^20.10.7",
"@types/node": "^22.13.14",
Copy link

Choose a reason for hiding this comment

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

💡 Verification agent

🧩 Analysis chain

Bumping @types/node to ^22.13.14: check TS compatibility and potential DOM/Undici type collisions.

Type packages for Node 22 may surface new globals (fetch, Request, Response via undici-types). With TypeScript at ^5.2.2 and DOM libs enabled, projects sometimes hit duplicate identifier issues. Ensure type-check passes without relying on skipLibCheck.

If you encounter issues:

  • Option A (preferred): bump TypeScript to a newer minor (e.g., ^5.6) that aligns well with modern lib typings.
  • Option B: adjust tsconfig libs to avoid conflicting DOM globals if not needed, or enable "skipLibCheck": true as a fallback.

Verification aide:


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "Typescript & @types/node versions:"
jq -r '.devDependencies | {typescript, "@types/node"}' package.json

echo
echo "Check for tsconfig lib and skipLibCheck (may appear in multiple tsconfigs):"
fd -a tsconfig*.json | while read -r f; do
  echo "----- $f"
  rg -n -C1 -P '"lib"\s*:|\bskipLibCheck\b' "$f" || true
done

echo
echo "Scan for common collision indicators (Request/Response/fetch in global usage):"
rg -n -C2 -P '\b(fetch|Request|Response|Headers)\b' --type=ts --type=tsx -g '!**/node_modules/**' || true

Length of output: 555


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "Detected tsconfig files:"
fd -g 'tsconfig*.json' || true

echo
echo "Checking tsconfig files for 'lib' entries and skipLibCheck:"
fd -g 'tsconfig*.json' | while read -r file; do
  echo "----- $file -----"
  rg -n -C1 -P '"lib"\s*:|\bskipLibCheck\b' "$file" || true
done

echo
echo "Scanning TS/TSX sources for global fetch|Request|Response|Headers usage:"
rg -n -C2 -P '\b(fetch|Request|Response|Headers)\b' --type ts --type tsx -g '!**/node_modules/**' || true

Length of output: 1390


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "Scanning TS/TSX sources for global fetch|Request|Response|Headers usage without relying on --type:"
rg -n -C2 -P '\b(fetch|Request|Response|Headers)\b' -g '*.ts' -g '*.tsx' -g '!**/node_modules/**' || true

Length of output: 1569


skipLibCheck suppresses Node 22/DOM type collisions
Your tsconfig files—tsconfig.json, tsconfig.node.json, and scripts/tsconfig.json—all have "skipLibCheck": true, and tsconfig.json includes ["ES2020", "DOM", "DOM.Iterable"], so any duplicate globals (fetch, Request, Response, Headers from undici-types vs. DOM) are currently ignored. If you ever disable skipLibCheck or run a stricter type-check and hit conflicts, consider:

  • Option A (preferred): bump TypeScript to a newer minor (e.g., ^5.6) that aligns with modern lib typings
  • Option B: remove "DOM"/"DOM.Iterable" from tsconfig.json if browser globals aren’t needed in your Node build
  • Option C: keep "skipLibCheck": true as a fallback
🤖 Prompt for AI Agents
In package.json around line 56, the project pins @types/node ^22 while tsconfigs
use skipLibCheck and include DOM libs which can cause duplicate global type
collisions if skipLibCheck is removed; update the TypeScript devDependency to a
newer minor (e.g., bump "typescript" to ^5.6) as the preferred fix so lib
typings align, or alternatively remove "DOM"/"DOM.Iterable" from tsconfig.json
if browser globals are unnecessary for Node, or keep "skipLibCheck": true as a
last-resort fallback; implement the preferred bump in package.json and run a
full type-check to confirm conflicts are resolved.

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