zenparsing / node-default-module-proposal

A Modest Proposal for ES Modules in Node
36 stars 5 forks source link

Separating this spec from extension handling and directory lookups #16

Open guybedford opened 6 years ago

guybedford commented 6 years ago

The discussion in https://github.com/zenparsing/node-default-module-proposal/issues/15 is actually a general discussion that applies to the ES resolver regardless of this spec.

I'm wondering if perhaps we shouldn't separate this specification from such an "extension removal in lookups" specification to simplify the approval process to be more modular.

For example, it could be easy to attack this spec if someone feels default extensions are important, when in fact it is an unrelated concern.

@zenparsing if you're open to it, my suggestion would be to remove all mentions of skipping extensions, and focus on instead of comprehensively specifying the resolver, to comprehensively specify the parts relevant for this proposal.

We could then potentially include a short section detailing how this spec might combine with other flavours of resolution decisions (mjs, default extensions, directory indexes etc).

zenparsing commented 6 years ago

I agree that we should probably leave the file extension aspect out of the core proposal. I'm less certain of pulling out directory lookups though. Would you mind updating the PR to only remove the file extension aspect for now?