]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
gh-140942: Add MIME type for .cjs extension (#140937)
authorJohn Franey <1728528+johnfraney@users.noreply.github.com>
Tue, 11 Nov 2025 14:33:56 +0000 (10:33 -0400)
committerGitHub <noreply@github.com>
Tue, 11 Nov 2025 14:33:56 +0000 (14:33 +0000)
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
Doc/whatsnew/3.15.rst
Lib/mimetypes.py
Misc/NEWS.d/next/Core_and_Builtins/2025-11-04-12-18-06.gh-issue-140942.GYns6n.rst [new file with mode: 0644]

index 1ba394a19674039133ef32942c2d05722cbdf102..ef18d36e4d474831504addd2911142c6e263d6a6 100644 (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`)
index 48a9f430d45262d765f7bb739d31ce50187ef545..d6896fc4042cb4cde7896ff96adef5b2dc0772da 100644 (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',
diff --git a/Misc/NEWS.d/next/Core_and_Builtins/2025-11-04-12-18-06.gh-issue-140942.GYns6n.rst b/Misc/NEWS.d/next/Core_and_Builtins/2025-11-04-12-18-06.gh-issue-140942.GYns6n.rst
new file mode 100644 (file)
index 0000000..20cfeca
--- /dev/null
@@ -0,0 +1,2 @@
+Add ``.cjs`` to :mod:`mimetypes` to give CommonJS modules a MIME type of
+``application/node``.