Skip to content

Commit d890aba

Browse files
johnfraneyhugovk
andauthored
pythongh-140942: Add MIME type for .cjs extension (python#140937)
Co-authored-by: Hugo van Kemenade <[email protected]>
1 parent 7211a34 commit d890aba

File tree

3 files changed

+4
-0
lines changed

3 files changed

+4
-0
lines changed

Doc/whatsnew/3.15.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -451,6 +451,7 @@ math
451451
mimetypes
452452
---------
453453

454+
* Add ``application/node`` MIME type for ``.cjs`` extension. (Contributed by John Franey in :gh:`140937`.)
454455
* Add ``application/toml``. (Contributed by Gil Forcada in :gh:`139959`.)
455456
* Rename ``application/x-texinfo`` to ``application/texinfo``.
456457
(Contributed by Charlie Lin in :gh:`140165`)

Lib/mimetypes.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -486,6 +486,7 @@ def _default_mime_types():
486486
'.wiz' : 'application/msword',
487487
'.nq' : 'application/n-quads',
488488
'.nt' : 'application/n-triples',
489+
'.cjs' : 'application/node',
489490
'.bin' : 'application/octet-stream',
490491
'.a' : 'application/octet-stream',
491492
'.dll' : 'application/octet-stream',
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
Add ``.cjs`` to :mod:`mimetypes` to give CommonJS modules a MIME type of
2+
``application/node``.

0 commit comments

Comments
 (0)