-
-
Notifications
You must be signed in to change notification settings - Fork 4
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
fix: hmr schema watcher had an always truthy conditional check #67
Conversation
Thanks for your contributions. On a first glance they look good, but I will only have time for a more in depth review in a few weeks once I'm back from holidays. Sorry for the delay |
Oh no, no worries. Enjoy the rest of your holidays @tobiasdiez I don't think there's much urgency for this at this time |
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.
I've now played around with your branch, but have issues with the schema resolving. For me path
is not an absolute path...
Codecov Report
@@ Coverage Diff @@
## main #67 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 1 1
Lines 10 10
Branches 2 2
=========================================
Hits 10 10 📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
Thanks again for your contribution, very much appreciated! |
Multimatch always returns an array, even an empty one when there's no match, which is a truthy value. This meant that templates were always updated even if it's not schema files that were changed.
Another significant change is resolving schema as path patterns. The
path
argument from the watch hook is absolute, so an unresolved schema that starts with ./ would have always been false. This would not have been found because of the first bug with the matcher condition.I'm not sure, but it might help with #57