resolve icon indicating copy to clipboard operation
resolve copied to clipboard

central issue for "default extensions"

Open ljharb opened this issue 7 years ago • 12 comments

This issue encompasses anything that deals with "what the default extensions are/should be".

  • #19 points out that .json is not included in the defaults.
  • #137 points out that require.extensions is not used as the defaults
  • https://github.com/substack/tape/issues/395 is related, but can be addressed with changes in tape, unrelated to whatever resolve does.
  • (related but addressed: #150, #127, #90, #134)

There's some PRs out that are hoping to change the defaults:

  • #138 dynamically reads require.extensions on every call
  • #145 replaces the default of .js with a hardcoded list of the default require.extensions value

I'm opening this so I can close the other issues, and so any further discussion can happen here.

Please try to read all of the previous discussions before commenting.

ljharb avatar Jun 16 '18 03:06 ljharb

@ljharb well done! I'm subscribed and have my eyes peeled. Seems like as I predicted last year there will be more eyeballs looking in the require.extensions direction.

This is a great synopsis but even myself remember you had made a couple suggestions. I wonder what they are currently (especially with the new .mjs extension add we've been working on with IETF. This way I can see where I can help and take some concerns off your plate.

Thoughts?

snuggs avatar Jul 11 '18 02:07 snuggs

As it relates to .mjs, resolve will absolutely add it to the default extension list the instant node ships it unflagged - but not before (that will also be when it's present in require.extensions in node).

ljharb avatar Jul 11 '18 05:07 ljharb

@ljharb sounds like a plan! Any ref we can use to stick in the description / comment to watchdog?

Seems like you know better than me. I've merely been judging off PTSD of the community and in the classrooms. :-|

FWIW I'm totally against .mjs and believe it creates some unnecessary social fractures within the ecosystem but that's just my opinion not the community at large's.

snuggs avatar Jul 11 '18 12:07 snuggs

A file extension is strictly necessary, since Module and Script have distinct (and ambiguous) parsing goals, and a file extension is the proper and sole way to disambiguate textual parsing goals - so this result was inevitable once the choice of two parse goals was made in TC39 back in 2013 or so.

ljharb avatar Jul 11 '18 21:07 ljharb

@ljharb I knew this already. Not arguing file extensions. Arguing the community using the extension to mock the (dead) king of pop. Like I said...as an African American this is some bullshit. But I digress. Because the community always preaches diversity...as long as someone is making money off diversity at a conference or on a blog post touting "inclusivity". Apologize if you don't see why I would have an issue with this.

https://medium.com/dailyjs/es6-modules-node-js-and-the-michael-jackson-solution-828dc244b8b https://github.com/tc39/agendas/issues/322

snuggs avatar Jul 11 '18 22:07 snuggs

I don't refer to mjs as anything related to "michael jackson", nor do i think it's mocking in any way - if anything, it's a reference to how people immediately think of him when they see "MJ" because he's so prolific - so I think you're looking a bit too hard for a reason to be upset.

ljharb avatar Jul 12 '18 07:07 ljharb

@ljharb did anyone ask MJ about this? I'm not "looking for upset". We definitely have better things to do with our day. You may but I don't get paid for this. However, you are free to have your opinion. Others in the community who look like me feel the same way. Perhaps we are ALL over exaggerating. ¯_(ツ)_/¯ You may be right. I'll let them know your thoughts. 👍 I never ask anyone to change their mind. Only to have empathy without immediate dismissal.

snuggs avatar Jul 12 '18 14:07 snuggs

He’s a public figure; he wouldn’t have the right nor the ability to stop people talking about him in a non-libelous way.

ljharb avatar Jul 12 '18 14:07 ljharb

@ljharb there are laws set up against usage of name and likeliness of celebrities here in America. We can do it. Still doesn't make it right. And also a very slippery slope. Like i said, empathy without dismissal. However we are getting a tad off topic. I shall leave you be sir. Just here to help you.

snuggs avatar Jul 12 '18 15:07 snuggs

An individual’s name isn’t culture, and referencing it (solely because of it sharing first letters in common) is not appropriation, cultural or otherwise.

ljharb avatar Jul 12 '18 15:07 ljharb

@ljharb your opinion. And you are free to have this. I mentioned this to you already. But opinions aren't always facts and this conversation has been going on for a while now outside of this comment thread.

As long as you call it what it is "Module JavaScript" we see eye to eye. I think we both can (and should) agree on this. And that's definitely on topic sir. If that isn't our focus, we are introducing ulterior motives.

snuggs avatar Jul 12 '18 15:07 snuggs

If you keep bringing up your complaint, here or anywhere, you make it on topic. And no, it’s not just opinion - merely referencing an individual’s name is not cultural appropriation, objectively, especially when no aspects of the individual are being referenced, literally or metaphorically - and when you claim it does, you weak the case against appropriation for us all.

ljharb avatar Jul 12 '18 15:07 ljharb