Subject: [Json] Add Extension to JS MIME

From: Bradley Meck <[email-masked]>
Date: Wed, 9 Aug 2017 08:34:33 -0500

Hiya!

I would like to ask about adding a new file extension to the IANA MIME
registry for `application/javascript`. It seems the IESG is in charge of
that mime per https://www.iana.org/assignments/media-types/
application/javascript .

The change request is to add `.mjs` as a known extension as Node.js merges
support for the new Module parse goal of JavaScript. Doing so as the PR is
merged seemed the best way to get people to update their MIME libraries in
a timely manner as well.

Let me know what I need to do to get this process started / if there is
some better place to ask.

Cheers,
Bradley

---

From: "Matthew A. Miller" <[email-masked]>
Date: Mon, 14 Aug 2017 11:36:55 -0600

On 17/08/09 07:34, Bradley Meck wrote:
> that mime
> per https://www.iana.org/assignments/media-types/application/javascript
> <https://www.iana.org/assignments/media-types/application/javascript> .
> 
> The change request is to add `.mjs` as a known extension as Node.js
> merges support for the new Module parse goal of JavaScript. Doing so as
> the PR is merged seemed the best way to get people to update their MIME
> libraries in a timely manner as well.
> 

Hello Bradley,

I think the right approach here is create an internet-draft upating RFC
4329, adding .mjs as one of the extensions for "application/javascript".
 That I-D would likely need to be [DISPATCH]ed, as there is no existing
WG  I can see that covers this.

For the document, at the very least it seems necessary to update the
ECMA-262 reference in addition to the updated IANA instructions.  I'm
not sure much of anything does need to be said about differences between
.mjs versus .js -- the content is still JavaScript, but hinting at
differences in module expectations.

The IANA considerations section itself, I don't know what the right
wording is in this case.  I think almost everything stays the same,
other than the file extension(s), and the published specification?

- m&m

Matthew A. Miller
< http://goo.gl/LM55L >

PS: Thanks to Adam Roach for confirming my thoughts, and suggesting some
places to look at.

[DISPATCH] - https://datatracker.ietf.org/wg/dispatch/about/

---

From: Bradley Meck <[email-masked]>
Date: Mon, 14 Aug 2017 13:00:09 -0500

Thanks, replies inline.

> WG  I can see that covers this.

I have never made/updated an RFC. Is there a tutorial on how to do this. I
don't know what I-D / [DISPATCH] means, it looks like a different WG? Do I
send a new email to their mailing list?

> differences in module expectations.

TC39 / ECMA262 has said that they are not in the business of the MIME in
https://github.com/tc39/ecma262/issues/322 . So there won't be any need to
change references to that standard.

> other than the file extension(s), and the published specification?

Yes, for the IANA, the only change is to add the file extension.

There could be a separate update since WHATWG treats text/javascript as the
default as per
https://html.spec.whatwg.org/multipage/scripting.html#prepare-a-script /
https://github.com/nodejs/node-eps/pull/61#issuecomment-321304962 .
However, I think that is a separate change.

> _______________________________________________
> json mailing list
> [email-masked]
> https://www.ietf.org/mailman/listinfo/json
>
>

---

From: Allen Wirfs-Brock <[email-masked]>
Date: Mon, 14 Aug 2017 11:31:09 -0700

> On Aug 14, 2017, at 11:00 AM, Bradley Meck <[email-masked]> wrote:
> 
> TC39 / ECMA262 has said that they are not in the business of the MIME in https://github.com/tc39/ecma262/issues/322 <https://github.com/tc39/ecma262/issues/322> . So there won't be any need to change references to that standard.

Actually the references (and some of the referencing text) probably should be updated given that 4329 says:

"The types defined in this document are applicable to scripts written in [JS15] and [ECMA], respectively, as well as to scripts written in   a compatible language or profile such as [EcmaCompact].

This document does not address scripts written in other languages. In particular, future versions of JavaScript, future editions of [ECMA], and extensions to [ECMA], such as [E4X], are not directly addressed.  This document may be updated to take other content into account.
“

and the reference [ECMA]] is specifically to ECMA-262, Edition 3.  Also [EcmaCompact] and [E4X] have been withdrawn as Ecma standards   [JS15] is very obsolete and a vendor specific document.

Given that ECMA-262 is not revised on a year scheduled, the [ECMA] reference should probably change to an undated reference.

Allen

---

From: "Matthew A. Miller" <[email-masked]>
Date: Mon, 14 Aug 2017 12:43:37 -0600

On 17/08/14 12:00, Bradley Meck wrote:
> I have never made/updated an RFC. Is there a tutorial on how to do this.
> I don't know what I-D / [DISPATCH] means, it looks like a different WG?
> Do I send a new email to their mailing list?
>  
> 

This will be a lot to unpack, and I'm absolutely sure will require
follow up.  You can ping me off-list and I will attempt to do so.

I would start with Markdown, either <
https://github.com/cabo/kramdown-rfc2629/ > or <
https://github.com/miekg/mmark >.  karmdown-rfc2629 has some decent
examples, and mmark has a doc describing its syntax.

There is an RFC that covers writing Internet-Drafts (from whence RFCs
come), which applies disirregardless of the source format: <
https://tools.ietf.org/html/rfc7322 >

More can be found here: < https://www.ietf.org/id-info/guidelines.html >

Regarding the terms I used:
* I-D ===> Internet Draft
* DISPATCH ==> https://datatracker.ietf.org/wg/dispatch/about/ : A
working group for determining where ART work ought to be done
* ART ==> Applications in Real-Time : A grouping within the IETF
(https://www.ietf.org/iesg/area.html)

> TC39 / ECMA262 has said that they are not in the business of the MIME
> in https://github.com/tc39/ecma262/issues/322 . So there won't be any
> need to change references to that standard.
>  
> 

I understand that TC39 does not see this as their responsibility, and
that's fine; this work is not asking anything of TC39 itself.

I do strongly recommend pointing to an edition of ECMA-262 that
describes EcmaScript/Javacript modules (e.g., Sixth -- or 2015 --
Edition).  Or better yet, whatever Allen says (-:

> There could be a separate update since WHATWG treats text/javascript as
> the default as per

In my opinion, if we're already opening this can o' worms for one, we
ought to consider all that are relevant.

- m&m

Matthew A. Miller

---

From: Adam Roach <[email-masked]>
Date: Mon, 14 Aug 2017 20:28:36 -0500

On 8/14/17 1:00 PM, Bradley Meck wrote:
> I have never made/updated an RFC. Is there a tutorial on how to do 
> this. I don't know what I-D / [DISPATCH] means, it looks like a 
> different WG? Do I send a new email to their mailing list?

For something as small as this, I'm not sure putting it through DISPATCH 
is quite the right path. There's no way we'd start a mini-WG for a 
document that simply performs IANA registration; there's no WG that this 
fits in; and the only other option is AD sponsorship.

I'm happy to sponsor this document. In terms of what a document would 
look like, I think this is a pretty good example of the level of 
complexity we're looking at:

https://tools.ietf.org/html/rfc5955

The first step is writing an internet-draft, and the easiest way to 
produce an internet-draft nowadays is using Carsten's kramdown tools:

https://github.com/cabo/kramdown-rfc2629

Let me know if you need any other pointers in getting started. I've 
touched base with Matt Miller, and he should be available to provide 
assistance with format and content as well.

/a

---

From: Adam Roach <[email-masked]>
Date: Tue, 15 Aug 2017 12:29:05 -0500

On 8/14/17 8:28 PM, Adam Roach wrote:
> For something as small as this, I'm not sure putting it through 
> DISPATCH is quite the right path. There's no way we'd start a mini-WG 
> for a document that simply performs IANA registration; there's no WG 
> that this fits in; and the only other option is AD sponsorship. 

Thanks for tagging me on the draft-in-progress[1]. This looks like 
really good material; however, I'll note that its scope is somewhat 
broader than the original description led me to believe it would be. At 
the same time, Ben points out to me that DISPATCH actually does have a 
provision in its charter that allows it to adopt administrative 
documents, such as IANA registrations.

Based on the slightly larger scope, I'd like input from the ART 
(Applications and Realtime) community at large on the issues that extend 
beyond the simple filename extension; and, in particular:

 1. The question of whether modules need their own MIME type (e.g.,
    application/javascript+module) or MIME type parameter (e.g.,
    application/javascript;goal=module)

 2. Formally changing the IANA status of text/javascript from "OBSOLETE"
    to "COMMON."

So I think the right path forward, now that I understand the likely 
scope of the final document, would be:

 1. Get the document in a shape you're happy with, and publish it as a
    -00 draft. (I believe Matt will be submitting a PR in the near
    future to help with some simple structural issues; wait for those.)

 2. Send an email to the DISPATCH mailing list
    (https://www.ietf.org/mailman/listinfo/dispatch) with a pointer to
    the document, asking for the WG to consider adopting it under its
    "simple administrative documents" clause.

Let me know if you have any questions or concerns.

/a
____
[1] https://github.com/bmeck/I-D/tree/master/javascript-mjs

---

From: "Matthew A. Miller" <[email-masked]>
Date: Tue, 15 Aug 2017 14:00:41 -0600

> Let me know if you have any questions or concerns.

I broke them into 2 PRs, both now merged:

* [MERGED] #3 "fixup xrefs and expand abstract and intro" <
https://github.com/bmeck/I-D/pull/3 >
* [MERGED] #4 "fixing up formatting" < https://github.com/bmeck/I-D/pull/4 >

I think -00 is good to go.  There are some questions/concerns in the
issues, but I don't believe any of them must be addressed before this
initial publishing.

- m&m

Matthew A. Miller