fix(deps): bump @actions/core to 2.0.3 and @actions/github to 8.0.1, rebuild dist - #104
Conversation
DeployGate Upload Information
|
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
Resolve the Node.js 20 compatibility issue before approval.
Review effort: Lite
Findings: None
What changed in this PR
Updates GitHub Action dependencies to address vulnerable undici versions and rebuilds the distribution bundle.
Changes:
- Upgrades
@actions/coreand@actions/github. - Refreshes transitive dependencies and the lockfile.
- Rebuilds
dist/index.js.
| File | Summary |
|---|---|
package.json |
Updates runtime dependencies. |
package-lock.json |
Contains content-type@3.1.1, which requires Node.js 22+ while the action runs on Node.js 20. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
content-type@3.1.1 の engines: node >=22 は、ESM専用パッケージであることによる指定と考えられます。コードにNode 22でしか使えないAPIは見当たりませんでした。このActionでは ncc で dist/index.js 1ファイルにまとめており、Node 20.0.0 / 20.20.2 で読み込めること、CI(Node 20)で実際のアップロードとPRへのコメントが成功していることを確認しました。そのため、このPRでは対応しません。node24 への移行は別のPRで検討します。 |
概要
以下の2点に対応します。
dist/index.jsが古いままになっている問題chore(deps): bump the other-dependencies group across 1 directory with 2 updates #103 で
undiciを 7.29.1 に上げましたが、Action の実行時に使われるdist/index.jsは再ビルドされていませんでした。このため、利用者の環境では修正前の undici 7.29.0 が動いていました。@actions/core/@actions/githubの中に古い undici が残っている問題2つのパッケージが依存する
@actions/http-client@2が undici 5.29.0 を使っていました。npm audit --omit=devでは High 1件、Moderate 2件が報告されていました。変更内容
@actions/core@actions/githubdist/index.jsnpm run buildで再生成@actions/github@9と@actions/core@3は ESM 専用です。使うにはプロジェクト全体を ESM に移す必要があるため、今回は見送りました。CommonJS のまま使える中で最新の 8.0.1 と 2.0.3 を選んでいます。src/main.tsの変更は必要ありませんでした。確認したこと
npm audit --omit=dev:0件(変更前は High 1件、Moderate 2件)npm audit signatures:すべて検証に成功tsc --noEmit:成功npm run build後、dist/index.jsが Node 20 / 25 で読み込みエラーなく起動するpr-test.yml)で DeployGate へのアップロードと PR へのコメントが成功する対象外
開発用の依存(brace-expansion、js-yaml、minimatch など)に対する
npm auditの指摘は、このPRでは扱いません。🤖 Generated with Claude Code