Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add .cjs to known JavaScript file extensions #85460

Merged
merged 1 commit into from Nov 26, 2019

Conversation

xiaoxiangmoe
Copy link
Contributor

Add .cjs to known JavaScript file extensions.

Related:

@msftclas
Copy link

msftclas commented Nov 23, 2019

CLA assistant check
All CLA requirements met.

@@ -957,7 +957,7 @@
]
},
"fenced_code_block_js": {
"begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(js|jsx|javascript|es6|mjs|\\{\\.js.+?\\})((\\s+|:|\\{)[^`~]*)?$)",
"begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(js|jsx|javascript|es6|mjs|cjs|\\{\\.js.+?\\})((\\s+|:|\\{)[^`~]*)?$)",
Copy link
Contributor

Choose a reason for hiding this comment

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

Note that this grammar is generated from https://github.com/microsoft/vscode-markdown-tm-grammar

Make sure this is also updated upstream or else this change will be overwritten when we pull in the next update to this grammar

@@ -33,7 +33,7 @@ function patchGrammar(grammar) {

function adaptToJavaScript(grammar, replacementScope) {
grammar.name = 'JavaScript (with React support)';
grammar.fileTypes = ['.js', '.jsx', '.es6', '.mjs'];
grammar.fileTypes = ['.js', '.jsx', '.es6', '.mjs', '.cjs'];
Copy link
Contributor

Choose a reason for hiding this comment

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

Make sure to re-build the grammar after changing the build script:

cd extensions/typescript-basics
npm run update-grammars

@mjbvz
Copy link
Contributor

mjbvz commented Nov 26, 2019

Can you please create an issue for this as well. This helps us track what is delivered each milestone

@mjbvz mjbvz added this to the November 2019 milestone Nov 26, 2019
@mjbvz mjbvz merged commit 352d641 into microsoft:master Nov 26, 2019
@mjbvz
Copy link
Contributor

mjbvz commented Nov 26, 2019

Thanks!

@github-actions github-actions bot locked and limited conversation to collaborators Mar 27, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants