未验证 提交 751bb45a 编写于 作者: K Kitson Kelly 提交者: GitHub

fix: ignore fileExists in tsc host (#7635)

Fixes #7630
上级 68fd7a92
......@@ -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",
......
import { v4 } from "./d.ts";
export function a() {}
export function v4() {
return "hello";
}
import c from "./c.js";
export { c };
export default function c() {}
import { a } from "./a.js";
import { c } from "./node_modules/b.js";
console.log("hello");
......@@ -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) {
......
......@@ -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
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册