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 getOptions support for Windows machines #215

Merged
merged 7 commits into from Jun 25, 2022

Conversation

mastrzyz
Copy link
Contributor

@mastrzyz mastrzyz commented Jun 3, 2022

Solves issue -> #107

Current getOptions goes up the directory tree until we hit path.sep , aka "/".

This works on Nix based platforms but on windows we hit an infinite loop at path.dirname("C:\\") , since we can't go to "/" from "C:\".

Instead we should be leveraging path.parse which actually tells us the root directory of a path.

Added the incomplete UT for this as well as a try/catch around the require statement since it can also fail if the import isn't working like through bundling via webpack.

@palmerj3
Copy link
Collaborator

palmerj3 commented Jun 5, 2022

Sorry for the delay.

Thank you!!

This looks pretty great to me and I'm happy to merge. I just need to ask that you remove the version bump in package.json first. I do the version bumping when cutting a new release.

So once you do that I'll merge this and the other PR of yours and cut a release.

@mastrzyz
Copy link
Contributor Author

mastrzyz commented Jun 6, 2022

Done! @palmerj3

@mastrzyz
Copy link
Contributor Author

mastrzyz commented Jun 9, 2022

@palmerj3 ?

@palmerj3
Copy link
Collaborator

Hey @mastrzyz sorry for the delay. Just started a new job this week.

I'll carve out some time this weekend to get these things merged and published.

@mastrzyz
Copy link
Contributor Author

@palmerj3 any luck with merging

@mastrzyz
Copy link
Contributor Author

Hey @palmerj3 is there anyone else I can ping here for review?

@palmerj3 palmerj3 merged commit 27b4389 into jest-community:master Jun 25, 2022
@palmerj3
Copy link
Collaborator

Sorry for the delay. I merged both your PRs and published version 14.0.0 with the changes.

Thanks again!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants