Skip to content

Node を 24 LTS に固定 - #6262

Merged
TinyKitten merged 4 commits into
devfrom
chore/bump-node-24
Jun 17, 2026
Merged

TinyKitten merged 4 commits into
devfrom
chore/bump-node-24

Conversation

@TinyKitten

@TinyKitten TinyKitten commented Jun 17, 2026 •

Copy link
Copy Markdown
Member

概要

Node のバージョン固定を、Maintenance LTS に入った 22 から Active LTS の 24 に更新する。あわせて、Node 24 が同梱する npm 11 で npm ci が engine-strict に弾かれないよう engines.npm を緩め、functions/(Cloudflare Workers)のローカルツールチェーンの Node 系も揃える。engines.node(アプリ側)は EAS Submit の npm ci を落とすため復活させず(#5857 の経緯)、固定は .nvmrc と CI のみで維持する。

変更の種類

  • バグ修正
  • 新機能
  • リファクタリング
  • ドキュメント
  • CI/CD
  • その他

変更内容

  • .nvmrc を 22 → 24 に更新
  • CI ワークフローの node-version を 24 に更新(test.yml / typecheck.yml / bump_version_on_canary_pr.yml / bump_version_on_release_pr.yml)
  • engines.npm を "10.x" → ">=10" に緩和(Node 24 同梱の npm 11 で engine-strict=true の EBADENGINE を回避。npm 10 の EAS 環境とも両立)
  • engines.node(アプリ側)は追加しない(engine-strict=true × engines.node が EAS Submit の npm ci を落とすため)
  • functions/(Cloudflare Workers)のツールチェーンを Node 24 に追従:
    • engines.node を "22" → ">=22" に緩和(完全一致の脆さを回避し 22/24 両対応)
    • @types/node を ^22 → ^24 に更新(package-lock.json も追従)
    • ※ デプロイ先ランタイムは workerd(compatibility_date / nodejs_compat)であり、本変更はローカルのビルド/ツールチェーンにのみ影響する

テスト

  • npm run lint が通ること
  • npm test が通ること
  • npm run typecheck が通ること

省略: コード変更なし(.nvmrc・CI 設定・engines・型定義のバージョンのみ)

関連Issue

スクリーンショット(任意)

Summary by CodeRabbit

Chores

  • Node.jsのランタイム環境をバージョン22からバージョン24に更新しました(CIのテスト実行、型チェック、自動バージョンバンプ、リリースPRの処理、.nvmrcを含む)。
  • package.jsonのengines.npm指定を10.xから>=10へ変更し、対象npmバージョン範囲を広げました。
  • functions配下のNode.js要件を22から>=22に更新し、対応する型定義もNode 24向けに更新しました。

@TinyKitten TinyKitten self-assigned this Jun 17, 2026
@coderabbitai

coderabbitai Bot commented Jun 17, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

Important

Review skipped

Review was skipped due to path filters

⛔ Files ignored due to path filters (1)
  • package-lock.json is excluded by !**/package-lock.json

CodeRabbit blocks several paths by default. You can override this behavior by explicitly including those paths in the path filters. For example, including **/dist/** will override the default block on the dist directory, by removing the pattern from both the lists.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: f4d385ec-e565-4dfb-8bf4-7f6a06d98b93

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • ✅ Review completed - (🔄 Check again to review again)
📝 Walkthrough

Walkthrough

CI ワークフロー 4 本(test、typecheck、canary バンプ、release バンプ)と .nvmrc で Node.js バージョン指定を 22 から 24 に変更。functions/package.json で engines.node を >=22 に緩和し、型定義を @types/node@^24.0.0 に更新。同時に root package.json の npm バージョン要件を 10.x から >=10 に拡大。ロジックや処理フローへの変更はなし。

Changes

Node.js および npm バージョン更新

Layer / File(s) Summary
Node.js バージョンを 22 → 24 に統一
.nvmrc, .github/workflows/test.yml, .github/workflows/typecheck.yml, .github/workflows/bump_version_on_canary_pr.yml, .github/workflows/bump_version_on_release_pr.yml, functions/package.json
.nvmrc および全 CI ワークフローの actions/setup-node で node-version を 22 から 24 に変更。functions/package.json の engines.node を 22 から >=22 に緩和し、@types/node を ^22.0.0 から ^24.0.0 に更新。
npm バージョン要件を緩和
package.json
engines.npm を 10.x から >=10 に変更し、対応する npm バージョン範囲を拡大。

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Poem

🐇 ぴょんぴょんと Node のバージョンを更新!
二十二から二十四へ、軽やかにジャンプ🎉
ワークフローも .nvmrc も functions も一斉に揃えて、
npm も柔軟に、新しい草原でテストが走る〜🌿
うさぎはいつも最新が好きだよ ✨

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The PR title "Node を 24 LTS に固定" clearly and concisely summarizes the main change: pinning Node.js version to 24 LTS.
Description check ✅ Passed The PR description covers all required sections: overview, type of change (CI/CD selected), detailed change contents, test information, and related issues. It provides comprehensive context for the Node version upgrade.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch chore/bump-node-24

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

@github-actions github-actions Bot added the ci/cd label Jun 17, 2026

@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: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In @.nvmrc:
- Line 1: The Node.js version specification is inconsistent across the project.
While `.nvmrc` and the CI workflow specify Node 24, the `functions/package.json`
file still declares `engines.node: "22"`. Since `.npmrc` has
`engine-strict=true` enabled, this mismatch will cause npm ci to fail when
running in a Node 24 environment. Update the `engines.node` field in
`functions/package.json` (and any other package.json files) to specify Node 24
instead of 22, and update the README documentation to reflect the Node.js 24.x
requirement to ensure consistency across all configuration files and
documentation.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 16ff592b-c9fa-4e53-a2c6-f3ce07c1bb13

📥 Commits

Reviewing files that changed from the base of the PR and between 1d07ad6 and d35eb92.

📒 Files selected for processing (5)
  • .github/workflows/bump_version_on_canary_pr.yml
  • .github/workflows/bump_version_on_release_pr.yml
  • .github/workflows/test.yml
  • .github/workflows/typecheck.yml
  • .nvmrc

Comment thread .nvmrc Resolved

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

Caution

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

⚠️ Outside diff range comments (1)
functions/package.json (1)

18-27: ⚠️ Potential issue | 🟠 Major

CI は Node 24 でのみテストしているため、engines.node を >=24 に統一してください。

test.yml と typecheck.yml はいずれも node-version: 24 で実行されており、@types/node: ^24.0.0 の指定と一致します。engines.node: >=22 は、CI 設定と不一致な過度に緩いドキュメンテーションです。コードが Node 22 で動作する可能性があっても、プロジェクトの実際のサポート範囲は Node 24 のため、調整が必要です。

修正案
   "engines": {
-    "node": ">=22"
+    "node": ">=24"
   },
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@functions/package.json` around lines 18 - 27, The engines.node specification
in package.json is set to >=22, but the CI pipeline (test.yml and typecheck.yml)
only tests against Node 24, and the `@types/node` dependency is specified as
^24.0.0. Update the engines.node field in the dependencies section of
package.json from >=22 to >=24 to align the declared Node version requirement
with the actual CI testing environment and type definitions being used.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Outside diff comments:
In `@functions/package.json`:
- Around line 18-27: The engines.node specification in package.json is set to
>=22, but the CI pipeline (test.yml and typecheck.yml) only tests against Node
24, and the `@types/node` dependency is specified as ^24.0.0. Update the
engines.node field in the dependencies section of package.json from >=22 to >=24
to align the declared Node version requirement with the actual CI testing
environment and type definitions being used.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 89b85c00-327a-4040-9f44-225e74de876f

📥 Commits

Reviewing files that changed from the base of the PR and between 021cff8 and 35a1c6f.

⛔ Files ignored due to path filters (1)
  • functions/package-lock.json is excluded by !**/package-lock.json
📒 Files selected for processing (1)
  • functions/package.json

@TinyKitten
TinyKitten merged commit 51e24fc into dev Jun 17, 2026
5 checks passed
@TinyKitten
TinyKitten deleted the chore/bump-node-24 branch June 17, 2026 19:04
@TinyKitten TinyKitten mentioned this pull request Jun 17, 2026
4 of 9 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant