chore: updating to node 22#75
Conversation
WalkthroughThe project was updated to use Node.js version 22 across its development, build, and CI environments. This included updating the GitHub Actions workflow, adding an Changes
Sequence Diagram(s)sequenceDiagram
participant Developer
participant LocalEnv
participant GitHubActions
participant TypeScript
Developer->>LocalEnv: Reads .nvmrc (Node 22)
LocalEnv->>Developer: Sets Node.js version to 22
Developer->>GitHubActions: Pushes code
GitHubActions->>GitHubActions: Sets up Node.js 22.x
GitHubActions->>TypeScript: Uses @tsconfig/node22 for build
TypeScript-->>GitHubActions: Compiles code with Node 22 assumptions
Poem
Tip ⚡️ Faster reviews with caching
Enjoy the performance boost—your workflow just got faster. 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. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (1)
tsconfig.json (1)
15-16: Consider updating module settings to NodeNext.
Since Node.js 22 has first-class ESM support, you might switch"module"and"moduleResolution"from"Node16"to"NodeNext"to leverage full ESM semantics.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (1)
package-lock.jsonis excluded by!**/package-lock.json
📒 Files selected for processing (4)
.github/workflows/commit-checks.yml(1 hunks).nvmrc(1 hunks)package.json(1 hunks)tsconfig.json(1 hunks)
🧰 Additional context used
🪛 actionlint (1.7.4)
.github/workflows/commit-checks.yml
14-14: the runner of "actions/setup-node@v2" action is too old to run on GitHub Actions. update the action's version to fix this issue
(action)
🔇 Additional comments (5)
.nvmrc (1)
1-1: Pin Node.js version in.nvmrc.
The.nvmrcfile correctly specifies Node.js v22, ensuring local and CI environments stay in sync with the project’s runtime target.package.json (1)
40-42: Align TypeScript preset with Node.js 22.
Adding"@tsconfig/node22": "^22.0.1"underdevDependenciesensures your TypeScript compiler options extend the correct preset for Node.js v22.tsconfig.json (1)
3-3: Extend the Node.js 22 TypeScript config.
Updating"extends": "@tsconfig/node22/tsconfig.json"brings your compiler options in line with the Node.js v22 environment..github/workflows/commit-checks.yml (2)
13-13: Update workflow step name to reflect Node.js 22.
Renaming the setup step to “Use Node 22.x” accurately documents the runtime version your CI will use.
16-16: Pin CI to Node.js 22.x.
Settingnode-version: '22.x'aligns your GitHub Actions runner with the project’s.nvmrcand local development environments.
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
There was a problem hiding this comment.
Actionable comments posted: 0
🧹 Nitpick comments (1)
.github/workflows/commit-checks.yml (1)
13-16: Optional: Enable npm caching to speed up installs
You can add a cache input to reuse dependencies between runs:- name: Use Node 22.x uses: actions/setup-node@v3 with: node-version: '22.x' + cache: 'npm'This caches
~/.npmacross jobs and can significantly reduce CI time.🧰 Tools
🪛 actionlint (1.7.4)
14-14: the runner of "actions/setup-node@v3" action is too old to run on GitHub Actions. update the action's version to fix this issue
(action)
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
.github/workflows/commit-checks.yml(1 hunks)
🧰 Additional context used
🪛 actionlint (1.7.4)
.github/workflows/commit-checks.yml
14-14: the runner of "actions/setup-node@v3" action is too old to run on GitHub Actions. update the action's version to fix this issue
(action)
🔇 Additional comments (1)
.github/workflows/commit-checks.yml (1)
13-16: Approved: Upgraded to Node.js 22 using setup-node@v3
This aligns with the new.nvmrcand TypeScript presets (@tsconfig/node22), and theubuntu-latestrunner fully supports Node 22. Great catch updating both the action and version!🧰 Tools
🪛 actionlint (1.7.4)
14-14: the runner of "actions/setup-node@v3" action is too old to run on GitHub Actions. update the action's version to fix this issue
(action)
Summary by CodeRabbit