-
Notifications
You must be signed in to change notification settings - Fork 87
ホットリロードが動作しない問題を修正 #585
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ホットリロードが動作しない問題を修正 #585
Conversation
- chokidar.watch()のglobパターンを個別のディレクトリパスに変更 - startLocalChangesWatcher関数を非同期から同期に変更 - watchPathGlobパラメータをwatchPathsに変更し、配列で受け取るように修正 Resolves #584 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
- モック関数をmockResolvedValueからmockReturnValueに変更(非同期→同期) - 期待値をglobパターンから配列形式に変更 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
| expect(server.startLocalChangesWatcher).toHaveBeenCalledWith( | ||
| mockReturnServer, | ||
| `${process.cwd()}/{articles,books}/**/*` | ||
| [`${process.cwd()}/articles`, `${process.cwd()}/books`] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
とくにBooksですが、直下だけでなく再帰的に監視してくれるかわかりますか?Booksは chpater > chapter.md の構造であるため気になりました。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
確認しました。 chapter.md の変更も検知してくれるので問題ありません!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ご確認ありがとうございます!
cm-wada-yusuke
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTMです!
Chokidarのbreaking changesを見逃していました 🙏
https://github.com/paulmillr/chokidar
📑 Summary
仕様の変更
コードの変更
chokidar.watch()に渡すパスをglobパターンから個別のディレクトリパス配列に変更startLocalChangesWatcher関数の非同期処理を削除(async/awaitを削除)watchPathGlobパラメータをwatchPaths配列に変更その他・備考
{articles,books}/**/*が正しく展開されず、ファイル変更を検知できない問題を修正articles/,books/)を配列で渡すことで、正常にホットリロードが動作するようになりますResolves #584
📋 Tasks
プルリクエストを作成いただく際、お手数ですが以下の内容についてご確認をお願いします。
canaryブランチに対するプルリクエストであるより詳しい内容は Pull Request Policy を参照してください。