Skip to content

Expanding list of recognized JavaScript and TypeScript extensions#9427

Open
jtulach wants to merge 1 commit into
apache:masterfrom
jtulach:CommonAndModuleScriptExtensions
Open

Expanding list of recognized JavaScript and TypeScript extensions#9427
jtulach wants to merge 1 commit into
apache:masterfrom
jtulach:CommonAndModuleScriptExtensions

Conversation

@jtulach
Copy link
Copy Markdown
Contributor

@jtulach jtulach commented Jun 5, 2026

While working with modern JavaScript I noticed increased presence of files with .mjs and .cjs extensions. The leading m signals to the JavaScript engine that the file is supposed to be treated as ECMAScript module. The leading c signals CommonJS module. The same pattern seems to emerge in TypeScript as well. Let NetBeans extensions for JavaScript and TypeScript be expanded to cover these widely used extensions!

Previously I always expanded the list of extensions manually in Tools/Options, but given how frequent they have become I believe enlisting them by default would improve the UX.

@jtulach jtulach self-assigned this Jun 5, 2026
@jtulach jtulach added JavaScript [ci] enable web job and extra JavaScript tests (webcommon/javascript2.editor) TypeScript [ci] enable web job HTML [ci] enable web job web [ci] enable web job labels Jun 5, 2026
Copy link
Copy Markdown
Contributor

@matthiasblaesing matthiasblaesing left a comment

Choose a reason for hiding this comment

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

The additions in general make sense to me. The extension squatting is worrisome, but that is is different discussion.

Two extension jumped my eye:

  • es6: I assume this shall say, that this is ECMA Script 6 code. Is this really commonly used?
  • pac: I assume these are proxy autoconfiguration scripts. Are these normally named like this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

HTML [ci] enable web job JavaScript [ci] enable web job and extra JavaScript tests (webcommon/javascript2.editor) TypeScript [ci] enable web job web [ci] enable web job

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants