jest-haste-map: Fixed Haste whitelist generation for scoped modules on Windows#6980
Conversation
|
Could you add a test? We run CI on both linux and windows, so we should be able to get coverage for it 🙂 |
3e2900a to
5861d41
Compare
|
Right now the entire jest haste map suite is skipped on Windows: https://github.com/facebook/jest/blob/master/packages/jest-haste-map/src/__tests__/index.test.js Making it so it's split out into a posix and win32 section like Metro does here is a good idea that I'd like to do: But such an effort would be an entire separate PR's worth of effort, IMO. Especially since a lot of the util functions use posix separators, I'd need to fix them to use platform-specific path separators |
Aww, that's too bad :( Help with having it run on Windows would be greatly appreciated, none on the team uses it |
|
Note that we have landed a breaking change on master, so unless @mjesun wants do do some branching and cherry-picking, this fix won't be released for some time |
|
I see, I will see if I can make things work on Metro's end until then |
|
Heh. Easiest is probably to revert #6960, release, then revert the revert |
|
I'm actually really interested in having #6960 released as well haha, so whatever you folks decide is good for me 😄 |
|
Yeah, but that's a breaking change, and we want to do a few more at the same time (which are not ready to land). Maybe we can do a pre-release? I don't know if you'd wanna use that in metro or not |
|
@SimenB Yeah, let's do a pre-release. Feel free to merge as many breaking stuff as wanted .:) |
Signed-off-by: Max Risuhin <risuhin.max@gmail.com>
|
This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Summary
This PR modifies the function
getWhiteListinjest-haste-mapto handle flipping the path separator on@scoped/moduleson Windows. This allows Haste to properly resolve JS files inside of scoped modules on Windows.Needed to resolve react/metro#241 and react/metro#249
Test plan
Using a version of
jest-haste-mappatched with this patch, and the test suite in my Metro pull request, all tests pass