1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-11-25 15:29:32 -05:00

fix: ignore fileExists in tsc host (#7635)

Fixes #7630
This commit is contained in:
Kitson Kelly 2020-09-23 11:39:20 +10:00 committed by GitHub
parent 68fd7a927b
commit 751bb45a0a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 25 additions and 5 deletions

View file

@ -0,0 +1 @@
hello

View file

@ -2378,6 +2378,11 @@ itest!(fix_js_imports {
output: "fix_js_imports.ts.out",
});
itest!(fix_tsc_file_exists {
args: "run --quiet --reload tsc/test.js",
output: "fix_tsc_file_exists.out",
});
itest!(es_private_fields {
args: "run --quiet --reload es_private_fields.js",
output: "es_private_fields.js.out",

2
cli/tests/tsc/a.js Normal file
View file

@ -0,0 +1,2 @@
import { v4 } from "./d.ts";
export function a() {}

3
cli/tests/tsc/d.ts Normal file
View file

@ -0,0 +1,3 @@
export function v4() {
return "hello";
}

2
cli/tests/tsc/node_modules/b.js generated vendored Normal file
View file

@ -0,0 +1,2 @@
import c from "./c.js";
export { c };

1
cli/tests/tsc/node_modules/c.js generated vendored Normal file
View file

@ -0,0 +1 @@
export default function c() {}

4
cli/tests/tsc/test.js Normal file
View file

@ -0,0 +1,4 @@
import { a } from "./a.js";
import { c } from "./node_modules/b.js";
console.log("hello");

View file

@ -278,8 +278,9 @@ delete Object.prototype.__proto__;
/* TypeScript CompilerHost APIs */
fileExists(_fileName) {
return notImplemented();
fileExists(fileName) {
log(`compiler::host.fileExists("${fileName}")`);
return false;
}
getCanonicalFileName(fileName) {

View file

@ -66,13 +66,14 @@ def eslint():
":!:cli/tests/swc_syntax_error.ts",
":!:std/**/testdata/*",
":!:std/**/node_modules/*",
":!:cli/bench/node*.js",
":!:cli/compilers/wasm_wrap.js",
":!:cli/dts/**",
":!:cli/tests/encoding/**",
":!:cli/tests/error_syntax.js",
":!:cli/tests/lint/**",
":!:cli/tests/encoding/**",
":!:cli/dts/**",
":!:cli/tests/tsc/**",
":!:cli/tsc/*typescript.js",
":!:cli/bench/node*.js",
])
if source_files:
max_command_len = 30000