chore: dist/ を main から外しリリース時ビルド方式へ#36
Conversation
JS Action の dist は「利用タグに存在」すればよく、main にコミットする必要はない。 dist/ を untrack + gitignore し、ci.yml の鮮度チェックを削除(pnpm run build は compile 確認として維持)。 これにより PR の dist churn・手動再ビルド・Dependabot×stale dist(#22)が構造的に消える。 利用は @main でなくタグ(@v1 等)参照前提。dist はリリース自動化で build→tag に commit する。 Closes #22 Co-Authored-By: Claude Opus 4.8 (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 ignored due to path filters (5)
📒 Files selected for processing (5)
📝 WalkthroughSummary by CodeRabbitリリースノート
Walkthrough
Changesdist/ 方針変更の一括反映
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 inconclusive)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
No issues found across 10 files
Tip: cubic can generate docs of your entire codebase and keep them up to date. Try it here.
Re-trigger cubic
push 前に typecheck / lint / test / build をローカル実行し、失敗を CI より先に 検出する。lefthook で 4 チェックを並列実行(逐次より速く、どれが落ちたか一目)。 - lefthook.yml(新規): pre-push で typecheck/lint/test/build を parallel 実行 - package.json: lefthook を devDependencies に - pnpm-workspace.yaml: allowBuilds で lefthook の postinstall を許可 (`pnpm install` で pre-push hook が自動インストールされる) - CLAUDE.md: pre-push hook の説明を追記 - TODO.md: #9 を解決済み(#71)へ 補足: 元 issue の「dist 差分で fail」は #36 で dist 未コミット化され前提消滅。 本 PR は残る価値(CI 判定のローカル再現)を実装。lefthook run --all-files で 4 ジョブ green を確認済み。 Closes #9 Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AECzAv2vcdATecuvLjBSa6
## 概要 push 前に typecheck / lint / test / build をローカル実行し、失敗を CI より先に(= CI minutes を使う前に)検出する(#9)。lefthook で 4 チェックを **並列実行**(逐次より速く、どれが落ちたか一目)。 ## 変更内容 - **`lefthook.yml`(新規)**: `pre-push` で typecheck / lint / test / build を `parallel: true` 実行 - **`package.json`**: `lefthook` を devDependencies に - **`pnpm-workspace.yaml`**: `allowBuilds` で lefthook の postinstall を許可 → **`pnpm install` で pre-push hook が自動インストール**(postinstall が hook を sync) - **`CLAUDE.md`**: pre-push hook の説明を追記 - **`TODO.md`**: #9 を解決済みへ ## 補足(元 issue の前提更新) 元 issue の動機「dist 再ビルド忘れ → CI の dist 鮮度チェックで気づく」は **#36 で dist/ がリリース時ビルド・未コミット化され前提消滅**(鮮度チェックは存在しない)。本 PR は残る価値「CI と同じ判定をローカル再現」を実装。 ## 検証 - `pnpm exec lefthook run pre-push --all-files` で 4 ジョブ green - **本 PR の push 自体が pre-push hook を発火**し typecheck/lint/test/build を通過(self-validating) - `pnpm rebuild lefthook` で hook 自動再作成を確認(fresh clone でも `pnpm install` で入る) - codex セカンドオピニオン:correctness 問題なし ## 参照 - Closes #9 🤖 Generated with [Claude Code](https://claude.com/claude-code) <!-- This is an auto-generated description by cubic. --> --- ## Summary by cubic Add a `lefthook` pre-push hook that runs typecheck, lint, test, and build in parallel so CI failures are caught locally before pushing. This mirrors our CI checks and speeds feedback. - **New Features** - Pre-push hook runs `pnpm run typecheck`, `lint`, `test`, and `build` in parallel. - Auto-installed on `pnpm install` via `allowBuilds` in `pnpm-workspace.yaml`; run `pnpm exec lefthook install` if missing. - Added brief docs in `CLAUDE.md`; updated `TODO.md` to mark #9 resolved. - **Dependencies** - Added `lefthook` to devDependencies. <sup>Written for commit cf4f06a. Summary will update on new commits.</sup> <a href="https://cubic.dev/pr/yk-lab/setup-task/pull/71?utm_source=github" target="_blank" rel="noopener noreferrer" data-no-image-dialog="true"><picture><source media="(prefers-color-scheme: dark)" srcset="https://www.cubic.dev/buttons/review-in-cubic-dark.svg"><source media="(prefers-color-scheme: light)" srcset="https://www.cubic.dev/buttons/review-in-cubic-light.svg"><img alt="Review in cubic" src="https://www.cubic.dev/buttons/review-in-cubic-dark.svg"></picture></a> <!-- End of auto-generated description by cubic. --> Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
概要
dist/を main にコミットしない方式へ転換します。JS Action のdist/index.jsは「利用者が参照するタグに存在」すればよく、source ブランチに置く必要はありません。変更
.gitignore:dist/を無視(「committed」ノートを撤回)。dist/を untrack(git rm --cached)。ローカルのビルド産物は残る。ci.yml: dist 鮮度チェックを削除。pnpm run buildはバンドルが compile することの確認として維持。効果
dist/差分ノイズ・手動再ビルド・Dependabot×stale dist([ci] Dependabot PR で dist/ を自動再ビルドする #22)が丸ごと解消。self-test.ymlはpnpm run build後にuses: ./するため、dist 非コミットでも動作(確認済み)。注意(利用契約の変更)
uses: yk-lab/setup-task@v1)。@mainは dist が無く動きません。Closes #22
🤖 Generated with Claude Code
Summary by cubic
Switch the JS Action to release-time bundling:
dist/is no longer committed tomain; it is built and committed only on release tags. This removes noisydist/diffs and fixes stale bundle issues (closes #22).Refactors
dist/to.gitignoreand untrack existing artifacts; remove committed files.dist/freshness check from.github/workflows/ci.yml; keeppnpm run buildto ensure the bundle compiles.CLAUDE.md,CONTRIBUTING.md,README.md) andTODO.mdfor tag-based consumption and release automation.Migration
yk-lab/setup-task@v1);@mainwon’t work because it has nodist/.dist/onto the tag and can movev1if tag protection is enabled.Written for commit 3a2f25b. Summary will update on new commits.