Conversation
|
This is failing CI |
SimenB
left a comment
There was a problem hiding this comment.
I'm missing the bigger picture (use case) here, but the code itself looks good :)
| const KIWI = path.join(FRUITS, 'kiwi.js'); | ||
| const TOMATO = path.join(FRUITS, 'tomato.js'); | ||
| const MELON = path.join(VEGETABLES, 'melon.json'); | ||
| const DURIAN = path.join(VEGETABLES, 'durian.zip'); |
| options: CrawlerOptions, | ||
| ): Promise<InternalHasteMap> { | ||
| if (options.mapper) { | ||
| throw new Error(`Option 'mapper' isn't supported on this crawler`); |
There was a problem hiding this comment.
"Option 'mapper' is not supported in the node crawler"?
|
Will fix the tests tomorrow 👍
I'm figuring out ways to access the content of zip archives as if they were raw files (without unpacking them). In the case of Jest Haste Map, it requires to fake the existence of those "virtual files" (since Watchman isn't aware about them), so the idea is that the configured mapper will detect such archives and replace them by their directory listing in the haste map. |
|
@SimenB the travis failure doesn't seem related to my diff, right? |
|
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 allows
jest-haste-mapto generate additional files that aren't actually baked by the filesystem. The implementation is partial and experimental, since it doesn't remove the virtual files when their source file is being removed (they would have to be linked together in some way).Test plan
Added a test.