[ 開発環境 ] gulp を廃止し terser + node --check に置き換え#130
Conversation
gulp 4→5 のメジャーアップデートによるプラグイン非互換を避けるため、 gulp と全 gulp-* プラグインを削除し、既存タスクを以下で代替: - jsmin: terser CLI(@wordpress/scripts の transitive dep) - test: node --check による構文検証 - replace_text_domain: inc/vk-admin/ が存在しないため削除(デッドコード) これにより braces の脆弱性(CVE in 3.0.2)も解消。 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
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 selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
WalkthroughGulpタスク群を削除し、 変更
推定レビュー時間🎯 3 (Moderate) | ⏱️ ~20 分 ポエム
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@package.json`:
- Line 14: The package.json "test" script currently calls node --check with
multiple filenames which only checks the first file (js/script.js) and leaves
js/admin-link-dialog.js unchecked; update the "test" npm script (the "test"
entry in package.json) so that node --check is executed for each JS file (e.g.,
run a find/xargs loop over js/*.js files) or switch the script to use a proper
linter (e.g., eslint) to validate all JS files, ensuring js/admin-link-dialog.js
and any other files are included in the check.
🪄 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: 9688830b-d053-4322-838b-d753d43b2284
⛔ Files ignored due to path filters (2)
js/script.min.jsis excluded by!**/*.min.jspackage-lock.jsonis excluded by!**/package-lock.json
📒 Files selected for processing (2)
gulpfile.jspackage.json
💤 Files with no reviewable changes (1)
- gulpfile.js
node --check は複数ファイル引数を受け付けず最初のファイルのみ チェックする仕様のため、&& で連結して全ファイルを検証する。 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
概要
gulp 4 → 5 のメジャーアップデートに伴うプラグイン非互換(#95)を回避するため、gulp を完全に廃止し、軽量な代替ツールに置き換えました。
変更内容
gulpfile.jsを削除gulp,gulp-jsmin,gulp-jsvalidate,gulp-replaceを devDependencies から削除npm run jsmin:terserCLI に置き換え(@wordpress/scriptsの transitive dep として利用可能)npm run test:node --checkによる JS 構文検証に置き換えgulp replace_text_domain:inc/vk-admin/ディレクトリが存在しないため削除(デッドコード)npm run buildからgulp replace_text_domainの呼び出しを削除副次効果
package-lock.jsonが約 7,400 行削減確認手順
手順
npm installを実行する→ ✓ エラーなく完了する
npm run jsminを実行する→ ✓
js/script.min.jsが生成されるnpm testを実行する→ ✓ JS 構文エラーなく完了する
npm run buildを実行する→ ✓ ブロックビルド + jsmin がエラーなく完了する
npm ls bracesを実行する→ ✓ braces 3.0.3 のみが表示される(3.0.2 が存在しない)
🤖 Generated with Claude Code
Summary by CodeRabbit
リリースノート