-
Notifications
You must be signed in to change notification settings - Fork 188
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
feat: add support for win32 paths #402
Conversation
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.
Thank you looks good, can we add more test with real examples?
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #402 +/- ##
==========================================
- Coverage 92.85% 92.18% -0.67%
==========================================
Files 43 44 +1
Lines 2042 2085 +43
Branches 598 619 +21
==========================================
+ Hits 1896 1922 +26
- Misses 118 131 +13
- Partials 28 32 +4 ☔ View full report in Codecov by Sentry. |
Also please fix ts problems, thank you |
@davakh Hello, friendly ping ⭐ |
Hello, sorry that it took so long. In new version, I've added tests and rewritten the original |
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.
There are enough tests. Thank you
I'll take a look on failed tests |
It's hard for me to debug on Windows, and it feels like it requires refactoring of almost all existing tests because they're not based on I think it would have a greater impact with a lower cost and a lower chance of breaking something in conclusion if we are going to apply something like this It is hard for me to decide because I don't like this solution. If you agree, I can add this solution to codebase, but if you have any other ideas about solving this, I would like to know about it. |
Yeah, we need refactor our tests |
I refactored existing tests in forked version, but there are more things to think about:
Current Node.js behavior with UNC paths:
Possible solutions:
to keep expected behavior - cause it feels more expected behavior to transfer
|
Maybe we can fake the behavior in places we need it just for testing? |
Okay, I dug deeper and with current set of methods required to use by About current progress:
Because of this requirement to exports/imports fields, I have a lot of thoughts about returning to another option: modify win32 path at the beginning of any library public api and work in the library only with posix slash ( |
Sounds good for me - less changes in code |
I think we can solve this - #430 too, using logic above |
Okay, sorry, I didn't expect for PR to be closed on force-push.. |
I implemented general logic for resolving win32 relative paths in library. It's hard to say what else to cover with tests because it's hard to fully mock Node.js's path module and easily switch between win32/posix paths resolving in jest.
If you have thoughts on what else should I cover, I would like to hear about it and I can improve coverage if it's required.
fixes #401