1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2025-01-11 16:42:21 -05:00

Fix behavior for extensionless files with .mime file (#1779)

This commit is contained in:
Kevin (Kun) "Kassimo" Qian 2019-02-15 08:05:29 -08:00 committed by Ryan Dahl
parent 2241049c34
commit fe0ceae543
10 changed files with 14 additions and 2 deletions

1
.gitignore vendored
View file

@ -9,6 +9,7 @@ yarn.lock
node_modules node_modules
# editor files # editor files
.idea .idea
.vscode
# export dir for gh-pages # export dir for gh-pages
/gh-pages /gh-pages
# temp benchmark data # temp benchmark data

View file

@ -162,6 +162,7 @@ class Compiler implements ts.LanguageServiceHost, ts.FormatDiagnosticsHost {
// arguments // arguments
private readonly _options: ts.CompilerOptions = { private readonly _options: ts.CompilerOptions = {
allowJs: true, allowJs: true,
allowNonTsExtensions: true,
checkJs: true, checkJs: true,
esModuleInterop: true, esModuleInterop: true,
module: ts.ModuleKind.ESNext, module: ts.ModuleKind.ESNext,

View file

@ -266,11 +266,12 @@ export default function makeConfig(commandOptions) {
"createLanguageService", "createLanguageService",
"formatDiagnostics", "formatDiagnostics",
"formatDiagnosticsWithColorAndContext", "formatDiagnosticsWithColorAndContext",
"version",
"Extension",
"ModuleKind", "ModuleKind",
"ScriptKind", "ScriptKind",
"ScriptSnapshot", "ScriptSnapshot",
"ScriptTarget", "ScriptTarget"
"version"
] ]
} }
}), }),

View file

@ -0,0 +1 @@
console.log("HELLO");

View file

@ -0,0 +1 @@
application/javascript

View file

@ -0,0 +1 @@
HELLO

View file

@ -0,0 +1,2 @@
args: tests/023_no_ext_with_mime --reload --recompile
output: tests/023_no_ext_with_mime.out

View file

@ -0,0 +1,2 @@
args: tests/024_import_no_ext_with_mime.ts --reload --recompile
output: tests/024_import_no_ext_with_mime.ts.out

View file

@ -0,0 +1 @@
import "./023_no_ext_with_mime";

View file

@ -0,0 +1 @@
HELLO