Re: [whatwg/url] Changes to file URL path normalization (#544)

Various JS platforms and tools rely on file URLs now as their module registry identifier to align with browsers and support HTTPs loading alongside files. Node.js and Deno are two. More build tools may follow suit here as well.

Yes this is very much about edge cases. A better example might be something like:

```js
export async function loadFileSystemPath (path) {
  return await import('file:///' + path);
}
```

or any other registry full URL construction.

Case sensitivity is a problem Node.js had before the shift to URLs so is probably best treated out of scope certainly.

Might it be possible to more easily support these base separator renormalization cases here?

It not, Node.js will likely implement some extra renormalization / validations before landing these changes. But it's a class of bugs for server JS platforms going forward so if there's ways to make it easier that could be useful. Otherwise these separator normalization issues could cause these edge case bugs in environments that are not aware of the pitfalls.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/whatwg/url/pull/544#issuecomment-703715109

Received on Monday, 5 October 2020 15:42:17 UTC