Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 15 additions & 9 deletions .claude/skills/release-sparkle-design/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ user-invocable: true
2. **`sparkle-design` リポジトリのルートで作業する**

- 編集・テスト・git 操作はすべて `sparkle-design` のチェックアウトディレクトリで実行
- worktree を使う場合は `.claude/worktrees/<name>` 配下で作業
- 並列作業を分離したい場合は git worktree を使ってもよい(既存運用では `.claude/worktrees/<name>` 配下に置く慣例)。worktree を使わずに `chore/release-X.Y.Z` ブランチを直接切る運用でも可

3. **以下のチェックリストを順に実行する**

Expand Down Expand Up @@ -96,22 +96,27 @@ user-invocable: true
### マージ後: タグ・Release・publish

- [ ] `git fetch origin main && git checkout main && git pull` で最新化
- [ ] リリースコミットの SHA を確認: `git log --oneline -3`
- [ ] **タグ作成 + push**:
- [ ] **リリースコミットの SHA `git log --oneline | grep release | head -1` で必ず特定**
- [ ] **タグはリリースコミットの SHA を明示して打つ**(HEAD に打つと main が進んだ場合に誤タグ → publish 漏れ・誤 publish の温床):
```bash
Comment on lines +99 to 101
git tag vX.Y.Z
RELEASE_SHA=$(git log --oneline | grep "release vX.Y.Z" | head -1 | awk '{print $1}')
git tag vX.Y.Z "$RELEASE_SHA"
git push origin vX.Y.Z
```
- [ ] **GitHub Release 作成**:
CHANGELOG.md のセクションを `--notes` で直接渡すのが確実:
```bash
gh release create vX.Y.Z --title "vX.Y.Z" --notes "$(awk '/^## \[X\.Y\.Z\]/,/^## \[/' CHANGELOG.md | sed '$d')"
awk '/^## \[X\.Y\.Z\]/{flag=1;next} /^## \[/{flag=0} flag' CHANGELOG.md > /tmp/notes.md
gh release create vX.Y.Z --title "vX.Y.Z" --notes-file /tmp/notes.md
```
Comment on lines 106 to 111
もしくは手動で `gh release create vX.Y.Z` を実行し、ブラウザで notes を貼る。
- [ ] **npm publish** — GitHub Actions ワークフローを実行:
- [ ] **npm publish** — GitHub Actions ワークフローを実行。**tag ref で実行する**ことで、main が進んでも正しいリリースコミットの内容が publish される:
```bash
gh workflow run "Publish to npm" --ref vX.Y.Z
```
- workflow が `npm error code E404 'pkg@X.Y.Z' is not in this registry` で失敗する場合は **NPM_TOKEN の期限切れ**(auth 失敗が 404 として返る npm registry 仕様)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

E404 の原因を期限切れに断定しないでください。

npm error code E404 は認証失敗以外(レジストリ設定・パッケージ名不整合など)でも発生するため、期限切れ断定は誤誘導になり得ます。まず NPM_TOKEN を確認しつつ、name/registry も確認 の表現にしてください。

修正案
-  - workflow が `npm error code E404 'pkg@X.Y.Z' is not in this registry` で失敗する場合は **NPM_TOKEN の期限切れ**(auth 失敗が 404 として返る npm registry 仕様)
+  - workflow が `npm error code E404 'pkg@X.Y.Z' is not in this registry` で失敗する場合は、まず **NPM_TOKEN の期限切れ/権限不足** を確認(auth 失敗が 404 として返ることがある)。あわせて package 名・registry 設定も確認する
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
- workflow が `npm error code E404 'pkg@X.Y.Z' is not in this registry` で失敗する場合は **NPM_TOKEN の期限切れ**(auth 失敗が 404 として返る npm registry 仕様)
- workflow が `npm error code E404 'pkg@X.Y.Z' is not in this registry` で失敗する場合は、まず **NPM_TOKEN の期限切れ/権限不足** を確認(auth 失敗が 404 として返ることがある)。あわせて package 名・registry 設定も確認する
🤖 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 @.claude/skills/release-sparkle-design/SKILL.md at line 116, The sentence
that asserts "workflow fails with npm error code E404 ... is due to NPM_TOKEN
expiration" must be changed to avoid definitive attribution; update the text in
SKILL.md so it advises to first check NPM_TOKEN while also verifying package
name and registry configuration (e.g., replace the line mentioning "NPM_TOKEN
の期限切れ(auth 失敗が 404 …)" with guidance like "まず NPM_TOKEN を確認しつつ、name/registry
の設定も確認してください" and remove the absolute claim that E404 equals token expiry). Keep
the mention of the npm registry behavior as a possible cause but not the sole
cause.

- workflow が `npm error code EOTP` で失敗する場合は、**トークン種別が 2FA バイパス対応していない**。次のいずれかで作り直し:
- Classic Token: タイプを **Automation** で発行
- Granular Access Token: 作成時に **「Bypass 2FA when publishing」を有効** にする
- [ ] 公開確認:
- <https://www.npmjs.com/package/sparkle-design> の versions に X.Y.Z が出ているか
- `npm view sparkle-design version` で確認
Expand Down Expand Up @@ -148,8 +153,9 @@ GitHub Release の本文がある場合はそれを CHANGELOG にコピーすれ
### npm publish ワークフローが失敗する場合

- `pnpm-lock.yaml` の整合性が崩れていないか確認(`pnpm install --frozen-lockfile` を試す)
- `pnpm.overrides` を package.json に書いていると pnpm 10+ では読まれない場合がある。`pnpm-workspace.yaml` 側の `overrides:` フィールドへの移行を検討
- `NPM_TOKEN` の有効期限切れも疑う(リポジトリ Secrets を確認)
- `pnpm.overrides` は本リポジトリでは `package.json` の `pnpm.overrides` に置く運用(CI が使う pnpm のバージョンで読まれることを確認済み)。ローカルの pnpm バージョンが大幅に違うと挙動差で lockfile が書き換わることがあるので、ローカルで pnpm install するときは lockfile の差分(特に `overrides:` セクション)を確認すること
- 認証エラーは npm 仕様で 404 として返ることが多い。`NPM_TOKEN` の有効期限切れや権限不足を最初に疑う
- 2FA OTP を要求された場合(`npm error code EOTP`)はトークン種別が automation 対応していない。Classic Token なら Automation 型、Granular Access Token なら「Bypass 2FA when publishing」を有効にしたものを発行

### マージ後のローカル checkout が worktree と衝突する

Expand Down
4 changes: 2 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@

### Added

- **Input まわりの再利用フックを named export** (#263)
- **Input まわりの再利用フックを named export** (#272, closes #263)
- `useInputContainerFocus` / `useMergeRefs` を public API として公開
- **`Input.triggerProps` による ARIA / HTML 属性フォワード** (#268)
- **`Input.triggerProps` による ARIA / HTML 属性フォワード** (#272, closes #268)
- 内部のトリガーボタンに ARIA / HTML 属性を渡せるように

### Notes
Expand Down
Loading