-
-
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
chore: make sure to call realpath
when accessing cwd
#7613
Conversation
Codecov Report
@@ Coverage Diff @@
## master #7613 +/- ##
==========================================
- Coverage 68.26% 68.26% -0.01%
==========================================
Files 249 249
Lines 9623 9626 +3
Branches 5 6 +1
==========================================
+ Hits 6569 6571 +2
- Misses 3052 3053 +1
Partials 2 2
Continue to review full report at Codecov.
|
return { | ||
canInstrument: true, | ||
getCacheKey( | ||
fileData: string, | ||
filename: Path, | ||
configString: string, | ||
{instrument, rootDir}: CacheKeyOptions, | ||
{config, instrument, rootDir}: {config: ProjectConfig} & CacheKeyOptions, |
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.
I think CacheKeyOptions
already has the config
property https://github.com/facebook/jest/blob/94c40a5dc5df86b8f27e403bde7fff1e33c74e16/types/Transform.js#L29
realpath
in on when accessing cwd
realpath
when accessing cwd
@thymikee updated 🙂 "putput" 😅 |
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
More from #7556. There's quite a few places we access
cwd
, even though we have acwd
inProjectConfig
already. Instead ofrealpath
ing them again, we should reuse the one from config.Also consistently
realpath
cwd
in the places where we don't haveconfig
./cc @willsmythe
Test plan
Green CI