[go: up one dir, main page]

Skip to content
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

fix: verify rootDir and all roots are directories #9569

Merged
merged 7 commits into from
Feb 12, 2020

Conversation

SimenB
Copy link
Member
@SimenB SimenB commented Feb 12, 2020

Summary

See #9549 for background.

This could be considered a breaking change and I can print a warning instead?. Also, as mentioned in #9549, should we verify that roots exist in jest-haste-map as well? Not sure how that affects Metro, but jest-haste-map is super inconsistent in how it handles missing roots depending on whether Watchman is used and if the OS is Windows.

Closes #9549.

Test plan

Integration tests added

}
} catch (err) {
if (err instanceof ValidationError) {
throw err;
Copy link
Member Author
@SimenB SimenB Feb 12, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

printing a warning instead of these 3 throws is trivial if we don't want a breaking change. However, I think non-existent directories provided to these options are so blatantly a configuration error that I think it's fine to throw

Copy link
Member
@cpojer cpojer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This makes sense to me, roots should always exist and failing is a good default.

@codecov-io
Copy link
codecov-io commented Feb 12, 2020

Codecov Report

Merging #9569 into master will decrease coverage by 0.02%.
The diff coverage is 41.66%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #9569      +/-   ##
==========================================
- Coverage   65.05%   65.03%   -0.03%     
==========================================
  Files         286      286              
  Lines       12127    12139      +12     
  Branches     3005     3008       +3     
==========================================
+ Hits         7889     7894       +5     
- Misses       3600     3606       +6     
- Partials      638      639       +1
Impacted Files Coverage Δ
packages/jest-config/src/normalize.ts 76.66% <41.66%> (-1.21%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 00e9e09...62bfb8a. Read the comment docs.

@SimenB
Copy link
Member Author
SimenB commented Feb 12, 2020

bah, here we go https://developer.microsoft.com/en-us/microsoft-edge/tools/vms/

these tests didn't pass for me at all, not just the symlink error 🤷‍♂ And the test error was just wrong path in the error message, otherwise it was correct

@drew-gross
Copy link

Codecov Report

Merging #9569 into master will decrease coverage by 0.02%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #9569      +/-   ##
==========================================
- Coverage   65.05%   65.03%   -0.03%     
==========================================
  Files         286      286              
  Lines       12127    12139      +12     
  Branches     3005     3008       +3     
==========================================
+ Hits         7889     7894       +5     
- Misses       3600     3606       +6     
- Partials      638      639       +1     

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 00e9e09...eb69703. Read the comment docs.

@SimenB SimenB merged commit 5f81742 into jestjs:master Feb 12, 2020
@SimenB SimenB deleted the verify-rootdir-roots branch February 12, 2020 21:48
jimmy-guzman added a commit to jimmy-guzman/workspace that referenced this pull request Apr 11, 2020
jimmy-guzman added a commit to jimmy-guzman/workspace that referenced this pull request Apr 11, 2020
jimmy-guzman added a commit to jimmy-guzman/workspace that referenced this pull request Apr 21, 2020
jimmy-guzman added a commit to jimmy-guzman/workspace that referenced this pull request Apr 21, 2020
@github-actions
Copy link

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.
Please note this issue tracker is not a help forum. We recommend using StackOverflow or our discord channel for questions.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 11, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants