Skip to content

Commit

Permalink
Add extensions .js and .mjs to text/javascript
Browse files Browse the repository at this point in the history
closes #194
  • Loading branch information
dougwilson committed May 20, 2022
1 parent c570664 commit 913be07
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 2 deletions.
1 change: 1 addition & 0 deletions HISTORY.md
@@ -1,6 +1,7 @@
unreleased
==========

* Add extensions `.js` and `.mjs` to `text/javascript`
* Add extensions from IANA for more MIME types
* Add new upstream MIME types
* Fix extensions for `text/markdown` to match IANA
Expand Down
3 changes: 2 additions & 1 deletion db.json
Expand Up @@ -7859,7 +7859,8 @@
},
"text/javascript": {
"source": "iana",
"compressible": true
"compressible": true,
"extensions": ["js","mjs"]
},
"text/jcr-cnd": {
"source": "iana"
Expand Down
2 changes: 1 addition & 1 deletion scripts/fetch-iana.js
Expand Up @@ -46,7 +46,7 @@ co(function * () {
get('message', { extensions: true }),
get('model', { extensions: true }),
get('multipart'),
get('text', { extensions: /\/(?:markdown|spdx|turtle|vnd\.familysearch\.gedcom|vtt)$/ }),
get('text', { extensions: /\/(?:javascript|markdown|spdx|turtle|vnd\.familysearch\.gedcom|vtt)$/ }),
get('video', { extensions: /\/iso\.segment$/ })
]

Expand Down
1 change: 1 addition & 0 deletions src/iana-types.json
Expand Up @@ -9689,6 +9689,7 @@
]
},
"text/javascript": {
"extensions": ["js","mjs"],
"sources": [
"https://tools.ietf.org/rfc/rfc9239.txt",
"https://www.iana.org/assignments/media-types/text/javascript"
Expand Down

0 comments on commit 913be07

Please sign in to comment.