-
-
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
Use realpath to match transformers #5000
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. |
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.
Thanks!
@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: