diff --git a/src/compiler/commandLineParser.ts b/src/compiler/commandLineParser.ts index 8d13b49ace5..72fdb2167c5 100644 --- a/src/compiler/commandLineParser.ts +++ b/src/compiler/commandLineParser.ts @@ -311,6 +311,16 @@ namespace ts { isFilePath: true } }, + { + name: "librarySearchPaths", + type: "list", + isTSConfigOnly: true, + element: { + name: "librarySearchPaths", + type: "string", + isFilePath: true + } + }, { name: "traceModuleResolution", type: "boolean", @@ -638,6 +648,7 @@ namespace ts { const compilerOptions: CompilerOptions = convertCompilerOptionsFromJsonWorker(json["compilerOptions"], basePath, errors, configFileName); const options = extend(existingOptions, compilerOptions); const typingOptions: TypingOptions = convertTypingOptionsFromJsonWorker(json["typingOptions"], basePath, errors, configFileName); + options.configFilePath = configFileName; const fileNames = getFileNames(errors); diff --git a/src/compiler/diagnosticMessages.json b/src/compiler/diagnosticMessages.json index 45103bde278..e7c05aa0629 100644 --- a/src/compiler/diagnosticMessages.json +++ b/src/compiler/diagnosticMessages.json @@ -2159,7 +2159,7 @@ "category": "Error", "code": 4082 }, - "Conflicting library definitions for '{0}' found at '{1}' and '{2}'. Copy the correct file to a local typings folder to resolve this conflict.": { + "Conflicting library definitions for '{0}' found at '{1}' and '{2}'. Copy the correct file to the 'typings' folder to resolve this conflict.": { "category": "Message", "code": 4090 }, diff --git a/src/compiler/program.ts b/src/compiler/program.ts index 9b2fc92bc7e..8eb6abf7cd5 100644 --- a/src/compiler/program.ts +++ b/src/compiler/program.ts @@ -15,7 +15,7 @@ namespace ts { const defaultLibrarySearchPaths = [ "typings/", "node_modules/", - "node_modules/@types/", + "node_modules/@typings/", ]; export const version = "1.9.0"; @@ -1597,7 +1597,7 @@ namespace ts { const otherFileText = host.readFile(secondaryResult); if (otherFileText !== getSourceFile(previousResolution.resolvedFileName).text) { fileProcessingDiagnostics.add(createFileDiagnostic(file, ref.pos, ref.end - ref.pos, - Diagnostics.Conflicting_library_definitions_for_0_found_at_1_and_2_Copy_the_correct_file_to_a_local_typings_folder_to_resolve_this_conflict, + Diagnostics.Conflicting_library_definitions_for_0_found_at_1_and_2_Copy_the_correct_file_to_the_typings_folder_to_resolve_this_conflict, ref.fileName, secondaryResult, previousResolution.resolvedFileName)); diff --git a/src/compiler/tsc.ts b/src/compiler/tsc.ts index e70e28bdf1c..b88dea9d96b 100644 --- a/src/compiler/tsc.ts +++ b/src/compiler/tsc.ts @@ -390,7 +390,6 @@ namespace ts { reportDiagnostic(createCompilerDiagnostic(Diagnostics.The_current_host_does_not_support_the_0_option, "--watch"), /* compilerHost */ undefined); sys.exit(ExitStatus.DiagnosticsPresent_OutputsSkipped); } - configParseResult.options.configFilePath = configFileName as Path; return configParseResult; }