nodejs / modules

Node.js Modules Team
MIT License
413 stars 43 forks source link

File URL normalization changes #558

Closed guybedford closed 1 year ago

guybedford commented 4 years ago

I've just added https://github.com/nodejs/node/pull/35477 to the agenda which is new WhatWG URL resolution changes.

I'm temporarily blocking that as it has effects on the modules system.

As an example, we have the following before and after:

new URL('////path/to/file.js', 'file:');
// Before the PR -> file:///path/to/file.js
// After the PR   -> file:////path/to/file.js

This in turn may affect module registry identity as the same module could be loaded twice in this way (if it were imported via import '///path/to/file.js' and import '/path/to/file.js' say).

It would be useful to discuss some of these cases further before landing there.

bmeck commented 4 years ago

I'd note that this does impact other areas like policies and whatever decisions we make should likely be documented and agreed upon across the whole project.