-
Notifications
You must be signed in to change notification settings - Fork 16
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
Tweak globs depending on compile configuration #39
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -115,7 +115,7 @@ export default function typescriptProvider({negotiateProtocol}) { | |||||
return false; | ||||||
} | ||||||
|
||||||
return rewritePaths.some(([from]) => filePath.startsWith(from)); | ||||||
return rewritePaths.some(([to, from]) => filePath.startsWith(compile === 'tsc' ? from : to)); | ||||||
}, | ||||||
|
||||||
resolveTestFile(testfile) { | ||||||
|
@@ -142,7 +142,7 @@ export default function typescriptProvider({negotiateProtocol}) { | |||||
], | ||||||
ignoredByWatcherPatterns: [ | ||||||
...ignoredByWatcherPatterns, | ||||||
...Object.values(relativeRewritePaths).map(to => `${to}**/*.js.map`), | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We'd want to keep this, it's useful if the pre-compilation step outputs source maps. And it should be harmless in case we run |
||||||
...Object.entries(relativeRewritePaths).map(([to, from]) => `${compile === 'tsc' ? from : to}**`), | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Here too I think the entries are in the shape of
Suggested change
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. not sure about ignoring only some file extension, for two reasons:
for the watcher I'd rather ignore the whole folders in order to:
is there some other scenario I'm not thinking of? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. That makes sense, but it changes the behavior compared to plain AVA. Changing a fixture file should cause tests to re-run. But to get around that I think we'd need a way to block until compilation is complete? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. oh, didn't think about the fixtures, I haven't used them much until now. It makes sense not to change the standard behaviour. I'll make the change to ignore only ts,tsx files (or something along those lines) for now 👍 |
||||||
], | ||||||
}; | ||||||
}, | ||||||
|
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.
Would it make sense to check
compile
once? Also you mixed up the "from" and "to":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.
lol. yep, sorry