Repository navigation
Conversation
Extend .js/.cjs filename handling so .mjs node entry points resolve the matching .html template and module name.
|
|
sankalpsthakur
marked this pull request as ready for review
September 1, 2026 21:40
sankalpsthakur
marked this pull request as draft
September 2, 2026 00:23
sankalpsthakur
force-pushed
the
cursor/mjs-node-template-derivation-04ae
branch
from
September 3, 2026 20:53
6d9e31f to
6ce127c
Compare
sankalpsthakur
marked this pull request as ready for review
September 12, 2026 08:52
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Proposed changes
loadNodeConfigstill derived the editor template with/\.c?js$/, so a*.mjsentry point leftnode.templatepointing at the JavaScript file. The editor then never sawdata-template-name, and the node was missing from the palette.This extends that substitution (and the matching local filesystem scan/name derivation) to
/\.[cm]?js$/, so.mjsis handled like.jsand.cjs.Fixes #5897.
Checklist
npm run testto verify the unit tests passValidation
npm run teston the fork passes on Node 22 and 24 at6ce127cc: 2,847 passing and 60 pending tests on each, including the new.mjsregression. The command includes build, dependency verification, lint and coverage tests. EasyCLA passes.Codex assisted with this description and the isolated validation workflow.