-
Notifications
You must be signed in to change notification settings - Fork 2
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
Make it work on Windows #748
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
calebeby
commented
Jul 23, 2024
Paul-Hebert
reviewed
Jul 25, 2024
Paul-Hebert
reviewed
Jul 25, 2024
Paul-Hebert
reviewed
Jul 25, 2024
Paul-Hebert
reviewed
Jul 25, 2024
Paul-Hebert
approved these changes
Jul 25, 2024
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 Caleb! Code looks good and tests are passing 👍
I left a few small non-blocking suggestions that you may want to take a look at before merging. Thanks!
Merged
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hello and welcome to my pull request. The following are things about Windows that make me sad.
C:\
(or similar). On Windows, we need to handle those as absolute paths.\
instead of/
. On Windows, we need to use\
for any path used on the file system, and/
for any path used in the browser. In a lot of cases Windows doesn't seem to care which one you use, but I don't know if that is universally true (and if you ask for a path it will always give you one with\
AFAICT)\r\n
(CRLF) instead of\n
between each line. This is not always true though; for example git for windows can be configured to checkout files as-is from GitHub instead of converting them while performing a checkout. So they can have either\r\n
or\n
. But text files in the browser (e.g. HTML, CSS, JS) will have\n
instead since they are not on the filesystem. So we need to handle both.\
which happens to be the escape character for JS strings makes things more difficult, e.g. you can't plop a windows path into a JS string with${}
directly because of the escaping. Don't ask how long I spent debugging a string that once interpolated becamesomething\node_modules
and the\n
in the middle was seen as a line break so then I was like "what is ode modules I do not like it" 😱 🙀 😡