GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — gh-140942: Add MIME type for .cjs extension by johnfraney · Pull Request #140937 · python/cpython

Conversation

@johnfraney

@johnfraney johnfraney commented Nov 3, 2025 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

Updates MIME types with .cjs type of application/node for CommonJS modules. See here for more information: https://www.iana.org/assignments/media-types/application/node

Fixes #140942

  • Issue: Add .cjs to mimetypes #140942

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@johnfraney
johnfraney requested a review from a team as a code owner November 3, 2025 08:51
@python-cla-bot

python-cla-bot Bot commented Nov 3, 2025 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown

All commit authors signed the Contributor License Agreement.

CLA signed

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@bedevere-app bedevere-app Bot added the awaiting review label Nov 3, 2025
@bedevere-app

This comment was marked as resolved.

Sign in to view
1 similar comment
@bedevere-app

This comment was marked as resolved.

Sign in to view
@johnfraney
johnfraney force-pushed the patch-1 branch from 141d417 to ae22ccb Compare November 3, 2025 10:29
@bedevere-app

This comment was marked as resolved.

Sign in to view
@johnfraney johnfraney changed the title Add support for .cjs mimetype gh-140942: Add support for .cjs mimetype Nov 3, 2025
@bedevere-app bedevere-app Bot mentioned this pull request Nov 3, 2025
Add .cjs to mimetypes #140942
Closed
StanFromIreland
StanFromIreland requested changes Nov 3, 2025
View reviewed changes

@StanFromIreland StanFromIreland left a comment

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I do not think this change is correct, it is not officially registered with IANA as required.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread Lib/mimetypes.py Resolved

Uh oh!

There was an error while loading. Please reload this page.

@bedevere-app bedevere-app Bot added awaiting core review and removed awaiting review labels Nov 3, 2025
@johnfraney
johnfraney force-pushed the patch-1 branch from 4880a26 to 9b16e1b Compare November 4, 2025 05:18
@johnfraney

johnfraney commented Nov 4, 2025

Copy link
Copy Markdown
Contributor Author

I do not think this change is correct, it is not officially registered with IANA as required.

Thanks for the review, @StanFromIreland! I updated this PR to add the extension to common_types like you suggested

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@johnfraney
johnfraney force-pushed the patch-1 branch from 9b16e1b to e591a46 Compare November 4, 2025 05:19
@johnfraney johnfraney changed the title gh-140942: Add support for .cjs mimetype gh-140942: Add mimetype to common_types for .cjs extension Nov 4, 2025
@johnfraney
johnfraney requested a review from StanFromIreland November 4, 2025 06:42
@johnfraney
johnfraney force-pushed the patch-1 branch from e591a46 to 2ba7fc6 Compare November 5, 2025 03:47
@hugovk

hugovk commented Nov 5, 2025

Copy link
Copy Markdown
Member

IANA says .cjs is an extension for the application/node type for CommonJS modules, not text/javascript:

https://www.iana.org/assignments/media-types/application/node

See here for more information: nodejs.org/api/modules.html#enabling

And this makes no mention of the MIME type.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@johnfraney
johnfraney force-pushed the patch-1 branch from 2ba7fc6 to 7a1cdf4 Compare November 7, 2025 06:37
@johnfraney johnfraney changed the title gh-140942: Add mimetype to common_types for .cjs extension gh-140942: Add mimetype for .cjs extension Nov 7, 2025
@hugovk

hugovk commented Nov 7, 2025

Copy link
Copy Markdown
Member

Thanks for the update. And because this is actually registered with IANA, we can put it in the regular list.

Please also don't force push in this repo, it makes it a bit harder to review changes. We squash merge anyway at the end.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@johnfraney

johnfraney commented Nov 7, 2025

Copy link
Copy Markdown
Contributor Author

@hugovk That's a good point about force-pushing. Thank you for your help!

hugovk reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

hugovk
hugovk reviewed Nov 7, 2025
View reviewed changes

@hugovk hugovk left a comment

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add to the first in the mimetypes list at https://docs.python.org/3.15/whatsnew/3.15.html#mimetypes

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

johnfraney reacted with thumbs up emoji
All reactions
  • 👍 1 reaction
Comment thread Misc/NEWS.d/next/Core_and_Builtins/2025-11-04-12-18-06.gh-issue-140942.GYns6n.rst Resolved

Uh oh!

There was an error while loading. Please reload this page.

johnfraney and others added 4 commits November 8, 2025 03:47
@johnfraney
Add .cjs mimetype to common_types
00558b5
Adds .cjs mimetype of `text/javascript` for CommonJS modules to
common_types. See here for more information:
https://nodejs.org/api/modules.html#enabling
@johnfraney
fix: move .cjs to default mimetypes
71266e9
@johnfraney
chore: update news entry
03c1f8a
@johnfraney @hugovk
Update Misc/NEWS.d/next/Core_and_Builtins/2025-11-04-12-18-06.gh-issu…
8691cee
…e-140942.GYns6n.rst


Add changes to news entry from code review

Co-authored-by: Hugo van Kemenade <[email protected]>
@johnfraney
johnfraney force-pushed the patch-1 branch from de90881 to 8691cee Compare November 8, 2025 07:47
@johnfraney johnfraney changed the title gh-140942: Add mimetype for .cjs extension gh-140942: Add MIME type for .cjs extension Nov 10, 2025
@johnfraney
johnfraney requested a review from hugovk November 10, 2025 04:30
@hugovk

hugovk commented Nov 11, 2025

Copy link
Copy Markdown
Member

Reminder about these things :)

Please add to the first in the mimetypes list at docs.python.org/3.15/whatsnew/3.15.html#mimetypes

Please also don't force push in this repo, it makes it a bit harder to review changes. We squash merge anyway at the end.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@johnfraney
chore: update whatsnew docs
956763c
@johnfraney
johnfraney requested a review from AA-Turner as a code owner November 11, 2025 14:03
@johnfraney

johnfraney commented Nov 11, 2025

Copy link
Copy Markdown
Contributor Author

@hugovk Oh, weird, I think my local repo had an issue because I checked out with a depth of 1 and git fetch wasn't working. I've got that sorted now and can push from my local branch normally. Thanks for your patience!

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

hugovk
hugovk approved these changes Nov 11, 2025
View reviewed changes

@hugovk hugovk left a comment

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@bedevere-app bedevere-app Bot added awaiting merge and removed awaiting core review labels Nov 11, 2025
@hugovk
hugovk enabled auto-merge (squash) November 11, 2025 14:28
@hugovk
hugovk merged commit d890aba into python:main Nov 11, 2025
50 checks passed

Uh oh!

There was an error while loading. Please reload this page.

@bedevere-app bedevere-app Bot removed the awaiting merge label Nov 11, 2025
StanFromIreland pushed a commit to StanFromIreland/cpython that referenced this pull request Dec 6, 2025
@johnfraney @hugovk @StanFromIreland
pythongh-140942: Add MIME type for .cjs extension (python#140937)
1cf989e
Co-authored-by: Hugo van Kemenade <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@hugovk hugovk hugovk approved these changes
@StanFromIreland StanFromIreland Awaiting requested review from StanFromIreland
@AA-Turner AA-Turner Awaiting requested review from AA-Turner AA-Turner is a code owner

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Add .cjs to mimetypes

Uh oh!

There was an error while loading. Please reload this page.

3 participants

@johnfraney @hugovk @StanFromIreland
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.