typescript 5.3.0-dev.20230825 → 5.3.0-dev.20230827
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/cancellationToken.js +1 -1
- package/lib/tsc.js +57 -58
- package/lib/tsserver.js +78 -82
- package/lib/typescript.js +78 -81
- package/lib/typingsInstaller.js +19 -22
- package/package.json +2 -2
package/lib/typescript.js
CHANGED
|
@@ -35,7 +35,7 @@ var ts = (() => {
|
|
|
35
35
|
"src/compiler/corePublic.ts"() {
|
|
36
36
|
"use strict";
|
|
37
37
|
versionMajorMinor = "5.3";
|
|
38
|
-
version = `${versionMajorMinor}.0-dev.
|
|
38
|
+
version = `${versionMajorMinor}.0-dev.20230827`;
|
|
39
39
|
Comparison = /* @__PURE__ */ ((Comparison3) => {
|
|
40
40
|
Comparison3[Comparison3["LessThan"] = -1] = "LessThan";
|
|
41
41
|
Comparison3[Comparison3["EqualTo"] = 0] = "EqualTo";
|
|
@@ -1398,9 +1398,6 @@ var ts = (() => {
|
|
|
1398
1398
|
function tryRemoveSuffix(str, suffix) {
|
|
1399
1399
|
return endsWith(str, suffix) ? str.slice(0, str.length - suffix.length) : void 0;
|
|
1400
1400
|
}
|
|
1401
|
-
function stringContains(str, substring) {
|
|
1402
|
-
return str.indexOf(substring) !== -1;
|
|
1403
|
-
}
|
|
1404
1401
|
function removeMinAndVersionNumbers(fileName) {
|
|
1405
1402
|
let end = fileName.length;
|
|
1406
1403
|
for (let pos = end - 1; pos > 0; pos--) {
|
|
@@ -5765,11 +5762,11 @@ ${lanes.join("\n")}
|
|
|
5765
5762
|
return some(ignoredPaths, (searchPath) => isInPath(path, searchPath)) || isIgnoredByWatchOptions(path, options, useCaseSensitiveFileNames2, getCurrentDirectory);
|
|
5766
5763
|
}
|
|
5767
5764
|
function isInPath(path, searchPath) {
|
|
5768
|
-
if (
|
|
5765
|
+
if (path.includes(searchPath))
|
|
5769
5766
|
return true;
|
|
5770
5767
|
if (useCaseSensitiveFileNames2)
|
|
5771
5768
|
return false;
|
|
5772
|
-
return
|
|
5769
|
+
return toCanonicalFilePath(path).includes(searchPath);
|
|
5773
5770
|
}
|
|
5774
5771
|
}
|
|
5775
5772
|
function createFileWatcherCallback(callback) {
|
|
@@ -6638,7 +6635,7 @@ ${lanes.join("\n")}
|
|
|
6638
6635
|
return !pathIsAbsolute(path) && !pathIsRelative(path);
|
|
6639
6636
|
}
|
|
6640
6637
|
function hasExtension(fileName) {
|
|
6641
|
-
return
|
|
6638
|
+
return getBaseFileName(fileName).includes(".");
|
|
6642
6639
|
}
|
|
6643
6640
|
function fileExtensionIs(path, extension) {
|
|
6644
6641
|
return path.length > extension.length && endsWith(path, extension);
|
|
@@ -6783,7 +6780,7 @@ ${lanes.join("\n")}
|
|
|
6783
6780
|
return root + pathComponents2.slice(1, length2).join(directorySeparator);
|
|
6784
6781
|
}
|
|
6785
6782
|
function normalizeSlashes(path) {
|
|
6786
|
-
return path.
|
|
6783
|
+
return path.includes("\\") ? path.replace(backslashRegExp, directorySeparator) : path;
|
|
6787
6784
|
}
|
|
6788
6785
|
function reducePathComponents(components) {
|
|
6789
6786
|
if (!some(components))
|
|
@@ -13032,7 +13029,7 @@ ${lanes.join("\n")}
|
|
|
13032
13029
|
void 0,
|
|
13033
13030
|
Diagnostics.There_are_types_at_0_but_this_result_could_not_be_resolved_when_respecting_package_json_exports_The_1_library_may_need_to_update_its_package_json_or_typings,
|
|
13034
13031
|
node10Result,
|
|
13035
|
-
node10Result.
|
|
13032
|
+
node10Result.includes(nodeModulesPathPart + "@types/") ? `@types/${mangleScopedPackageName(packageName)}` : packageName
|
|
13036
13033
|
) : host.typesPackageExists(packageName) ? chainDiagnosticMessages(
|
|
13037
13034
|
/*details*/
|
|
13038
13035
|
void 0,
|
|
@@ -16053,7 +16050,7 @@ ${lanes.join("\n")}
|
|
|
16053
16050
|
}
|
|
16054
16051
|
function isIntrinsicJsxName(name) {
|
|
16055
16052
|
const ch = name.charCodeAt(0);
|
|
16056
|
-
return ch >= 97 /* a */ && ch <= 122 /* z */ ||
|
|
16053
|
+
return ch >= 97 /* a */ && ch <= 122 /* z */ || name.includes("-");
|
|
16057
16054
|
}
|
|
16058
16055
|
function getIndentString(level) {
|
|
16059
16056
|
const singleLevel = indentStrings[1];
|
|
@@ -16066,7 +16063,7 @@ ${lanes.join("\n")}
|
|
|
16066
16063
|
return indentStrings[1].length;
|
|
16067
16064
|
}
|
|
16068
16065
|
function isNightly() {
|
|
16069
|
-
return
|
|
16066
|
+
return version.includes("-dev") || version.includes("-insiders");
|
|
16070
16067
|
}
|
|
16071
16068
|
function createTextWriter(newLine) {
|
|
16072
16069
|
var output;
|
|
@@ -16256,7 +16253,7 @@ ${lanes.join("\n")}
|
|
|
16256
16253
|
return void 0;
|
|
16257
16254
|
}
|
|
16258
16255
|
const specifier = getExternalModuleName(declaration);
|
|
16259
|
-
if (specifier && isStringLiteralLike(specifier) && !pathIsRelative(specifier.text) && getCanonicalAbsolutePath(host, file.path).
|
|
16256
|
+
if (specifier && isStringLiteralLike(specifier) && !pathIsRelative(specifier.text) && !getCanonicalAbsolutePath(host, file.path).includes(getCanonicalAbsolutePath(host, ensureTrailingDirectorySeparator(host.getCommonSourceDirectory())))) {
|
|
16260
16257
|
return void 0;
|
|
16261
16258
|
}
|
|
16262
16259
|
return getResolvedExternalModuleName(host, file);
|
|
@@ -18196,7 +18193,7 @@ ${lanes.join("\n")}
|
|
|
18196
18193
|
const flatBuiltins = flatten(builtins);
|
|
18197
18194
|
const extensions = [
|
|
18198
18195
|
...builtins,
|
|
18199
|
-
...mapDefined(extraFileExtensions, (x) => x.scriptKind === 7 /* Deferred */ || needJsExtensions && isJSLike(x.scriptKind) && flatBuiltins.
|
|
18196
|
+
...mapDefined(extraFileExtensions, (x) => x.scriptKind === 7 /* Deferred */ || needJsExtensions && isJSLike(x.scriptKind) && !flatBuiltins.includes(x.extension) ? [x.extension] : void 0)
|
|
18200
18197
|
];
|
|
18201
18198
|
return extensions;
|
|
18202
18199
|
}
|
|
@@ -18646,7 +18643,7 @@ ${lanes.join("\n")}
|
|
|
18646
18643
|
}
|
|
18647
18644
|
}
|
|
18648
18645
|
function containsIgnoredPath(path) {
|
|
18649
|
-
return some(ignoredPaths, (p) =>
|
|
18646
|
+
return some(ignoredPaths, (p) => path.includes(p));
|
|
18650
18647
|
}
|
|
18651
18648
|
function getContainingNodeArray(node) {
|
|
18652
18649
|
if (!node.parent)
|
|
@@ -28199,7 +28196,7 @@ ${lanes.join("\n")}
|
|
|
28199
28196
|
return Parser.JSDocParser.parseJSDocTypeExpressionForTests(content, start, length2);
|
|
28200
28197
|
}
|
|
28201
28198
|
function isDeclarationFileName(fileName) {
|
|
28202
|
-
return fileExtensionIsOneOf(fileName, supportedDeclarationExtensions) || fileExtensionIs(fileName, ".ts" /* Ts */) &&
|
|
28199
|
+
return fileExtensionIsOneOf(fileName, supportedDeclarationExtensions) || fileExtensionIs(fileName, ".ts" /* Ts */) && getBaseFileName(fileName).includes(".d.");
|
|
28203
28200
|
}
|
|
28204
28201
|
function parseResolutionMode(mode, pos, end, reportDiagnostic) {
|
|
28205
28202
|
if (!mode) {
|
|
@@ -35987,7 +35984,7 @@ ${lanes.join("\n")}
|
|
|
35987
35984
|
if (startsWith(value, "-")) {
|
|
35988
35985
|
return void 0;
|
|
35989
35986
|
}
|
|
35990
|
-
if (opt.type === "listOrElement" && !
|
|
35987
|
+
if (opt.type === "listOrElement" && !value.includes(",")) {
|
|
35991
35988
|
return validateJsonOptionValue(opt, value, errors);
|
|
35992
35989
|
}
|
|
35993
35990
|
if (value === "") {
|
|
@@ -36966,7 +36963,7 @@ ${lanes.join("\n")}
|
|
|
36966
36963
|
var _a;
|
|
36967
36964
|
basePath = normalizeSlashes(basePath);
|
|
36968
36965
|
const resolvedPath = getNormalizedAbsolutePath(configFileName || "", basePath);
|
|
36969
|
-
if (resolutionStack.
|
|
36966
|
+
if (resolutionStack.includes(resolvedPath)) {
|
|
36970
36967
|
errors.push(createCompilerDiagnostic(Diagnostics.Circularity_detected_while_resolving_configuration_Colon_0, [...resolutionStack, resolvedPath].join(" -> ")));
|
|
36971
36968
|
return { raw: json || convertToObject(sourceFile, errors) };
|
|
36972
36969
|
}
|
|
@@ -40321,7 +40318,7 @@ ${lanes.join("\n")}
|
|
|
40321
40318
|
result = tryResolve(extensions, state);
|
|
40322
40319
|
}
|
|
40323
40320
|
let legacyResult;
|
|
40324
|
-
if (((_a = result == null ? void 0 : result.value) == null ? void 0 : _a.isExternalLibraryImport) && !isConfigLookup && extensions & (1 /* TypeScript */ | 4 /* Declaration */) && features & 8 /* Exports */ && !isExternalModuleNameRelative(moduleName) && !extensionIsOk(1 /* TypeScript */ | 4 /* Declaration */, result.value.resolved.extension) && conditions.
|
|
40321
|
+
if (((_a = result == null ? void 0 : result.value) == null ? void 0 : _a.isExternalLibraryImport) && !isConfigLookup && extensions & (1 /* TypeScript */ | 4 /* Declaration */) && features & 8 /* Exports */ && !isExternalModuleNameRelative(moduleName) && !extensionIsOk(1 /* TypeScript */ | 4 /* Declaration */, result.value.resolved.extension) && conditions.includes("import")) {
|
|
40325
40322
|
traceIfEnabled(state, Diagnostics.Resolution_of_non_relative_name_failed_trying_with_modern_Node_resolution_features_disabled_to_see_if_npm_library_needs_configuration_update);
|
|
40326
40323
|
const diagnosticState = {
|
|
40327
40324
|
...state,
|
|
@@ -40365,7 +40362,7 @@ ${lanes.join("\n")}
|
|
|
40365
40362
|
resolved2 = loadModuleFromSelfNameReference(extensions2, moduleName, containingDirectory, state2, cache, redirectedReference);
|
|
40366
40363
|
}
|
|
40367
40364
|
if (!resolved2) {
|
|
40368
|
-
if (moduleName.
|
|
40365
|
+
if (moduleName.includes(":")) {
|
|
40369
40366
|
if (traceEnabled) {
|
|
40370
40367
|
trace(host, Diagnostics.Skipping_module_0_that_looks_like_an_absolute_URI_target_file_types_Colon_1, moduleName, formatExtensions(extensions2));
|
|
40371
40368
|
}
|
|
@@ -40454,7 +40451,7 @@ ${lanes.join("\n")}
|
|
|
40454
40451
|
return void 0;
|
|
40455
40452
|
}
|
|
40456
40453
|
function pathContainsNodeModules(path) {
|
|
40457
|
-
return
|
|
40454
|
+
return path.includes(nodeModulesPathPart);
|
|
40458
40455
|
}
|
|
40459
40456
|
function parseNodeModuleFromPath(resolved, isFolder) {
|
|
40460
40457
|
const path = normalizePath(resolved);
|
|
@@ -40490,7 +40487,7 @@ ${lanes.join("\n")}
|
|
|
40490
40487
|
}
|
|
40491
40488
|
function loadModuleFromFileNoImplicitExtensions(extensions, candidate, onlyRecordFailures, state) {
|
|
40492
40489
|
const filename = getBaseFileName(candidate);
|
|
40493
|
-
if (filename.
|
|
40490
|
+
if (!filename.includes(".")) {
|
|
40494
40491
|
return void 0;
|
|
40495
40492
|
}
|
|
40496
40493
|
let extensionless = removeFileExtension(candidate);
|
|
@@ -40647,7 +40644,7 @@ ${lanes.join("\n")}
|
|
|
40647
40644
|
function loadEntrypointsFromTargetExports(target) {
|
|
40648
40645
|
var _a, _b;
|
|
40649
40646
|
if (typeof target === "string" && startsWith(target, "./")) {
|
|
40650
|
-
if (target.
|
|
40647
|
+
if (target.includes("*") && state.host.readDirectory) {
|
|
40651
40648
|
if (target.indexOf("*") !== target.lastIndexOf("*")) {
|
|
40652
40649
|
return false;
|
|
40653
40650
|
}
|
|
@@ -40666,7 +40663,7 @@ ${lanes.join("\n")}
|
|
|
40666
40663
|
});
|
|
40667
40664
|
} else {
|
|
40668
40665
|
const partsAfterFirst = getPathComponents(target).slice(2);
|
|
40669
|
-
if (partsAfterFirst.
|
|
40666
|
+
if (partsAfterFirst.includes("..") || partsAfterFirst.includes(".") || partsAfterFirst.includes("node_modules")) {
|
|
40670
40667
|
return false;
|
|
40671
40668
|
}
|
|
40672
40669
|
const resolvedTarget = combinePaths(scope.packageDirectory, target);
|
|
@@ -41034,7 +41031,7 @@ ${lanes.join("\n")}
|
|
|
41034
41031
|
}
|
|
41035
41032
|
function loadModuleFromImportsOrExports(extensions, state, cache, redirectedReference, moduleName, lookupTable, scope, isImports) {
|
|
41036
41033
|
const loadModuleFromTargetImportOrExport = getLoadModuleFromTargetImportOrExport(extensions, state, cache, redirectedReference, moduleName, scope, isImports);
|
|
41037
|
-
if (!endsWith(moduleName, directorySeparator) && moduleName.
|
|
41034
|
+
if (!endsWith(moduleName, directorySeparator) && !moduleName.includes("*") && hasProperty(lookupTable, moduleName)) {
|
|
41038
41035
|
const target = lookupTable[moduleName];
|
|
41039
41036
|
return loadModuleFromTargetImportOrExport(
|
|
41040
41037
|
target,
|
|
@@ -41045,7 +41042,7 @@ ${lanes.join("\n")}
|
|
|
41045
41042
|
moduleName
|
|
41046
41043
|
);
|
|
41047
41044
|
}
|
|
41048
|
-
const expandingKeys = sort(filter(getOwnKeys(lookupTable), (k) => k.
|
|
41045
|
+
const expandingKeys = sort(filter(getOwnKeys(lookupTable), (k) => k.includes("*") || endsWith(k, "/")), comparePatternKeys);
|
|
41049
41046
|
for (const potentialTarget of expandingKeys) {
|
|
41050
41047
|
if (state.features & 16 /* ExportsPatternTrailers */ && matchesPatternWithTrailer(potentialTarget, moduleName)) {
|
|
41051
41048
|
const target = lookupTable[potentialTarget];
|
|
@@ -41139,7 +41136,7 @@ ${lanes.join("\n")}
|
|
|
41139
41136
|
}
|
|
41140
41137
|
const parts = pathIsRelative(target) ? getPathComponents(target).slice(1) : getPathComponents(target);
|
|
41141
41138
|
const partsAfterFirst = parts.slice(1);
|
|
41142
|
-
if (partsAfterFirst.
|
|
41139
|
+
if (partsAfterFirst.includes("..") || partsAfterFirst.includes(".") || partsAfterFirst.includes("node_modules")) {
|
|
41143
41140
|
if (state.traceEnabled) {
|
|
41144
41141
|
trace(state.host, Diagnostics.package_json_scope_0_has_invalid_type_for_target_of_specifier_1, scope.packageDirectory, moduleName);
|
|
41145
41142
|
}
|
|
@@ -41150,7 +41147,7 @@ ${lanes.join("\n")}
|
|
|
41150
41147
|
}
|
|
41151
41148
|
const resolvedTarget = combinePaths(scope.packageDirectory, target);
|
|
41152
41149
|
const subpathParts = getPathComponents(subpath);
|
|
41153
|
-
if (subpathParts.
|
|
41150
|
+
if (subpathParts.includes("..") || subpathParts.includes(".") || subpathParts.includes("node_modules")) {
|
|
41154
41151
|
if (state.traceEnabled) {
|
|
41155
41152
|
trace(state.host, Diagnostics.package_json_scope_0_has_invalid_type_for_target_of_specifier_1, scope.packageDirectory, moduleName);
|
|
41156
41153
|
}
|
|
@@ -41177,7 +41174,7 @@ ${lanes.join("\n")}
|
|
|
41177
41174
|
if (!Array.isArray(target)) {
|
|
41178
41175
|
traceIfEnabled(state, Diagnostics.Entering_conditional_exports);
|
|
41179
41176
|
for (const condition of getOwnKeys(target)) {
|
|
41180
|
-
if (condition === "default" || state.conditions.
|
|
41177
|
+
if (condition === "default" || state.conditions.includes(condition) || isApplicableVersionedTypesKey(state.conditions, condition)) {
|
|
41181
41178
|
traceIfEnabled(state, Diagnostics.Matched_0_condition_1, isImports ? "imports" : "exports", condition);
|
|
41182
41179
|
const subTarget = target[condition];
|
|
41183
41180
|
const result = loadModuleFromTargetImportOrExport(subTarget, subpath, pattern, key);
|
|
@@ -41238,7 +41235,7 @@ ${lanes.join("\n")}
|
|
|
41238
41235
|
}
|
|
41239
41236
|
function tryLoadInputFileForPath(finalPath, entry, packagePath, isImports2) {
|
|
41240
41237
|
var _a, _b, _c, _d;
|
|
41241
|
-
if (!state.isConfigLookup && (state.compilerOptions.declarationDir || state.compilerOptions.outDir) && finalPath.
|
|
41238
|
+
if (!state.isConfigLookup && (state.compilerOptions.declarationDir || state.compilerOptions.outDir) && !finalPath.includes("/node_modules/") && (state.compilerOptions.configFile ? containsPath(scope.packageDirectory, toAbsolutePath(state.compilerOptions.configFile.fileName), !useCaseSensitiveFileNames(state)) : true)) {
|
|
41242
41239
|
const getCanonicalFileName = hostGetCanonicalFileName({ useCaseSensitiveFileNames: () => useCaseSensitiveFileNames(state) });
|
|
41243
41240
|
const commonSourceDirGuesses = [];
|
|
41244
41241
|
if (state.compilerOptions.rootDir || state.compilerOptions.composite && state.compilerOptions.configFilePath) {
|
|
@@ -41312,7 +41309,7 @@ ${lanes.join("\n")}
|
|
|
41312
41309
|
}
|
|
41313
41310
|
}
|
|
41314
41311
|
function isApplicableVersionedTypesKey(conditions, key) {
|
|
41315
|
-
if (conditions.
|
|
41312
|
+
if (!conditions.includes("types"))
|
|
41316
41313
|
return false;
|
|
41317
41314
|
if (!startsWith(key, "types@"))
|
|
41318
41315
|
return false;
|
|
@@ -41516,7 +41513,7 @@ ${lanes.join("\n")}
|
|
|
41516
41513
|
return mangledName;
|
|
41517
41514
|
}
|
|
41518
41515
|
function unmangleScopedPackageName(typesPackageName) {
|
|
41519
|
-
return
|
|
41516
|
+
return typesPackageName.includes(mangledScopedPackageSeparator) ? "@" + typesPackageName.replace(mangledScopedPackageSeparator, directorySeparator) : typesPackageName;
|
|
41520
41517
|
}
|
|
41521
41518
|
function tryFindNonRelativeModuleNameInCache(cache, moduleName, mode, containingDirectory, redirectedReference, state) {
|
|
41522
41519
|
const result = cache && cache.getFromNonRelativeNameCache(moduleName, mode, containingDirectory, redirectedReference);
|
|
@@ -45231,12 +45228,12 @@ ${lanes.join("\n")}
|
|
|
45231
45228
|
/*currentDirectory*/
|
|
45232
45229
|
void 0
|
|
45233
45230
|
);
|
|
45234
|
-
const mode2 = endsWith(k, "/") ? 1 /* Directory */ :
|
|
45231
|
+
const mode2 = endsWith(k, "/") ? 1 /* Directory */ : k.includes("*") ? 2 /* Pattern */ : 0 /* Exact */;
|
|
45235
45232
|
return tryGetModuleNameFromExports(options, targetFilePath, packageDirectory, subPackageName, exports[k], conditions, mode2);
|
|
45236
45233
|
});
|
|
45237
45234
|
} else {
|
|
45238
45235
|
for (const key of getOwnKeys(exports)) {
|
|
45239
|
-
if (key === "default" || conditions.
|
|
45236
|
+
if (key === "default" || conditions.includes(key) || isApplicableVersionedTypesKey(conditions, key)) {
|
|
45240
45237
|
const subTarget = exports[key];
|
|
45241
45238
|
const result = tryGetModuleNameFromExports(options, targetFilePath, packageDirectory, packageName, subTarget, conditions, mode);
|
|
45242
45239
|
if (result) {
|
|
@@ -45402,7 +45399,7 @@ ${lanes.join("\n")}
|
|
|
45402
45399
|
return fileName;
|
|
45403
45400
|
} else if (fileExtensionIsOneOf(fileName, [".d.mts" /* Dmts */, ".mts" /* Mts */, ".d.cts" /* Dcts */, ".cts" /* Cts */])) {
|
|
45404
45401
|
return noExtension + getJSExtensionForFile(fileName, options);
|
|
45405
|
-
} else if (!fileExtensionIsOneOf(fileName, [".d.ts" /* Dts */]) && fileExtensionIsOneOf(fileName, [".ts" /* Ts */]) &&
|
|
45402
|
+
} else if (!fileExtensionIsOneOf(fileName, [".d.ts" /* Dts */]) && fileExtensionIsOneOf(fileName, [".ts" /* Ts */]) && fileName.includes(".d.")) {
|
|
45406
45403
|
return tryGetRealFileNameForNonJsDeclarationFileName(fileName);
|
|
45407
45404
|
}
|
|
45408
45405
|
switch (allowedEndings[0]) {
|
|
@@ -45428,7 +45425,7 @@ ${lanes.join("\n")}
|
|
|
45428
45425
|
}
|
|
45429
45426
|
function tryGetRealFileNameForNonJsDeclarationFileName(fileName) {
|
|
45430
45427
|
const baseName = getBaseFileName(fileName);
|
|
45431
|
-
if (!endsWith(fileName, ".ts" /* Ts */) || !
|
|
45428
|
+
if (!endsWith(fileName, ".ts" /* Ts */) || !baseName.includes(".d.") || fileExtensionIsOneOf(baseName, [".d.ts" /* Dts */]))
|
|
45432
45429
|
return void 0;
|
|
45433
45430
|
const noExtension = removeExtension(fileName, ".ts" /* Ts */);
|
|
45434
45431
|
const ext = noExtension.substring(noExtension.lastIndexOf("."));
|
|
@@ -51390,12 +51387,12 @@ ${lanes.join("\n")}
|
|
|
51390
51387
|
if (!specifier) {
|
|
51391
51388
|
specifier = getSpecifierForModuleSymbol(chain[0], context);
|
|
51392
51389
|
}
|
|
51393
|
-
if (!(context.flags & 67108864 /* AllowNodeModulesRelativePaths */) && getEmitModuleResolutionKind(compilerOptions) !== 1 /* Classic */ && specifier.
|
|
51390
|
+
if (!(context.flags & 67108864 /* AllowNodeModulesRelativePaths */) && getEmitModuleResolutionKind(compilerOptions) !== 1 /* Classic */ && specifier.includes("/node_modules/")) {
|
|
51394
51391
|
const oldSpecifier = specifier;
|
|
51395
51392
|
if (getEmitModuleResolutionKind(compilerOptions) === 3 /* Node16 */ || getEmitModuleResolutionKind(compilerOptions) === 99 /* NodeNext */) {
|
|
51396
51393
|
const swappedMode = (contextFile == null ? void 0 : contextFile.impliedNodeFormat) === 99 /* ESNext */ ? 1 /* CommonJS */ : 99 /* ESNext */;
|
|
51397
51394
|
specifier = getSpecifierForModuleSymbol(chain[0], context, swappedMode);
|
|
51398
|
-
if (specifier.
|
|
51395
|
+
if (specifier.includes("/node_modules/")) {
|
|
51399
51396
|
specifier = oldSpecifier;
|
|
51400
51397
|
} else {
|
|
51401
51398
|
assertion = factory.createImportTypeAssertionContainer(factory.createAssertClause(factory.createNodeArray([
|
|
@@ -52101,7 +52098,7 @@ ${lanes.join("\n")}
|
|
|
52101
52098
|
for (const group2 of groups) {
|
|
52102
52099
|
if (group2.length > 1) {
|
|
52103
52100
|
statements = [
|
|
52104
|
-
...filter(statements, (s) => group2.
|
|
52101
|
+
...filter(statements, (s) => !group2.includes(s)),
|
|
52105
52102
|
factory.createExportDeclaration(
|
|
52106
52103
|
/*modifiers*/
|
|
52107
52104
|
void 0,
|
|
@@ -65061,6 +65058,9 @@ ${lanes.join("\n")}
|
|
|
65061
65058
|
function isArrayLikeType(type) {
|
|
65062
65059
|
return isArrayType(type) || !(type.flags & 98304 /* Nullable */) && isTypeAssignableTo(type, anyReadonlyArrayType);
|
|
65063
65060
|
}
|
|
65061
|
+
function isMutableArrayLikeType(type) {
|
|
65062
|
+
return isMutableArrayOrTuple(type) || !(type.flags & (1 /* Any */ | 98304 /* Nullable */)) && isTypeAssignableTo(type, anyArrayType);
|
|
65063
|
+
}
|
|
65064
65064
|
function getSingleBaseForNonAugmentingSubtype(type) {
|
|
65065
65065
|
if (!(getObjectFlags(type) & 4 /* Reference */) || !(getObjectFlags(type.target) & 3 /* ClassOrInterface */)) {
|
|
65066
65066
|
return void 0;
|
|
@@ -65478,7 +65478,7 @@ ${lanes.join("\n")}
|
|
|
65478
65478
|
const param = declaration;
|
|
65479
65479
|
if (isIdentifier(param.name)) {
|
|
65480
65480
|
const originalKeywordKind = identifierToKeywordKind(param.name);
|
|
65481
|
-
if ((isCallSignatureDeclaration(param.parent) || isMethodSignature(param.parent) || isFunctionTypeNode(param.parent)) && param.parent.parameters.
|
|
65481
|
+
if ((isCallSignatureDeclaration(param.parent) || isMethodSignature(param.parent) || isFunctionTypeNode(param.parent)) && param.parent.parameters.includes(param) && (resolveName(
|
|
65482
65482
|
param,
|
|
65483
65483
|
param.name.escapedText,
|
|
65484
65484
|
788968 /* Type */,
|
|
@@ -65564,7 +65564,12 @@ ${lanes.join("\n")}
|
|
|
65564
65564
|
callback(getTypeAtPosition(source, i), getTypeAtPosition(target, i));
|
|
65565
65565
|
}
|
|
65566
65566
|
if (targetRestType) {
|
|
65567
|
-
callback(getRestTypeAtPosition(
|
|
65567
|
+
callback(getRestTypeAtPosition(
|
|
65568
|
+
source,
|
|
65569
|
+
paramCount,
|
|
65570
|
+
/*readonly*/
|
|
65571
|
+
isConstTypeVariable(targetRestType) && !someType(targetRestType, isMutableArrayLikeType)
|
|
65572
|
+
), targetRestType);
|
|
65568
65573
|
}
|
|
65569
65574
|
}
|
|
65570
65575
|
function applyToReturnTypes(source, target, callback) {
|
|
@@ -70550,7 +70555,7 @@ ${lanes.join("\n")}
|
|
|
70550
70555
|
elementTypes,
|
|
70551
70556
|
elementFlags,
|
|
70552
70557
|
/*readonly*/
|
|
70553
|
-
inConstContext
|
|
70558
|
+
inConstContext && !(contextualType && someType(contextualType, isMutableArrayLikeType))
|
|
70554
70559
|
));
|
|
70555
70560
|
}
|
|
70556
70561
|
return createArrayLiteralType(createArrayType(
|
|
@@ -70866,7 +70871,7 @@ ${lanes.join("\n")}
|
|
|
70866
70871
|
return getJsxElementTypeAt(node) || anyType;
|
|
70867
70872
|
}
|
|
70868
70873
|
function isHyphenatedJsxName(name) {
|
|
70869
|
-
return
|
|
70874
|
+
return name.includes("-");
|
|
70870
70875
|
}
|
|
70871
70876
|
function isJsxIntrinsicTagName(tagName) {
|
|
70872
70877
|
return isIdentifier(tagName) && isIntrinsicJsxName(tagName.escapedText) || isJsxNamespacedName(tagName);
|
|
@@ -72571,7 +72576,7 @@ ${lanes.join("\n")}
|
|
|
72571
72576
|
names.push(arg.tupleNameSource);
|
|
72572
72577
|
}
|
|
72573
72578
|
}
|
|
72574
|
-
return createTupleType(types, flags, inConstContext, length(names) === length(types) ? names : void 0);
|
|
72579
|
+
return createTupleType(types, flags, inConstContext && !someType(restType, isMutableArrayLikeType), length(names) === length(types) ? names : void 0);
|
|
72575
72580
|
}
|
|
72576
72581
|
function checkTypeArguments(signature, typeArgumentNodes, reportErrors2, headMessage) {
|
|
72577
72582
|
const isJavascript = isInJSFile(signature.declaration);
|
|
@@ -74652,7 +74657,7 @@ ${lanes.join("\n")}
|
|
|
74652
74657
|
}
|
|
74653
74658
|
return void 0;
|
|
74654
74659
|
}
|
|
74655
|
-
function getRestTypeAtPosition(source, pos) {
|
|
74660
|
+
function getRestTypeAtPosition(source, pos, readonly) {
|
|
74656
74661
|
const parameterCount = getParameterCount(source);
|
|
74657
74662
|
const minArgumentCount = getMinArgumentCount(source);
|
|
74658
74663
|
const restType = getEffectiveRestType(source);
|
|
@@ -74675,13 +74680,7 @@ ${lanes.join("\n")}
|
|
|
74675
74680
|
names.push(name);
|
|
74676
74681
|
}
|
|
74677
74682
|
}
|
|
74678
|
-
return createTupleType(
|
|
74679
|
-
types,
|
|
74680
|
-
flags,
|
|
74681
|
-
/*readonly*/
|
|
74682
|
-
false,
|
|
74683
|
-
length(names) === length(types) ? names : void 0
|
|
74684
|
-
);
|
|
74683
|
+
return createTupleType(types, flags, readonly, length(names) === length(types) ? names : void 0);
|
|
74685
74684
|
}
|
|
74686
74685
|
function getParameterCount(signature) {
|
|
74687
74686
|
const length2 = signature.parameters.length;
|
|
@@ -86029,7 +86028,7 @@ ${lanes.join("\n")}
|
|
|
86029
86028
|
return false;
|
|
86030
86029
|
}
|
|
86031
86030
|
function checkGrammarNumericLiteral(node) {
|
|
86032
|
-
const isFractional = getTextOfNode(node).
|
|
86031
|
+
const isFractional = getTextOfNode(node).includes(".");
|
|
86033
86032
|
const isScientific = node.numericLiteralFlags & 16 /* Scientific */;
|
|
86034
86033
|
if (isFractional || isScientific) {
|
|
86035
86034
|
return;
|
|
@@ -109486,7 +109485,7 @@ ${lanes.join("\n")}
|
|
|
109486
109485
|
}
|
|
109487
109486
|
function hasInternalAnnotation(range, currentSourceFile) {
|
|
109488
109487
|
const comment = currentSourceFile.text.substring(range.pos, range.end);
|
|
109489
|
-
return
|
|
109488
|
+
return comment.includes("@internal");
|
|
109490
109489
|
}
|
|
109491
109490
|
function isInternalDeclaration(node, currentSourceFile) {
|
|
109492
109491
|
const parseTreeNode = getParseTreeNode(node);
|
|
@@ -113943,7 +113942,7 @@ ${lanes.join("\n")}
|
|
|
113943
113942
|
/*jsxAttributeEscape*/
|
|
113944
113943
|
false
|
|
113945
113944
|
);
|
|
113946
|
-
return !(expression.numericLiteralFlags & 448 /* WithSpecifier */) && !
|
|
113945
|
+
return !(expression.numericLiteralFlags & 448 /* WithSpecifier */) && !text.includes(tokenToString(25 /* DotToken */)) && !text.includes(String.fromCharCode(69 /* E */)) && !text.includes(String.fromCharCode(101 /* e */));
|
|
113947
113946
|
} else if (isAccessExpression(expression)) {
|
|
113948
113947
|
const constantValue = getConstantValue(expression);
|
|
113949
113948
|
return typeof constantValue === "number" && isFinite(constantValue) && constantValue >= 0 && Math.floor(constantValue) === constantValue;
|
|
@@ -118771,7 +118770,7 @@ ${lanes.join("\n")}
|
|
|
118771
118770
|
const resultFromDts = getRedirectReferenceForResolutionFromSourceOfProject(file.path);
|
|
118772
118771
|
if (resultFromDts)
|
|
118773
118772
|
return resultFromDts;
|
|
118774
|
-
if (!host.realpath || !options.preserveSymlinks || !
|
|
118773
|
+
if (!host.realpath || !options.preserveSymlinks || !file.originalFileName.includes(nodeModulesPathPart))
|
|
118775
118774
|
return void 0;
|
|
118776
118775
|
const realDeclarationPath = toPath3(host.realpath(file.originalFileName));
|
|
118777
118776
|
return realDeclarationPath === file.path ? void 0 : getRedirectReferenceForResolutionFromSourceOfProject(realDeclarationPath);
|
|
@@ -120029,7 +120028,7 @@ ${lanes.join("\n")}
|
|
|
120029
120028
|
const path = toPath3(fileName);
|
|
120030
120029
|
if (useSourceOfProjectReferenceRedirect) {
|
|
120031
120030
|
let source = getSourceOfProjectReferenceRedirect(path);
|
|
120032
|
-
if (!source && host.realpath && options.preserveSymlinks && isDeclarationFileName(fileName) &&
|
|
120031
|
+
if (!source && host.realpath && options.preserveSymlinks && isDeclarationFileName(fileName) && fileName.includes(nodeModulesPathPart)) {
|
|
120033
120032
|
const realPath2 = toPath3(host.realpath(fileName));
|
|
120034
120033
|
if (realPath2 !== path)
|
|
120035
120034
|
source = getSourceOfProjectReferenceRedirect(realPath2);
|
|
@@ -121389,7 +121388,7 @@ ${lanes.join("\n")}
|
|
|
121389
121388
|
var _a;
|
|
121390
121389
|
if (!host.getResolvedProjectReferences() || containsIgnoredPath(directory))
|
|
121391
121390
|
return;
|
|
121392
|
-
if (!originalRealpath || !
|
|
121391
|
+
if (!originalRealpath || !directory.includes(nodeModulesPathPart))
|
|
121393
121392
|
return;
|
|
121394
121393
|
const symlinkCache = host.getSymlinkCache();
|
|
121395
121394
|
const directoryPath = ensureTrailingDirectorySeparator(host.toPath(directory));
|
|
@@ -121417,7 +121416,7 @@ ${lanes.join("\n")}
|
|
|
121417
121416
|
if (!symlinkedDirectories)
|
|
121418
121417
|
return false;
|
|
121419
121418
|
const fileOrDirectoryPath = host.toPath(fileOrDirectory);
|
|
121420
|
-
if (!
|
|
121419
|
+
if (!fileOrDirectoryPath.includes(nodeModulesPathPart))
|
|
121421
121420
|
return false;
|
|
121422
121421
|
if (isFile && ((_a = symlinkCache.getSymlinkedFiles()) == null ? void 0 : _a.has(fileOrDirectoryPath)))
|
|
121423
121422
|
return true;
|
|
@@ -123465,7 +123464,7 @@ ${lanes.join("\n")}
|
|
|
123465
123464
|
if (endsWith(path, "/node_modules/.staging")) {
|
|
123466
123465
|
return removeSuffix(path, "/.staging");
|
|
123467
123466
|
}
|
|
123468
|
-
return some(ignoredPaths, (searchPath) =>
|
|
123467
|
+
return some(ignoredPaths, (searchPath) => path.includes(searchPath)) ? void 0 : path;
|
|
123469
123468
|
}
|
|
123470
123469
|
function perceivedOsRootLengthForWatching(pathComponents2, length2) {
|
|
123471
123470
|
if (length2 <= 1)
|
|
@@ -128314,7 +128313,7 @@ ${lanes.join("\n")}
|
|
|
128314
128313
|
|
|
128315
128314
|
// src/jsTyping/shared.ts
|
|
128316
128315
|
function hasArgument(argumentName) {
|
|
128317
|
-
return sys.args.
|
|
128316
|
+
return sys.args.includes(argumentName);
|
|
128318
128317
|
}
|
|
128319
128318
|
function findArgument(argumentName) {
|
|
128320
128319
|
const index = sys.args.indexOf(argumentName);
|
|
@@ -131142,7 +131141,7 @@ ${lanes.join("\n")}
|
|
|
131142
131141
|
return false;
|
|
131143
131142
|
}
|
|
131144
131143
|
function getNodeModulesPackageNameFromFileName(importedFileName, moduleSpecifierResolutionHost) {
|
|
131145
|
-
if (!
|
|
131144
|
+
if (!importedFileName.includes("node_modules")) {
|
|
131146
131145
|
return void 0;
|
|
131147
131146
|
}
|
|
131148
131147
|
const specifier = ts_moduleSpecifiers_exports.getNodeModulesPackageName(
|
|
@@ -131759,7 +131758,7 @@ ${lanes.join("\n")}
|
|
|
131759
131758
|
var _a;
|
|
131760
131759
|
const isExcluded = excludePatterns && ((fileName) => excludePatterns.some((p) => p.test(fileName)));
|
|
131761
131760
|
for (const ambient of checker.getAmbientModules()) {
|
|
131762
|
-
if (!
|
|
131761
|
+
if (!ambient.name.includes("*") && !(excludePatterns && ((_a = ambient.declarations) == null ? void 0 : _a.every((d) => isExcluded(d.getSourceFile().fileName))))) {
|
|
131763
131762
|
cb(
|
|
131764
131763
|
ambient,
|
|
131765
131764
|
/*sourceFile*/
|
|
@@ -140793,7 +140792,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
140793
140792
|
return symbolId;
|
|
140794
140793
|
}
|
|
140795
140794
|
function checkForUsedDeclarations(node) {
|
|
140796
|
-
if (node === targetRange.range || isReadonlyArray(targetRange.range) && targetRange.range.
|
|
140795
|
+
if (node === targetRange.range || isReadonlyArray(targetRange.range) && targetRange.range.includes(node)) {
|
|
140797
140796
|
return;
|
|
140798
140797
|
}
|
|
140799
140798
|
const sym = isIdentifier(node) ? getSymbolReferencedByIdentifier(node) : checker.getSymbolAtLocation(node);
|
|
@@ -142659,7 +142658,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
142659
142658
|
return char >= 97 /* a */ && char <= 122 /* z */ || char >= 65 /* A */ && char <= 90 /* Z */ || char >= 48 /* _0 */ && char <= 57 /* _9 */;
|
|
142660
142659
|
}
|
|
142661
142660
|
function isNodeModulesFile(path) {
|
|
142662
|
-
return
|
|
142661
|
+
return path.includes("/node_modules/");
|
|
142663
142662
|
}
|
|
142664
142663
|
}
|
|
142665
142664
|
function getRenameInfo2(fileName, position, preferences) {
|
|
@@ -152500,7 +152499,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
152500
152499
|
}
|
|
152501
152500
|
}
|
|
152502
152501
|
function isCallbackLike(checker, sourceFile, name) {
|
|
152503
|
-
return !!ts_FindAllReferences_exports.Core.eachSymbolReferenceInFile(name, checker, sourceFile, (reference) => isIdentifier(reference) && isCallExpression(reference.parent) && reference.parent.arguments.
|
|
152502
|
+
return !!ts_FindAllReferences_exports.Core.eachSymbolReferenceInFile(name, checker, sourceFile, (reference) => isIdentifier(reference) && isCallExpression(reference.parent) && reference.parent.arguments.includes(reference));
|
|
152504
152503
|
}
|
|
152505
152504
|
function isLastParameter(func, parameter, isFixAll) {
|
|
152506
152505
|
const parameters = func.parameters;
|
|
@@ -160352,7 +160351,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
160352
160351
|
function addReplacementSpans(text, textStart, names) {
|
|
160353
160352
|
const span = getDirectoryFragmentTextSpan(text, textStart);
|
|
160354
160353
|
const wholeSpan = text.length === 0 ? void 0 : createTextSpan(textStart, text.length);
|
|
160355
|
-
return names.map(({ name, kind, extension }) =>
|
|
160354
|
+
return names.map(({ name, kind, extension }) => name.includes(directorySeparator) || name.includes(altDirectorySeparator) ? { name, kind, extension, span: wholeSpan } : { name, kind, extension, span });
|
|
160356
160355
|
}
|
|
160357
160356
|
function getStringLiteralCompletionsFromModuleNames(sourceFile, node, compilerOptions, host, typeChecker, preferences) {
|
|
160358
160357
|
return addReplacementSpans(node.text, node.getStart(sourceFile) + 1, getStringLiteralCompletionsFromModuleNamesWorker(sourceFile, node, compilerOptions, host, typeChecker, preferences));
|
|
@@ -160678,7 +160677,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
160678
160677
|
}
|
|
160679
160678
|
if (target && typeof target === "object" && !isArray(target)) {
|
|
160680
160679
|
for (const condition in target) {
|
|
160681
|
-
if (condition === "default" || conditions.
|
|
160680
|
+
if (condition === "default" || conditions.includes(condition) || isApplicableVersionedTypesKey(conditions, condition)) {
|
|
160682
160681
|
const pattern = target[condition];
|
|
160683
160682
|
return getPatternFromFirstMatchingCondition(pattern, conditions);
|
|
160684
160683
|
}
|
|
@@ -160690,7 +160689,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
160690
160689
|
}
|
|
160691
160690
|
function getCompletionsForPathMapping(path, patterns, fragment, packageDirectory, extensionOptions, host) {
|
|
160692
160691
|
if (!endsWith(path, "*")) {
|
|
160693
|
-
return !
|
|
160692
|
+
return !path.includes("*") ? justPathMappingName(path, "script" /* scriptElement */) : emptyArray;
|
|
160694
160693
|
}
|
|
160695
160694
|
const pathPrefix = path.slice(0, path.length - 1);
|
|
160696
160695
|
const remainingFragment = tryRemovePrefix(fragment, pathPrefix);
|
|
@@ -160760,7 +160759,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
160760
160759
|
}
|
|
160761
160760
|
function getAmbientModuleCompletions(fragment, fragmentDirectory, checker) {
|
|
160762
160761
|
const ambientModules = checker.getAmbientModules().map((sym) => stripQuotes(sym.name));
|
|
160763
|
-
const nonRelativeModuleNames = ambientModules.filter((moduleName) => startsWith(moduleName, fragment) && moduleName.
|
|
160762
|
+
const nonRelativeModuleNames = ambientModules.filter((moduleName) => startsWith(moduleName, fragment) && !moduleName.includes("*"));
|
|
160764
160763
|
if (fragmentDirectory !== void 0) {
|
|
160765
160764
|
const moduleNameWithSeparator = ensureTrailingDirectorySeparator(fragmentDirectory);
|
|
160766
160765
|
return nonRelativeModuleNames.map((nonRelativeModuleName) => removePrefix(nonRelativeModuleName, moduleNameWithSeparator));
|
|
@@ -160874,7 +160873,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
160874
160873
|
return false;
|
|
160875
160874
|
}
|
|
160876
160875
|
function containsSlash(fragment) {
|
|
160877
|
-
return
|
|
160876
|
+
return fragment.includes(directorySeparator);
|
|
160878
160877
|
}
|
|
160879
160878
|
function isRequireCallArgument(node) {
|
|
160880
160879
|
return isCallExpression(node.parent) && firstOrUndefined(node.parent.arguments) === node && isIdentifier(node.parent.expression) && node.parent.expression.escapedText === "require";
|
|
@@ -169767,7 +169766,7 @@ ${options.prefix}` : "\n" : options.prefix
|
|
|
169767
169766
|
return positionIsASICandidate(context.currentTokenSpan.end, context.currentTokenParent, context.sourceFile);
|
|
169768
169767
|
}
|
|
169769
169768
|
function isNotPropertyAccessOnIntegerLiteral(context) {
|
|
169770
|
-
return !isPropertyAccessExpression(context.contextNode) || !isNumericLiteral(context.contextNode.expression) || context.contextNode.expression.getText().
|
|
169769
|
+
return !isPropertyAccessExpression(context.contextNode) || !isNumericLiteral(context.contextNode.expression) || context.contextNode.expression.getText().includes(".");
|
|
169771
169770
|
}
|
|
169772
169771
|
var init_rules = __esm({
|
|
169773
169772
|
"src/services/formatting/rules.ts"() {
|
|
@@ -170963,7 +170962,7 @@ ${options.prefix}` : "\n" : options.prefix
|
|
|
170963
170962
|
}
|
|
170964
170963
|
const containerList = getListByPosition(position, precedingToken.parent, sourceFile);
|
|
170965
170964
|
if (containerList && !rangeContainsRange(containerList, precedingToken)) {
|
|
170966
|
-
const useTheSameBaseIndentation = [218 /* FunctionExpression */, 219 /* ArrowFunction */].
|
|
170965
|
+
const useTheSameBaseIndentation = [218 /* FunctionExpression */, 219 /* ArrowFunction */].includes(currentToken.parent.kind);
|
|
170967
170966
|
const indentSize = useTheSameBaseIndentation ? 0 : options.indentSize;
|
|
170968
170967
|
return getActualIndentationForListStartLine(containerList, sourceFile, options) + indentSize;
|
|
170969
170968
|
}
|
|
@@ -172554,7 +172553,7 @@ ${options.prefix}` : "\n" : options.prefix
|
|
|
172554
172553
|
|
|
172555
172554
|
// src/server/scriptInfo.ts
|
|
172556
172555
|
function isDynamicFileName(fileName) {
|
|
172557
|
-
return fileName[0] === "^" || (
|
|
172556
|
+
return fileName[0] === "^" || (fileName.includes("walkThroughSnippet:/") || fileName.includes("untitled:/")) && getBaseFileName(fileName)[0] === "^" || fileName.includes(":^") && !fileName.includes(directorySeparator);
|
|
172558
172557
|
}
|
|
172559
172558
|
function ensurePrimaryProjectKind(project) {
|
|
172560
172559
|
if (!project || project.projectKind === 3 /* AutoImportProvider */ || project.projectKind === 4 /* Auxiliary */) {
|
|
@@ -174204,7 +174203,7 @@ ${options.prefix}` : "\n" : options.prefix
|
|
|
174204
174203
|
}
|
|
174205
174204
|
removeExistingTypings(include) {
|
|
174206
174205
|
const existing = getAutomaticTypeDirectiveNames(this.getCompilerOptions(), this.directoryStructureHost);
|
|
174207
|
-
return include.filter((i) => existing.
|
|
174206
|
+
return include.filter((i) => !existing.includes(i));
|
|
174208
174207
|
}
|
|
174209
174208
|
updateGraphWorker() {
|
|
174210
174209
|
var _a, _b;
|
|
@@ -178401,7 +178400,7 @@ Dynamic files must always be opened with service's current directory or service
|
|
|
178401
178400
|
this.logger.info(`Excluding files based on rule ${name} matching file '${root}'`);
|
|
178402
178401
|
if (rule2.types) {
|
|
178403
178402
|
for (const type of rule2.types) {
|
|
178404
|
-
if (typeAcqInclude.
|
|
178403
|
+
if (!typeAcqInclude.includes(type)) {
|
|
178405
178404
|
typeAcqInclude.push(type);
|
|
178406
178405
|
}
|
|
178407
178406
|
}
|
|
@@ -178420,13 +178419,13 @@ Dynamic files must always be opened with service's current directory or service
|
|
|
178420
178419
|
return groupNumberOrString;
|
|
178421
178420
|
}).join("");
|
|
178422
178421
|
});
|
|
178423
|
-
if (excludeRules.
|
|
178422
|
+
if (!excludeRules.includes(processedRule)) {
|
|
178424
178423
|
excludeRules.push(processedRule);
|
|
178425
178424
|
}
|
|
178426
178425
|
}
|
|
178427
178426
|
} else {
|
|
178428
178427
|
const escaped = _ProjectService.escapeFilenameForRegex(root);
|
|
178429
|
-
if (excludeRules.
|
|
178428
|
+
if (!excludeRules.includes(escaped)) {
|
|
178430
178429
|
excludeRules.push(escaped);
|
|
178431
178430
|
}
|
|
178432
178431
|
}
|
|
@@ -178450,7 +178449,7 @@ Dynamic files must always be opened with service's current directory or service
|
|
|
178450
178449
|
this.logger.info(`Excluded '${normalizedNames[i]}' because it matched ${cleanedTypingName} from the legacy safelist`);
|
|
178451
178450
|
excludedFiles.push(normalizedNames[i]);
|
|
178452
178451
|
exclude = true;
|
|
178453
|
-
if (typeAcqInclude.
|
|
178452
|
+
if (!typeAcqInclude.includes(typeName)) {
|
|
178454
178453
|
typeAcqInclude.push(typeName);
|
|
178455
178454
|
}
|
|
178456
178455
|
}
|
|
@@ -181990,7 +181989,7 @@ ${e.message}`;
|
|
|
181990
181989
|
if (languageServiceDisabled) {
|
|
181991
181990
|
return;
|
|
181992
181991
|
}
|
|
181993
|
-
const fileNamesInProject = fileNames.filter((value) => !
|
|
181992
|
+
const fileNamesInProject = fileNames.filter((value) => !value.includes("lib.d.ts"));
|
|
181994
181993
|
if (fileNamesInProject.length === 0) {
|
|
181995
181994
|
return;
|
|
181996
181995
|
}
|
|
@@ -185252,7 +185251,6 @@ ${e.message}`;
|
|
|
185252
185251
|
startsWithDirectory: () => startsWithDirectory,
|
|
185253
185252
|
startsWithUnderscore: () => startsWithUnderscore,
|
|
185254
185253
|
startsWithUseStrict: () => startsWithUseStrict,
|
|
185255
|
-
stringContains: () => stringContains,
|
|
185256
185254
|
stringContainsAt: () => stringContainsAt,
|
|
185257
185255
|
stringToToken: () => stringToToken,
|
|
185258
185256
|
stripQuotes: () => stripQuotes,
|
|
@@ -187661,7 +187659,6 @@ ${e.message}`;
|
|
|
187661
187659
|
startsWithDirectory: () => startsWithDirectory,
|
|
187662
187660
|
startsWithUnderscore: () => startsWithUnderscore,
|
|
187663
187661
|
startsWithUseStrict: () => startsWithUseStrict,
|
|
187664
|
-
stringContains: () => stringContains,
|
|
187665
187662
|
stringContainsAt: () => stringContainsAt,
|
|
187666
187663
|
stringToToken: () => stringToToken,
|
|
187667
187664
|
stripQuotes: () => stripQuotes,
|