mirror of
https://github.com/microsoft/TypeScript.git
synced 2025-11-18 17:21:48 +00:00
Dont open composite projects to determine if script info is part of project (#59688)
This commit is contained in:
@@ -3250,13 +3250,25 @@ function shouldReportNoInputFiles(fileNames: string[], canJsonReportNoInutFiles:
|
||||
return fileNames.length === 0 && canJsonReportNoInutFiles && (!resolutionStack || resolutionStack.length === 0);
|
||||
}
|
||||
|
||||
/** @internal */
|
||||
export function isSolutionConfig(config: ParsedCommandLine): boolean {
|
||||
return !config.fileNames.length &&
|
||||
hasProperty(config.raw, "references");
|
||||
}
|
||||
|
||||
/** @internal */
|
||||
export function canJsonReportNoInputFiles(raw: any): boolean {
|
||||
return !hasProperty(raw, "files") && !hasProperty(raw, "references");
|
||||
}
|
||||
|
||||
/** @internal */
|
||||
export function updateErrorForNoInputFiles(fileNames: string[], configFileName: string, configFileSpecs: ConfigFileSpecs, configParseDiagnostics: Diagnostic[], canJsonReportNoInutFiles: boolean): boolean {
|
||||
export function updateErrorForNoInputFiles(
|
||||
fileNames: string[],
|
||||
configFileName: string,
|
||||
configFileSpecs: ConfigFileSpecs,
|
||||
configParseDiagnostics: Diagnostic[],
|
||||
canJsonReportNoInutFiles: boolean,
|
||||
): boolean {
|
||||
const existingErrors = configParseDiagnostics.length;
|
||||
if (shouldReportNoInputFiles(fileNames, canJsonReportNoInutFiles)) {
|
||||
configParseDiagnostics.push(getErrorForNoInputFiles(configFileSpecs, configFileName));
|
||||
@@ -3960,13 +3972,14 @@ export function matchesExclude(
|
||||
);
|
||||
}
|
||||
|
||||
function matchesExcludeWorker(
|
||||
/** @internal */
|
||||
export function matchesExcludeWorker(
|
||||
pathToCheck: string,
|
||||
excludeSpecs: readonly string[] | undefined,
|
||||
useCaseSensitiveFileNames: boolean,
|
||||
currentDirectory: string,
|
||||
basePath?: string,
|
||||
) {
|
||||
): boolean {
|
||||
const excludePattern = getRegularExpressionForWildcard(excludeSpecs, combinePaths(normalizePath(currentDirectory), basePath), "exclude");
|
||||
const excludeRegex = excludePattern && getRegexFromPattern(excludePattern, useCaseSensitiveFileNames);
|
||||
if (!excludeRegex) return false;
|
||||
|
||||
Reference in New Issue
Block a user