fix: CIエラーを修正 - 型安全性と依存関係の問題を解決#21
Merged
at-ok merged 2 commits intoNov 20, 2025
Merged
Conversation
## 修正内容 ### 1. Supabase createClient関数のエクスポート - lib/supabase.ts に createClient 関数を追加 - APIルートで使用できるように再エクスポート ### 2. 型安全性の改善 - app/api/push/send/route.ts: SubscriptionRow インターフェースを定義 - app/api/push/subscribe/route.ts: 型キャストを適切に実装 - app/gamemaster/page.tsx: filter/map関数の引数に明示的な型を追加 - app/chaser/page.tsx: map関数の引数に明示的な型を追加 ### 3. テストの修正 - hooks/__tests__/useLocation.test.ts: resumeGame を削除(存在しない関数) - hooks/__tests__/useLocationHistory.test.tsx: calculateDistance を lib/geometry から直接インポート ### 4. 通知APIの型問題を解決 - hooks/useNotifications.tsx: Uint8Array を BufferSource に型キャスト - hooks/useNotifications.tsx: vibrate プロパティの型を unknown 経由でキャスト ### 5. web-push の型定義を追加 - types/web-push.d.ts を新規作成 - PushSubscription, WebPushError, 関数シグネチャを定義 ### 6. lib/web-push.ts のエラー配列型を修正 - subscription を non-null assertion で処理 - error を unknown 型として扱う ## テスト結果 ✅ 型チェック: 成功 ✅ ビルド: 成功 ✅ ユニットテスト: 86/86 合格 すべてのCIチェックが成功する状態に修正しました。
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.
修正内容
1. Supabase createClient関数のエクスポート
2. 型安全性の改善
3. テストの修正
4. 通知APIの型問題を解決
5. web-push の型定義を追加
6. lib/web-push.ts のエラー配列型を修正
テスト結果
✅ 型チェック: 成功
✅ ビルド: 成功
✅ ユニットテスト: 86/86 合格
すべてのCIチェックが成功する状態に修正しました。