mime-types / mime-types-data

MIME Type registry data
Other
46 stars 31 forks source link

JavaScript files now prefer application/ecmascript? #19

Closed nbibler closed 5 years ago

nbibler commented 6 years ago

It looks like something changed between 3.2018.0812 and 3.2016.0521 (perhaps the data and tooling update from 10 days ago) which changed the priority and contents of mime types for JavaScript files.

Previously in the 3.2016.0521 release, .js files were identified as application/javascript through mime-types:

>> MIME::Types.type_for('test.js')
=> [#<MIME::Type: application/javascript>, #<MIME::Type: text/javascript>, #<MIME::Type: application/x-javascript>]

In the subsequent 3.2018.0812 release, they're being identified as application/ecmascript:

>> MIME::Types.type_for('test.js')
=> [#<MIME::Type: application/ecmascript>, #<MIME::Type: application/javascript>, #<MIME::Type: text/ecmascript>, #<MIME::Type: text/javascript>, #<MIME::Type: application/x-javascript>]

Was this intentional? Or am I doing something wrong?

halostatue commented 6 years ago

There are two different changes that went live recently. This is probably more related to mime-types/ruby-mime-types#132 which changed how some of the priority searching is performed. At some point in the past, I’m sure that someone did a deliberate assignment of .js to application/ecmascript despite what the IANA assignment block says (the tooling for this data doesn’t currently read the assignment pages because they are semi-structured at the best of times).

halostatue commented 5 years ago

This will be resolved with today’s release, 3.2019.0331 as .js is being removed from application/ecmascript per #20.