-
-
Notifications
You must be signed in to change notification settings - Fork 6.5k
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
jest-haste-map: Fixed Haste whitelist generation for scoped modules on Windows #6980
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: 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 <[email protected]>
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
getWhiteList
injest-haste-map
to handle flipping the path separator on@scoped/modules
on Windows. This allows Haste to properly resolve JS files inside of scoped modules on Windows.Needed to resolve facebook/metro#241 and facebook/metro#249
Test plan
Using a version of
jest-haste-map
patched with this patch, and the test suite in my Metro pull request, all tests pass