This repository has been archived by the owner on Jun 2, 2022. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: de/normalise all file separators in a string
currently our tests fail on Windows because we neglect to normalise/denormalise all path separators. when interacting with the local filesystem, we need to make sure to use the native separator (slash on linux, backslash on windows). our normalising function used `string.prototype.replace(str, str)` which replaces only the first occurrence in a string. this commit fixes it to the `string.prototype.replace(regex, str)` signature which, coupled with a global regex, replaces all occurences. this commit isn't accompanied with a test since an existing test is already broken, and that test passing will be the proof of correctness.
- Loading branch information