Use realpath to match transformers#5000
Use realpath to match transformers#5000cpojer merged 6 commits intojestjs:masterfrom k15a:realpath-to-match-transformers
Conversation
This will use the realpath to match the transformers in case the path
is a symlink. This will solve an issue where files which are linked by
lerna or npm link are not transformed.
Currently a solution for this problem would be a configuration like:
```json
{
"transformIgnorePatterns": [
"<rootDir>/node_modules/"
]
}
```
|
This is not passing unit tests. |
|
Woo, 5000! 🎉 Should this use native realpath, similar to #4730? In addition to fixing the failing test, I'd love to see a new test for it 🙂 |
…th-to-match-transformers
Codecov Report
@@ Coverage Diff @@
## master #5000 +/- ##
==========================================
- Coverage 60.31% 60.28% -0.04%
==========================================
Files 198 198
Lines 6662 6667 +5
Branches 4 4
==========================================
+ Hits 4018 4019 +1
- Misses 2644 2648 +4
Continue to review full report at Codecov.
|
|
@SimenB This is now using the native realpath implementation similar to #4730. I've seen that there is Not sure how I could test this because I would have to mock |
|
I don't want you to mock it, I want an integration which uses a symlinked module which shows that the issue you had previously is solved 🙂 (It might not be possible, I don't know for sure) |
|
@SimenB I've added an integration test. Please let me know if I can do anything else. |
|
@k15a The test is failing on Windows. can you send a PR skipping it on windows? |
|
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 will use the realpath to match the transformers in case the path
is a symlink. This will solve an issue where files which are linked by
lerna or npm link are not transformed.
Currently a solution for this problem would be a configuration like:
{ "transformIgnorePatterns": [ "<rootDir>/node_modules/" ] }