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:
parent
2241049c34
commit
fe0ceae543
10 changed files with 14 additions and 2 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -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
|
||||||
|
|
|
@ -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,
|
||||||
|
|
|
@ -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"
|
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
}),
|
}),
|
||||||
|
|
1
tests/023_no_ext_with_mime
Normal file
1
tests/023_no_ext_with_mime
Normal file
|
@ -0,0 +1 @@
|
||||||
|
console.log("HELLO");
|
1
tests/023_no_ext_with_mime.mime
Normal file
1
tests/023_no_ext_with_mime.mime
Normal file
|
@ -0,0 +1 @@
|
||||||
|
application/javascript
|
1
tests/023_no_ext_with_mime.out
Normal file
1
tests/023_no_ext_with_mime.out
Normal file
|
@ -0,0 +1 @@
|
||||||
|
HELLO
|
2
tests/023_no_ext_with_mime.test
Normal file
2
tests/023_no_ext_with_mime.test
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
args: tests/023_no_ext_with_mime --reload --recompile
|
||||||
|
output: tests/023_no_ext_with_mime.out
|
2
tests/024_import_no_ext_with_mime.test
Normal file
2
tests/024_import_no_ext_with_mime.test
Normal 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
|
1
tests/024_import_no_ext_with_mime.ts
Normal file
1
tests/024_import_no_ext_with_mime.ts
Normal file
|
@ -0,0 +1 @@
|
||||||
|
import "./023_no_ext_with_mime";
|
1
tests/024_import_no_ext_with_mime.ts.out
Normal file
1
tests/024_import_no_ext_with_mime.ts.out
Normal file
|
@ -0,0 +1 @@
|
||||||
|
HELLO
|
Loading…
Reference in a new issue