Handle TypeScript 4.5 new file extensions .mts and .cts (#11721)
* Handle .mts and .cts * Update integration tests * Add changelog
This commit is contained in:
1 parent
db0e9d228d
commit
fb7080f82d
3 files changed
+17
-6
No files matched your search
@@ -0,0 +1,7 @@
|
||||
#### Support TypeScript 4.5 (#11721 by @sosukesuzuki)
|
||||
|
||||
Support new TypeScript 4.5 features.
|
||||
|
||||
##### Handle `.mts` and `.cts`
|
||||
|
||||
Handle new file extensions `.mts` and `.cts`.
|
||||
@@ -67,11 +67,15 @@ const languages = [
|
||||
codemirrorMimeType: "text/jsx",
|
||||
color: undefined,
|
||||
})),
|
||||
createLanguage(require("linguist-languages/data/TypeScript.json"), () => ({
|
||||
since: "1.4.0",
|
||||
parsers: ["typescript", "babel-ts"],
|
||||
vscodeLanguageIds: ["typescript"],
|
||||
})),
|
||||
createLanguage(
|
||||
require("linguist-languages/data/TypeScript.json"),
|
||||
(data) => ({
|
||||
since: "1.4.0",
|
||||
parsers: ["typescript", "babel-ts"],
|
||||
vscodeLanguageIds: ["typescript"],
|
||||
extensions: [...data.extensions, ".mts", ".cts"],
|
||||
})
|
||||
),
|
||||
createLanguage(require("linguist-languages/data/TSX.json"), () => ({
|
||||
since: "1.4.0",
|
||||
parsers: ["typescript", "babel-ts"],
|
||||
|
||||
@@ -394,7 +394,7 @@ exports[`CLI --support-info (stdout) 1`] = `
|
||||
\\"codemirrorMimeType\\": \\"application/typescript\\",
|
||||
\\"codemirrorMode\\": \\"javascript\\",
|
||||
\\"color\\": \\"#2b7489\\",
|
||||
\\"extensions\\": [\\".ts\\"],
|
||||
\\"extensions\\": [\\".ts\\", \\".mts\\", \\".cts\\"],
|
||||
\\"interpreters\\": [\\"deno\\", \\"ts-node\\"],
|
||||
\\"linguistLanguageId\\": 378,
|
||||
\\"name\\": \\"TypeScript\\",
|
||||
|
||||
Reference in new issue
Block a user