From c14436a424449d845a769a70ca7bc3d313201482 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bartek=20Iwa=C5=84czuk?= Date: Wed, 9 Sep 2020 13:37:22 +0200 Subject: fix(tsc): config resolution using relative paths (#7392) --- cli/tsc/99_main_compiler.js | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) (limited to 'cli/tsc') diff --git a/cli/tsc/99_main_compiler.js b/cli/tsc/99_main_compiler.js index a2e127508..895c6e846 100644 --- a/cli/tsc/99_main_compiler.js +++ b/cli/tsc/99_main_compiler.js @@ -299,6 +299,7 @@ delete Object.prototype.__proto__; // it makes sense to use the same scheme here. const ASSETS = "asset://"; const OUT_DIR = "deno://"; + const CACHE = "cache:///"; // This constant is passed to compiler settings when // doing incremental compiles. Contents of this // file are passed back to Rust and saved to $DENO_DIR. @@ -382,13 +383,10 @@ delete Object.prototype.__proto__; const RESOLVED_SPECIFIER_CACHE = new Map(); function parseCompilerOptions(compilerOptions) { - // TODO(bartlomieju): using `/` and `/tsconfig.json` because - // otherwise TSC complains that some paths are relative - // and some are absolute const { options, errors } = ts.convertCompilerOptionsFromJson( compilerOptions, - "/", - "/tsconfig.json", + "", + "tsconfig.json", ); return { options, @@ -491,7 +489,7 @@ delete Object.prototype.__proto__; } getCurrentDirectory() { - return ""; + return CACHE; } getDefaultLibFileName(_options) { @@ -1333,7 +1331,6 @@ delete Object.prototype.__proto__; target, createRuntimeCompileWriteFile(state), ); - const program = ts.createProgram({ rootNames, options: host.getCompilationSettings(), -- cgit v1.2.3