mirror of
https://github.com/denoland/deno.git
synced 2024-12-24 08:09:08 -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
|
||||
# editor files
|
||||
.idea
|
||||
.vscode
|
||||
# export dir for gh-pages
|
||||
/gh-pages
|
||||
# temp benchmark data
|
||||
|
|
|
@ -162,6 +162,7 @@ class Compiler implements ts.LanguageServiceHost, ts.FormatDiagnosticsHost {
|
|||
// arguments
|
||||
private readonly _options: ts.CompilerOptions = {
|
||||
allowJs: true,
|
||||
allowNonTsExtensions: true,
|
||||
checkJs: true,
|
||||
esModuleInterop: true,
|
||||
module: ts.ModuleKind.ESNext,
|
||||
|
|
|
@ -266,11 +266,12 @@ export default function makeConfig(commandOptions) {
|
|||
"createLanguageService",
|
||||
"formatDiagnostics",
|
||||
"formatDiagnosticsWithColorAndContext",
|
||||
"version",
|
||||
"Extension",
|
||||
"ModuleKind",
|
||||
"ScriptKind",
|
||||
"ScriptSnapshot",
|
||||
"ScriptTarget",
|
||||
"version"
|
||||
"ScriptTarget"
|
||||
]
|
||||
}
|
||||
}),
|
||||
|
|
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