gh-140942: Add MIME type for .cjs extension (#140937)

Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
This commit is contained in:
John Franey 2025-11-11 10:33:56 -04:00 committed by GitHub
parent 7211a34fe1
commit d890aba748
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 4 additions and 0 deletions

View file

@ -451,6 +451,7 @@ math
mimetypes
---------
* Add ``application/node`` MIME type for ``.cjs`` extension. (Contributed by John Franey in :gh:`140937`.)
* Add ``application/toml``. (Contributed by Gil Forcada in :gh:`139959`.)
* Rename ``application/x-texinfo`` to ``application/texinfo``.
(Contributed by Charlie Lin in :gh:`140165`)

View file

@ -486,6 +486,7 @@ def _default_mime_types():
'.wiz' : 'application/msword',
'.nq' : 'application/n-quads',
'.nt' : 'application/n-triples',
'.cjs' : 'application/node',
'.bin' : 'application/octet-stream',
'.a' : 'application/octet-stream',
'.dll' : 'application/octet-stream',

View file

@ -0,0 +1,2 @@
Add ``.cjs`` to :mod:`mimetypes` to give CommonJS modules a MIME type of
``application/node``.