Repository navigation
Node 22.x / npm 10.x を .nvmrc と engines で固定 - #5849
Merged
Merged
Conversation
…nstall を阻止 Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
Contributor
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (4)
📝 WalkthroughWalkthroughプロジェクトの Node.js と npm バージョン管理を確立するための設定ファイルとドキュメントを追加しました。 Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
This was referenced Apr 21, 2026
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
概要
CI は Node 22 / npm 10、ドキュメント (CLAUDE.md / README / copilot-instructions) も同じバージョンを要件として明記しているが、機械的な強制が一切無く、Node 24 / npm 11 ローカル環境で
npm installすると lockfile が書き換わって CI (npm 10) のnpm ciがMissing: ... from lock fileで失敗する事故が発生した(#5847 で実際に踏んだ)。今回の変更で、CI と同じバージョン以外ではnpm install自体をブロックするようガードを導入する。変更の種類
変更内容
.nvmrcを追加し22を記載(nvm / fnm / asdf / mise 等が自動で Node 22 に切り替え)package.jsonのenginesに{ "node": "22.x", "npm": "10.x" }を追加(npm install時に不一致を検出).npmrcを追加しengine-strict=trueを設定(engines 不一致を警告ではなくエラー扱いにして install を停止)README.mdの Prerequisites 節に.nvmrcとengine-strictの存在を追記テスト
npm run lintが通ること(Node 22 / npm 10.9.7)npm testが通ること(148 suites / 1398 tests、Node 22 / npm 10.9.7)npm run typecheckが通ること(Node 22 / npm 10.9.7)npm installを実行するとEBADENGINEで停止することnpm installが通り、lockfile 差分はenginesブロック追記のみであること(依存版の書き換えが発生しないこと)関連Issue
#5847 で顕在化した lockfile drift 事故の再発防止。
スクリーンショット(任意)
Summary by CodeRabbit
Chores