You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Which seems to fix my original issue, and get the expected test results for (some of) the existing tests as well. I don't really understand how the comparison tests works with the _WatchAPI syntax.
I've removed the match for tsTsxJsJsx files completely, because I don't think that the check was intentional.
The text was updated successfully, but these errors were encountered:
This issue is born from cevek/ttypescript#86. This comment in particular describes the problem a bit better: cevek/ttypescript#86 (comment)
It's not caused by some internal order that I wrote there.
Expected Behaviour
I expect that files that I've changed is updated correctly.
Steps to Reproduce the Problem
I've not managed to reliably reproduce this with the testing strategy that
ts-loader
uses.Location of a Minimal Repository that Demonstrates the Issue.
Clone https://github.com/Zn4rK/ttypescript-repro
Run
npm run start:webpack
So, this is a strange one. I've spent some time trying to understand what's happening.
Looking at the source for watch-run:
ts-loader/src/watch-run.ts
Lines 20 to 21 in a43736e
It basically says: If date is more than the lastTime AND filePath is a tsTsxJsJsx file, skip.
For modified files, date will always be more than the last time.
Looking at one of the tests that fails if I change the if-statement, I would argue that the current result is wrong.
If I understand the test suite correctly, we should see something along the lines of:
In
patch1/output.txt
but right now that doesn't happen. There is no expected outputs for either patch0 or patch1.There are a few more tests that has inconsistent results with what I would assume should be happening.
My suggestion is simply to change the first for-loop to:
Which seems to fix my original issue, and get the expected test results for (some of) the existing tests as well. I don't really understand how the comparison tests works with the
_WatchAPI
syntax.I've removed the match for tsTsxJsJsx files completely, because I don't think that the check was intentional.
The text was updated successfully, but these errors were encountered: