@typescript-deploys/pr-build 5.4.0-pr-57230-11 → 5.4.0-pr-56594-3
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/lib.esnext.collection.d.ts +0 -46
- package/lib/tsc.js +57 -23
- package/lib/tsserver.js +199 -105
- package/lib/typescript.d.ts +0 -12
- package/lib/typescript.js +199 -105
- package/lib/typingsInstaller.js +3 -14
- package/package.json +2 -2
|
@@ -27,49 +27,3 @@ interface MapConstructor {
|
|
|
27
27
|
keySelector: (item: T, index: number) => K,
|
|
28
28
|
): Map<K, T[]>;
|
|
29
29
|
}
|
|
30
|
-
|
|
31
|
-
interface SetLike<T> {
|
|
32
|
-
/**
|
|
33
|
-
* Despite its name, returns an iterable of the values in the set-like.
|
|
34
|
-
*/
|
|
35
|
-
keys(): Iterable<T>;
|
|
36
|
-
/**
|
|
37
|
-
* @returns a boolean indicating whether an element with the specified value exists in the set-like or not.
|
|
38
|
-
*/
|
|
39
|
-
has(value: T): boolean;
|
|
40
|
-
/**
|
|
41
|
-
* @returns the number of (unique) elements in the set-like.
|
|
42
|
-
*/
|
|
43
|
-
readonly size: number;
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
interface Set<T> {
|
|
47
|
-
/**
|
|
48
|
-
* @returns a new Set containing all the elements in this Set and also all the elements in the argument.
|
|
49
|
-
*/
|
|
50
|
-
union(other: SetLike<T>): Set<T>;
|
|
51
|
-
/**
|
|
52
|
-
* @returns a new Set containing all the elements which are both in this Set and in the argument.
|
|
53
|
-
*/
|
|
54
|
-
intersection(other: SetLike<T>): Set<T>;
|
|
55
|
-
/**
|
|
56
|
-
* @returns a new Set containing all the elements in this Set which are not also in the argument.
|
|
57
|
-
*/
|
|
58
|
-
difference(other: SetLike<T>): Set<T>;
|
|
59
|
-
/**
|
|
60
|
-
* @returns a new Set containing all the elements in this Set which are in this or in the argument, but not in both.
|
|
61
|
-
*/
|
|
62
|
-
symmetricDifference(other: SetLike<T>): Set<T>;
|
|
63
|
-
/**
|
|
64
|
-
* @returns a boolean indicating whether all the elements in this Set are also in the argument.
|
|
65
|
-
*/
|
|
66
|
-
isSubsetOf(other: SetLike<T>): Set<T>;
|
|
67
|
-
/**
|
|
68
|
-
* @returns a boolean indicating whether all the elements in the argument are also in this Set.
|
|
69
|
-
*/
|
|
70
|
-
isSupersetOf(other: SetLike<T>): Set<T>;
|
|
71
|
-
/**
|
|
72
|
-
* @returns a boolean indicating whether this Set has no elements in common with the argument.
|
|
73
|
-
*/
|
|
74
|
-
isDisjointFrom(other: SetLike<T>): Set<T>;
|
|
75
|
-
}
|
package/lib/tsc.js
CHANGED
|
@@ -18,7 +18,7 @@ and limitations under the License.
|
|
|
18
18
|
|
|
19
19
|
// src/compiler/corePublic.ts
|
|
20
20
|
var versionMajorMinor = "5.4";
|
|
21
|
-
var version = `${versionMajorMinor}.0-insiders.
|
|
21
|
+
var version = `${versionMajorMinor}.0-insiders.20240205`;
|
|
22
22
|
|
|
23
23
|
// src/compiler/core.ts
|
|
24
24
|
var emptyArray = [];
|
|
@@ -6923,7 +6923,6 @@ var Diagnostics = {
|
|
|
6923
6923
|
Disallow_inconsistently_cased_references_to_the_same_file: diag(6078, 3 /* Message */, "Disallow_inconsistently_cased_references_to_the_same_file_6078", "Disallow inconsistently-cased references to the same file."),
|
|
6924
6924
|
Specify_library_files_to_be_included_in_the_compilation: diag(6079, 3 /* Message */, "Specify_library_files_to_be_included_in_the_compilation_6079", "Specify library files to be included in the compilation."),
|
|
6925
6925
|
Specify_JSX_code_generation: diag(6080, 3 /* Message */, "Specify_JSX_code_generation_6080", "Specify JSX code generation."),
|
|
6926
|
-
File_0_has_an_unsupported_extension_so_skipping_it: diag(6081, 3 /* Message */, "File_0_has_an_unsupported_extension_so_skipping_it_6081", "File '{0}' has an unsupported extension, so skipping it."),
|
|
6927
6926
|
Only_amd_and_system_modules_are_supported_alongside_0: diag(6082, 1 /* Error */, "Only_amd_and_system_modules_are_supported_alongside_0_6082", "Only 'amd' and 'system' modules are supported alongside --{0}."),
|
|
6928
6927
|
Base_directory_to_resolve_non_absolute_module_names: diag(6083, 3 /* Message */, "Base_directory_to_resolve_non_absolute_module_names_6083", "Base directory to resolve non-absolute module names."),
|
|
6929
6928
|
Deprecated_Use_jsxFactory_instead_Specify_the_object_invoked_for_createElement_when_targeting_react_JSX_emit: diag(6084, 3 /* Message */, "Deprecated_Use_jsxFactory_instead_Specify_the_object_invoked_for_createElement_when_targeting_react__6084", "[Deprecated] Use '--jsxFactory' instead. Specify the object invoked for createElement when targeting 'react' JSX emit"),
|
|
@@ -38721,15 +38720,9 @@ function loadNodeModuleFromDirectoryWorker(extensions, candidate, onlyRecordFail
|
|
|
38721
38720
|
}
|
|
38722
38721
|
}
|
|
38723
38722
|
const loader = (extensions2, candidate2, onlyRecordFailures2, state2) => {
|
|
38724
|
-
const fromFile =
|
|
38723
|
+
const fromFile = loadFileNameFromPackageJsonField(extensions2, candidate2, onlyRecordFailures2, state2);
|
|
38725
38724
|
if (fromFile) {
|
|
38726
|
-
|
|
38727
|
-
if (resolved) {
|
|
38728
|
-
return noPackageId(resolved);
|
|
38729
|
-
}
|
|
38730
|
-
if (state2.traceEnabled) {
|
|
38731
|
-
trace(state2.host, Diagnostics.File_0_has_an_unsupported_extension_so_skipping_it, fromFile);
|
|
38732
|
-
}
|
|
38725
|
+
return noPackageId(fromFile);
|
|
38733
38726
|
}
|
|
38734
38727
|
const expandedExtensions = extensions2 === 4 /* Declaration */ ? 1 /* TypeScript */ | 4 /* Declaration */ : extensions2;
|
|
38735
38728
|
const features = state2.features;
|
|
@@ -38785,10 +38778,6 @@ function loadNodeModuleFromDirectoryWorker(extensions, candidate, onlyRecordFail
|
|
|
38785
38778
|
return loadModuleFromFile(extensions, indexPath, onlyRecordFailuresForIndex, state);
|
|
38786
38779
|
}
|
|
38787
38780
|
}
|
|
38788
|
-
function resolvedIfExtensionMatches(extensions, path, resolvedUsingTsExtension) {
|
|
38789
|
-
const ext = tryGetExtensionFromPath2(path);
|
|
38790
|
-
return ext !== void 0 && extensionIsOk(extensions, ext) ? { path, ext, resolvedUsingTsExtension } : void 0;
|
|
38791
|
-
}
|
|
38792
38781
|
function extensionIsOk(extensions, extension) {
|
|
38793
38782
|
return extensions & 2 /* JavaScript */ && (extension === ".js" /* Js */ || extension === ".jsx" /* Jsx */ || extension === ".mjs" /* Mjs */ || extension === ".cjs" /* Cjs */) || extensions & 1 /* TypeScript */ && (extension === ".ts" /* Ts */ || extension === ".tsx" /* Tsx */ || extension === ".mts" /* Mts */ || extension === ".cts" /* Cts */) || extensions & 4 /* Declaration */ && (extension === ".d.ts" /* Dts */ || extension === ".d.mts" /* Dmts */ || extension === ".d.cts" /* Dcts */) || extensions & 8 /* Json */ && extension === ".json" /* Json */ || false;
|
|
38794
38783
|
}
|
|
@@ -83107,7 +83096,7 @@ function createTypeChecker(host) {
|
|
|
83107
83096
|
true,
|
|
83108
83097
|
location
|
|
83109
83098
|
);
|
|
83110
|
-
const
|
|
83099
|
+
const resolvedValueSymbol = valueSymbol && valueSymbol.flags & 2097152 /* Alias */ ? resolveAlias(valueSymbol) : valueSymbol;
|
|
83111
83100
|
isTypeOnly || (isTypeOnly = !!(valueSymbol && getTypeOnlyAliasDeclaration(valueSymbol, 111551 /* Value */)));
|
|
83112
83101
|
const typeSymbol = resolveEntityName(
|
|
83113
83102
|
typeName,
|
|
@@ -83115,26 +83104,30 @@ function createTypeChecker(host) {
|
|
|
83115
83104
|
/*ignoreErrors*/
|
|
83116
83105
|
true,
|
|
83117
83106
|
/*dontResolveAlias*/
|
|
83118
|
-
|
|
83107
|
+
true,
|
|
83119
83108
|
location
|
|
83120
83109
|
);
|
|
83121
|
-
|
|
83110
|
+
const resolvedTypeSymbol = typeSymbol && typeSymbol.flags & 2097152 /* Alias */ ? resolveAlias(typeSymbol) : typeSymbol;
|
|
83111
|
+
if (!valueSymbol) {
|
|
83112
|
+
isTypeOnly || (isTypeOnly = !!(typeSymbol && getTypeOnlyAliasDeclaration(typeSymbol, 788968 /* Type */)));
|
|
83113
|
+
}
|
|
83114
|
+
if (resolvedValueSymbol && resolvedValueSymbol === resolvedTypeSymbol) {
|
|
83122
83115
|
const globalPromiseSymbol = getGlobalPromiseConstructorSymbol(
|
|
83123
83116
|
/*reportErrors*/
|
|
83124
83117
|
false
|
|
83125
83118
|
);
|
|
83126
|
-
if (globalPromiseSymbol &&
|
|
83119
|
+
if (globalPromiseSymbol && resolvedValueSymbol === globalPromiseSymbol) {
|
|
83127
83120
|
return 9 /* Promise */;
|
|
83128
83121
|
}
|
|
83129
|
-
const constructorType = getTypeOfSymbol(
|
|
83122
|
+
const constructorType = getTypeOfSymbol(resolvedValueSymbol);
|
|
83130
83123
|
if (constructorType && isConstructorType(constructorType)) {
|
|
83131
83124
|
return isTypeOnly ? 10 /* TypeWithCallSignature */ : 1 /* TypeWithConstructSignatureAndValue */;
|
|
83132
83125
|
}
|
|
83133
83126
|
}
|
|
83134
|
-
if (!
|
|
83127
|
+
if (!resolvedTypeSymbol) {
|
|
83135
83128
|
return isTypeOnly ? 11 /* ObjectType */ : 0 /* Unknown */;
|
|
83136
83129
|
}
|
|
83137
|
-
const type = getDeclaredTypeOfSymbol(
|
|
83130
|
+
const type = getDeclaredTypeOfSymbol(resolvedTypeSymbol);
|
|
83138
83131
|
if (isErrorType(type)) {
|
|
83139
83132
|
return isTypeOnly ? 11 /* ObjectType */ : 0 /* Unknown */;
|
|
83140
83133
|
} else if (type.flags & 3 /* AnyOrUnknown */) {
|
|
@@ -88604,9 +88597,50 @@ function transformTypeScript(context) {
|
|
|
88604
88597
|
return visitorWorker(node);
|
|
88605
88598
|
}
|
|
88606
88599
|
}
|
|
88607
|
-
function
|
|
88600
|
+
function isElisionBlocked(node) {
|
|
88608
88601
|
const parsed = getParseTreeNode(node);
|
|
88609
|
-
if (parsed
|
|
88602
|
+
if (parsed === node || isExportAssignment(node)) {
|
|
88603
|
+
return false;
|
|
88604
|
+
}
|
|
88605
|
+
if (!parsed || parsed.kind !== node.kind) {
|
|
88606
|
+
return true;
|
|
88607
|
+
}
|
|
88608
|
+
switch (node.kind) {
|
|
88609
|
+
case 272 /* ImportDeclaration */:
|
|
88610
|
+
Debug.assertNode(parsed, isImportDeclaration);
|
|
88611
|
+
if (node.importClause !== parsed.importClause) {
|
|
88612
|
+
return true;
|
|
88613
|
+
}
|
|
88614
|
+
if (node.attributes !== parsed.attributes) {
|
|
88615
|
+
return true;
|
|
88616
|
+
}
|
|
88617
|
+
break;
|
|
88618
|
+
case 271 /* ImportEqualsDeclaration */:
|
|
88619
|
+
Debug.assertNode(parsed, isImportEqualsDeclaration);
|
|
88620
|
+
if (node.name !== parsed.name) {
|
|
88621
|
+
return true;
|
|
88622
|
+
}
|
|
88623
|
+
if (node.isTypeOnly !== parsed.isTypeOnly) {
|
|
88624
|
+
return true;
|
|
88625
|
+
}
|
|
88626
|
+
if (node.moduleReference !== parsed.moduleReference && (isEntityName(node.moduleReference) || isEntityName(parsed.moduleReference))) {
|
|
88627
|
+
return true;
|
|
88628
|
+
}
|
|
88629
|
+
break;
|
|
88630
|
+
case 278 /* ExportDeclaration */:
|
|
88631
|
+
Debug.assertNode(parsed, isExportDeclaration);
|
|
88632
|
+
if (node.exportClause !== parsed.exportClause) {
|
|
88633
|
+
return true;
|
|
88634
|
+
}
|
|
88635
|
+
if (node.attributes !== parsed.attributes) {
|
|
88636
|
+
return true;
|
|
88637
|
+
}
|
|
88638
|
+
break;
|
|
88639
|
+
}
|
|
88640
|
+
return false;
|
|
88641
|
+
}
|
|
88642
|
+
function visitElidableStatement(node) {
|
|
88643
|
+
if (isElisionBlocked(node)) {
|
|
88610
88644
|
if (node.transformFlags & 1 /* ContainsTypeScript */) {
|
|
88611
88645
|
return visitEachChild(node, visitor, context);
|
|
88612
88646
|
}
|
package/lib/tsserver.js
CHANGED
|
@@ -2340,7 +2340,7 @@ module.exports = __toCommonJS(server_exports);
|
|
|
2340
2340
|
|
|
2341
2341
|
// src/compiler/corePublic.ts
|
|
2342
2342
|
var versionMajorMinor = "5.4";
|
|
2343
|
-
var version = `${versionMajorMinor}.0-insiders.
|
|
2343
|
+
var version = `${versionMajorMinor}.0-insiders.20240205`;
|
|
2344
2344
|
var Comparison = /* @__PURE__ */ ((Comparison3) => {
|
|
2345
2345
|
Comparison3[Comparison3["LessThan"] = -1] = "LessThan";
|
|
2346
2346
|
Comparison3[Comparison3["EqualTo"] = 0] = "EqualTo";
|
|
@@ -10490,7 +10490,6 @@ var Diagnostics = {
|
|
|
10490
10490
|
Disallow_inconsistently_cased_references_to_the_same_file: diag(6078, 3 /* Message */, "Disallow_inconsistently_cased_references_to_the_same_file_6078", "Disallow inconsistently-cased references to the same file."),
|
|
10491
10491
|
Specify_library_files_to_be_included_in_the_compilation: diag(6079, 3 /* Message */, "Specify_library_files_to_be_included_in_the_compilation_6079", "Specify library files to be included in the compilation."),
|
|
10492
10492
|
Specify_JSX_code_generation: diag(6080, 3 /* Message */, "Specify_JSX_code_generation_6080", "Specify JSX code generation."),
|
|
10493
|
-
File_0_has_an_unsupported_extension_so_skipping_it: diag(6081, 3 /* Message */, "File_0_has_an_unsupported_extension_so_skipping_it_6081", "File '{0}' has an unsupported extension, so skipping it."),
|
|
10494
10493
|
Only_amd_and_system_modules_are_supported_alongside_0: diag(6082, 1 /* Error */, "Only_amd_and_system_modules_are_supported_alongside_0_6082", "Only 'amd' and 'system' modules are supported alongside --{0}."),
|
|
10495
10494
|
Base_directory_to_resolve_non_absolute_module_names: diag(6083, 3 /* Message */, "Base_directory_to_resolve_non_absolute_module_names_6083", "Base directory to resolve non-absolute module names."),
|
|
10496
10495
|
Deprecated_Use_jsxFactory_instead_Specify_the_object_invoked_for_createElement_when_targeting_react_JSX_emit: diag(6084, 3 /* Message */, "Deprecated_Use_jsxFactory_instead_Specify_the_object_invoked_for_createElement_when_targeting_react__6084", "[Deprecated] Use '--jsxFactory' instead. Specify the object invoked for createElement when targeting 'react' JSX emit"),
|
|
@@ -43393,15 +43392,9 @@ function loadNodeModuleFromDirectoryWorker(extensions, candidate, onlyRecordFail
|
|
|
43393
43392
|
}
|
|
43394
43393
|
}
|
|
43395
43394
|
const loader = (extensions2, candidate2, onlyRecordFailures2, state2) => {
|
|
43396
|
-
const fromFile =
|
|
43395
|
+
const fromFile = loadFileNameFromPackageJsonField(extensions2, candidate2, onlyRecordFailures2, state2);
|
|
43397
43396
|
if (fromFile) {
|
|
43398
|
-
|
|
43399
|
-
if (resolved) {
|
|
43400
|
-
return noPackageId(resolved);
|
|
43401
|
-
}
|
|
43402
|
-
if (state2.traceEnabled) {
|
|
43403
|
-
trace(state2.host, Diagnostics.File_0_has_an_unsupported_extension_so_skipping_it, fromFile);
|
|
43404
|
-
}
|
|
43397
|
+
return noPackageId(fromFile);
|
|
43405
43398
|
}
|
|
43406
43399
|
const expandedExtensions = extensions2 === 4 /* Declaration */ ? 1 /* TypeScript */ | 4 /* Declaration */ : extensions2;
|
|
43407
43400
|
const features = state2.features;
|
|
@@ -43457,10 +43450,6 @@ function loadNodeModuleFromDirectoryWorker(extensions, candidate, onlyRecordFail
|
|
|
43457
43450
|
return loadModuleFromFile(extensions, indexPath, onlyRecordFailuresForIndex, state);
|
|
43458
43451
|
}
|
|
43459
43452
|
}
|
|
43460
|
-
function resolvedIfExtensionMatches(extensions, path, resolvedUsingTsExtension) {
|
|
43461
|
-
const ext = tryGetExtensionFromPath2(path);
|
|
43462
|
-
return ext !== void 0 && extensionIsOk(extensions, ext) ? { path, ext, resolvedUsingTsExtension } : void 0;
|
|
43463
|
-
}
|
|
43464
43453
|
function extensionIsOk(extensions, extension) {
|
|
43465
43454
|
return extensions & 2 /* JavaScript */ && (extension === ".js" /* Js */ || extension === ".jsx" /* Jsx */ || extension === ".mjs" /* Mjs */ || extension === ".cjs" /* Cjs */) || extensions & 1 /* TypeScript */ && (extension === ".ts" /* Ts */ || extension === ".tsx" /* Tsx */ || extension === ".mts" /* Mts */ || extension === ".cts" /* Cts */) || extensions & 4 /* Declaration */ && (extension === ".d.ts" /* Dts */ || extension === ".d.mts" /* Dmts */ || extension === ".d.cts" /* Dcts */) || extensions & 8 /* Json */ && extension === ".json" /* Json */ || false;
|
|
43466
43455
|
}
|
|
@@ -87842,7 +87831,7 @@ function createTypeChecker(host) {
|
|
|
87842
87831
|
true,
|
|
87843
87832
|
location
|
|
87844
87833
|
);
|
|
87845
|
-
const
|
|
87834
|
+
const resolvedValueSymbol = valueSymbol && valueSymbol.flags & 2097152 /* Alias */ ? resolveAlias(valueSymbol) : valueSymbol;
|
|
87846
87835
|
isTypeOnly || (isTypeOnly = !!(valueSymbol && getTypeOnlyAliasDeclaration(valueSymbol, 111551 /* Value */)));
|
|
87847
87836
|
const typeSymbol = resolveEntityName(
|
|
87848
87837
|
typeName,
|
|
@@ -87850,26 +87839,30 @@ function createTypeChecker(host) {
|
|
|
87850
87839
|
/*ignoreErrors*/
|
|
87851
87840
|
true,
|
|
87852
87841
|
/*dontResolveAlias*/
|
|
87853
|
-
|
|
87842
|
+
true,
|
|
87854
87843
|
location
|
|
87855
87844
|
);
|
|
87856
|
-
|
|
87845
|
+
const resolvedTypeSymbol = typeSymbol && typeSymbol.flags & 2097152 /* Alias */ ? resolveAlias(typeSymbol) : typeSymbol;
|
|
87846
|
+
if (!valueSymbol) {
|
|
87847
|
+
isTypeOnly || (isTypeOnly = !!(typeSymbol && getTypeOnlyAliasDeclaration(typeSymbol, 788968 /* Type */)));
|
|
87848
|
+
}
|
|
87849
|
+
if (resolvedValueSymbol && resolvedValueSymbol === resolvedTypeSymbol) {
|
|
87857
87850
|
const globalPromiseSymbol = getGlobalPromiseConstructorSymbol(
|
|
87858
87851
|
/*reportErrors*/
|
|
87859
87852
|
false
|
|
87860
87853
|
);
|
|
87861
|
-
if (globalPromiseSymbol &&
|
|
87854
|
+
if (globalPromiseSymbol && resolvedValueSymbol === globalPromiseSymbol) {
|
|
87862
87855
|
return 9 /* Promise */;
|
|
87863
87856
|
}
|
|
87864
|
-
const constructorType = getTypeOfSymbol(
|
|
87857
|
+
const constructorType = getTypeOfSymbol(resolvedValueSymbol);
|
|
87865
87858
|
if (constructorType && isConstructorType(constructorType)) {
|
|
87866
87859
|
return isTypeOnly ? 10 /* TypeWithCallSignature */ : 1 /* TypeWithConstructSignatureAndValue */;
|
|
87867
87860
|
}
|
|
87868
87861
|
}
|
|
87869
|
-
if (!
|
|
87862
|
+
if (!resolvedTypeSymbol) {
|
|
87870
87863
|
return isTypeOnly ? 11 /* ObjectType */ : 0 /* Unknown */;
|
|
87871
87864
|
}
|
|
87872
|
-
const type = getDeclaredTypeOfSymbol(
|
|
87865
|
+
const type = getDeclaredTypeOfSymbol(resolvedTypeSymbol);
|
|
87873
87866
|
if (isErrorType(type)) {
|
|
87874
87867
|
return isTypeOnly ? 11 /* ObjectType */ : 0 /* Unknown */;
|
|
87875
87868
|
} else if (type.flags & 3 /* AnyOrUnknown */) {
|
|
@@ -93510,9 +93503,50 @@ function transformTypeScript(context) {
|
|
|
93510
93503
|
return visitorWorker(node);
|
|
93511
93504
|
}
|
|
93512
93505
|
}
|
|
93513
|
-
function
|
|
93506
|
+
function isElisionBlocked(node) {
|
|
93514
93507
|
const parsed = getParseTreeNode(node);
|
|
93515
|
-
if (parsed
|
|
93508
|
+
if (parsed === node || isExportAssignment(node)) {
|
|
93509
|
+
return false;
|
|
93510
|
+
}
|
|
93511
|
+
if (!parsed || parsed.kind !== node.kind) {
|
|
93512
|
+
return true;
|
|
93513
|
+
}
|
|
93514
|
+
switch (node.kind) {
|
|
93515
|
+
case 272 /* ImportDeclaration */:
|
|
93516
|
+
Debug.assertNode(parsed, isImportDeclaration);
|
|
93517
|
+
if (node.importClause !== parsed.importClause) {
|
|
93518
|
+
return true;
|
|
93519
|
+
}
|
|
93520
|
+
if (node.attributes !== parsed.attributes) {
|
|
93521
|
+
return true;
|
|
93522
|
+
}
|
|
93523
|
+
break;
|
|
93524
|
+
case 271 /* ImportEqualsDeclaration */:
|
|
93525
|
+
Debug.assertNode(parsed, isImportEqualsDeclaration);
|
|
93526
|
+
if (node.name !== parsed.name) {
|
|
93527
|
+
return true;
|
|
93528
|
+
}
|
|
93529
|
+
if (node.isTypeOnly !== parsed.isTypeOnly) {
|
|
93530
|
+
return true;
|
|
93531
|
+
}
|
|
93532
|
+
if (node.moduleReference !== parsed.moduleReference && (isEntityName(node.moduleReference) || isEntityName(parsed.moduleReference))) {
|
|
93533
|
+
return true;
|
|
93534
|
+
}
|
|
93535
|
+
break;
|
|
93536
|
+
case 278 /* ExportDeclaration */:
|
|
93537
|
+
Debug.assertNode(parsed, isExportDeclaration);
|
|
93538
|
+
if (node.exportClause !== parsed.exportClause) {
|
|
93539
|
+
return true;
|
|
93540
|
+
}
|
|
93541
|
+
if (node.attributes !== parsed.attributes) {
|
|
93542
|
+
return true;
|
|
93543
|
+
}
|
|
93544
|
+
break;
|
|
93545
|
+
}
|
|
93546
|
+
return false;
|
|
93547
|
+
}
|
|
93548
|
+
function visitElidableStatement(node) {
|
|
93549
|
+
if (isElisionBlocked(node)) {
|
|
93516
93550
|
if (node.transformFlags & 1 /* ContainsTypeScript */) {
|
|
93517
93551
|
return visitEachChild(node, visitor, context);
|
|
93518
93552
|
}
|
|
@@ -167864,84 +167898,98 @@ function coalesceImportsWorker(importGroup, comparer, sourceFile, preferences) {
|
|
|
167864
167898
|
if (importGroup.length === 0) {
|
|
167865
167899
|
return importGroup;
|
|
167866
167900
|
}
|
|
167867
|
-
const
|
|
167868
|
-
|
|
167869
|
-
|
|
167870
|
-
|
|
167871
|
-
|
|
167872
|
-
|
|
167873
|
-
|
|
167874
|
-
|
|
167875
|
-
if (!isTypeOnly && defaultImports.length === 1 && namespaceImports.length === 1 && namedImports.length === 0) {
|
|
167876
|
-
const defaultImport = defaultImports[0];
|
|
167877
|
-
coalescedImports.push(
|
|
167878
|
-
updateImportDeclarationAndClause(defaultImport, defaultImport.importClause.name, namespaceImports[0].importClause.namedBindings)
|
|
167879
|
-
);
|
|
167880
|
-
continue;
|
|
167881
|
-
}
|
|
167882
|
-
const sortedNamespaceImports = stableSort(namespaceImports, (i1, i2) => comparer(i1.importClause.namedBindings.name.text, i2.importClause.namedBindings.name.text));
|
|
167883
|
-
for (const namespaceImport of sortedNamespaceImports) {
|
|
167884
|
-
coalescedImports.push(
|
|
167885
|
-
updateImportDeclarationAndClause(
|
|
167886
|
-
namespaceImport,
|
|
167887
|
-
/*name*/
|
|
167888
|
-
void 0,
|
|
167889
|
-
namespaceImport.importClause.namedBindings
|
|
167890
|
-
)
|
|
167891
|
-
);
|
|
167892
|
-
}
|
|
167893
|
-
const firstDefaultImport = firstOrUndefined(defaultImports);
|
|
167894
|
-
const firstNamedImport = firstOrUndefined(namedImports);
|
|
167895
|
-
const importDecl = firstDefaultImport ?? firstNamedImport;
|
|
167896
|
-
if (!importDecl) {
|
|
167897
|
-
continue;
|
|
167901
|
+
const importGroupsByAttributes = groupBy(importGroup, (decl) => {
|
|
167902
|
+
if (decl.attributes) {
|
|
167903
|
+
let attrs = decl.attributes.token + " ";
|
|
167904
|
+
for (const x of sort(decl.attributes.elements, (x2, y) => compareStringsCaseSensitive(x2.name.text, y.name.text))) {
|
|
167905
|
+
attrs += x.name.text + ":";
|
|
167906
|
+
attrs += isStringLiteralLike(x.value) ? `"${x.value.text}"` : x.value.getText() + " ";
|
|
167907
|
+
}
|
|
167908
|
+
return attrs;
|
|
167898
167909
|
}
|
|
167899
|
-
|
|
167900
|
-
|
|
167901
|
-
|
|
167902
|
-
|
|
167903
|
-
|
|
167904
|
-
|
|
167905
|
-
|
|
167906
|
-
|
|
167907
|
-
|
|
167908
|
-
|
|
167909
|
-
|
|
167910
|
-
|
|
167910
|
+
return "";
|
|
167911
|
+
});
|
|
167912
|
+
const coalescedImports = [];
|
|
167913
|
+
for (const attribute in importGroupsByAttributes) {
|
|
167914
|
+
const importGroupSameAttrs = importGroupsByAttributes[attribute];
|
|
167915
|
+
const { importWithoutClause, typeOnlyImports, regularImports } = getCategorizedImports(importGroupSameAttrs);
|
|
167916
|
+
if (importWithoutClause) {
|
|
167917
|
+
coalescedImports.push(importWithoutClause);
|
|
167918
|
+
}
|
|
167919
|
+
for (const group2 of [regularImports, typeOnlyImports]) {
|
|
167920
|
+
const isTypeOnly = group2 === typeOnlyImports;
|
|
167921
|
+
const { defaultImports, namespaceImports, namedImports } = group2;
|
|
167922
|
+
if (!isTypeOnly && defaultImports.length === 1 && namespaceImports.length === 1 && namedImports.length === 0) {
|
|
167923
|
+
const defaultImport = defaultImports[0];
|
|
167924
|
+
coalescedImports.push(
|
|
167925
|
+
updateImportDeclarationAndClause(defaultImport, defaultImport.importClause.name, namespaceImports[0].importClause.namedBindings)
|
|
167926
|
+
);
|
|
167927
|
+
continue;
|
|
167928
|
+
}
|
|
167929
|
+
const sortedNamespaceImports = stableSort(namespaceImports, (i1, i2) => comparer(i1.importClause.namedBindings.name.text, i2.importClause.namedBindings.name.text));
|
|
167930
|
+
for (const namespaceImport of sortedNamespaceImports) {
|
|
167931
|
+
coalescedImports.push(
|
|
167932
|
+
updateImportDeclarationAndClause(
|
|
167933
|
+
namespaceImport,
|
|
167934
|
+
/*name*/
|
|
167935
|
+
void 0,
|
|
167936
|
+
namespaceImport.importClause.namedBindings
|
|
167911
167937
|
)
|
|
167912
167938
|
);
|
|
167913
167939
|
}
|
|
167914
|
-
|
|
167915
|
-
|
|
167916
|
-
|
|
167917
|
-
|
|
167918
|
-
|
|
167919
|
-
|
|
167920
|
-
|
|
167921
|
-
|
|
167922
|
-
|
|
167923
|
-
|
|
167924
|
-
|
|
167925
|
-
|
|
167926
|
-
|
|
167927
|
-
|
|
167928
|
-
|
|
167929
|
-
|
|
167930
|
-
|
|
167931
|
-
|
|
167932
|
-
|
|
167933
|
-
|
|
167934
|
-
|
|
167935
|
-
|
|
167936
|
-
|
|
167937
|
-
|
|
167938
|
-
|
|
167939
|
-
|
|
167940
|
-
);
|
|
167941
|
-
} else {
|
|
167942
|
-
coalescedImports.push(
|
|
167943
|
-
updateImportDeclarationAndClause(importDecl, newDefaultImport, newNamedImports)
|
|
167940
|
+
const firstDefaultImport = firstOrUndefined(defaultImports);
|
|
167941
|
+
const firstNamedImport = firstOrUndefined(namedImports);
|
|
167942
|
+
const importDecl = firstDefaultImport ?? firstNamedImport;
|
|
167943
|
+
if (!importDecl) {
|
|
167944
|
+
continue;
|
|
167945
|
+
}
|
|
167946
|
+
let newDefaultImport;
|
|
167947
|
+
const newImportSpecifiers = [];
|
|
167948
|
+
if (defaultImports.length === 1) {
|
|
167949
|
+
newDefaultImport = defaultImports[0].importClause.name;
|
|
167950
|
+
} else {
|
|
167951
|
+
for (const defaultImport of defaultImports) {
|
|
167952
|
+
newImportSpecifiers.push(
|
|
167953
|
+
factory.createImportSpecifier(
|
|
167954
|
+
/*isTypeOnly*/
|
|
167955
|
+
false,
|
|
167956
|
+
factory.createIdentifier("default"),
|
|
167957
|
+
defaultImport.importClause.name
|
|
167958
|
+
)
|
|
167959
|
+
);
|
|
167960
|
+
}
|
|
167961
|
+
}
|
|
167962
|
+
newImportSpecifiers.push(...getNewImportSpecifiers(namedImports));
|
|
167963
|
+
const sortedImportSpecifiers = factory.createNodeArray(
|
|
167964
|
+
sortSpecifiers(newImportSpecifiers, comparer, preferences),
|
|
167965
|
+
firstNamedImport == null ? void 0 : firstNamedImport.importClause.namedBindings.elements.hasTrailingComma
|
|
167944
167966
|
);
|
|
167967
|
+
const newNamedImports = sortedImportSpecifiers.length === 0 ? newDefaultImport ? void 0 : factory.createNamedImports(emptyArray) : firstNamedImport ? factory.updateNamedImports(firstNamedImport.importClause.namedBindings, sortedImportSpecifiers) : factory.createNamedImports(sortedImportSpecifiers);
|
|
167968
|
+
if (sourceFile && newNamedImports && (firstNamedImport == null ? void 0 : firstNamedImport.importClause.namedBindings) && !rangeIsOnSingleLine(firstNamedImport.importClause.namedBindings, sourceFile)) {
|
|
167969
|
+
setEmitFlags(newNamedImports, 2 /* MultiLine */);
|
|
167970
|
+
}
|
|
167971
|
+
if (isTypeOnly && newDefaultImport && newNamedImports) {
|
|
167972
|
+
coalescedImports.push(
|
|
167973
|
+
updateImportDeclarationAndClause(
|
|
167974
|
+
importDecl,
|
|
167975
|
+
newDefaultImport,
|
|
167976
|
+
/*namedBindings*/
|
|
167977
|
+
void 0
|
|
167978
|
+
)
|
|
167979
|
+
);
|
|
167980
|
+
coalescedImports.push(
|
|
167981
|
+
updateImportDeclarationAndClause(
|
|
167982
|
+
firstNamedImport ?? importDecl,
|
|
167983
|
+
/*name*/
|
|
167984
|
+
void 0,
|
|
167985
|
+
newNamedImports
|
|
167986
|
+
)
|
|
167987
|
+
);
|
|
167988
|
+
} else {
|
|
167989
|
+
coalescedImports.push(
|
|
167990
|
+
updateImportDeclarationAndClause(importDecl, newDefaultImport, newNamedImports)
|
|
167991
|
+
);
|
|
167992
|
+
}
|
|
167945
167993
|
}
|
|
167946
167994
|
}
|
|
167947
167995
|
return coalescedImports;
|
|
@@ -178434,6 +178482,7 @@ var Project3 = class _Project {
|
|
|
178434
178482
|
/**
|
|
178435
178483
|
* Current project's program version. (incremented everytime new program is created that is not complete reuse from the old one)
|
|
178436
178484
|
* This property is changed in 'updateGraph' based on the set of files in program
|
|
178485
|
+
* @internal
|
|
178437
178486
|
*/
|
|
178438
178487
|
this.projectProgramVersion = 0;
|
|
178439
178488
|
/**
|
|
@@ -178441,6 +178490,7 @@ var Project3 = class _Project {
|
|
|
178441
178490
|
* - new root file was added/removed
|
|
178442
178491
|
* - edit happen in some file that is currently included in the project.
|
|
178443
178492
|
* This property is different from projectStructureVersion since in most cases edits don't affect set of files in the project
|
|
178493
|
+
* @internal
|
|
178444
178494
|
*/
|
|
178445
178495
|
this.projectStateVersion = 0;
|
|
178446
178496
|
this.isInitialLoadPending = returnFalse;
|
|
@@ -179478,7 +179528,7 @@ var Project3 = class _Project {
|
|
|
179478
179528
|
);
|
|
179479
179529
|
const elapsed = timestamp() - start2;
|
|
179480
179530
|
this.sendPerformanceEvent("UpdateGraph", elapsed);
|
|
179481
|
-
this.writeLog(`Finishing updateGraphWorker: Project: ${this.getProjectName()}
|
|
179531
|
+
this.writeLog(`Finishing updateGraphWorker: Project: ${this.getProjectName()} projectStateVersion: ${this.projectStateVersion} projectProgramVersion: ${this.projectProgramVersion} structureChanged: ${hasNewProgram}${this.program ? ` structureIsReused:: ${StructureIsReused[this.program.structureIsReused]}` : ""} Elapsed: ${elapsed}ms`);
|
|
179482
179532
|
if (this.projectService.logger.isTestLogger) {
|
|
179483
179533
|
if (this.program !== oldProgram) {
|
|
179484
179534
|
this.print(
|
|
@@ -179641,6 +179691,7 @@ var Project3 = class _Project {
|
|
|
179641
179691
|
}
|
|
179642
179692
|
/** @internal */
|
|
179643
179693
|
print(writeProjectFileNames, writeFileExplaination, writeFileVersionAndText) {
|
|
179694
|
+
var _a;
|
|
179644
179695
|
this.writeLog(`Project '${this.projectName}' (${ProjectKind[this.projectKind]})`);
|
|
179645
179696
|
this.writeLog(this.filesToStringWorker(
|
|
179646
179697
|
writeProjectFileNames && this.projectService.logger.hasLevel(3 /* verbose */),
|
|
@@ -179658,6 +179709,14 @@ var Project3 = class _Project {
|
|
|
179658
179709
|
false
|
|
179659
179710
|
);
|
|
179660
179711
|
}
|
|
179712
|
+
(_a = this.noDtsResolutionProject) == null ? void 0 : _a.print(
|
|
179713
|
+
/*writeProjectFileNames*/
|
|
179714
|
+
false,
|
|
179715
|
+
/*writeFileExplaination*/
|
|
179716
|
+
false,
|
|
179717
|
+
/*writeFileVersionAndText*/
|
|
179718
|
+
false
|
|
179719
|
+
);
|
|
179661
179720
|
}
|
|
179662
179721
|
setCompilerOptions(compilerOptions) {
|
|
179663
179722
|
var _a;
|
|
@@ -181098,6 +181157,8 @@ var _ProjectService = class _ProjectService {
|
|
|
181098
181157
|
/** @internal */
|
|
181099
181158
|
this.extendedConfigCache = /* @__PURE__ */ new Map();
|
|
181100
181159
|
/** @internal */
|
|
181160
|
+
this.baseline = noop;
|
|
181161
|
+
/** @internal */
|
|
181101
181162
|
this.verifyDocumentRegistry = noop;
|
|
181102
181163
|
/** @internal */
|
|
181103
181164
|
this.verifyProgram = noop;
|
|
@@ -183087,6 +183148,8 @@ Dynamic files must always be opened with service's current directory or service
|
|
|
183087
183148
|
});
|
|
183088
183149
|
this.inferredProjects.forEach((project) => this.clearSemanticCache(project));
|
|
183089
183150
|
this.ensureProjectForOpenFiles();
|
|
183151
|
+
this.logger.info("After reloading projects..");
|
|
183152
|
+
this.printProjects();
|
|
183090
183153
|
}
|
|
183091
183154
|
/**
|
|
183092
183155
|
* This function goes through all the openFiles and tries to file the config file for them.
|
|
@@ -183612,7 +183675,7 @@ Dynamic files must always be opened with service's current directory or service
|
|
|
183612
183675
|
}
|
|
183613
183676
|
}
|
|
183614
183677
|
}
|
|
183615
|
-
closeExternalProject(uncheckedFileName) {
|
|
183678
|
+
closeExternalProject(uncheckedFileName, print) {
|
|
183616
183679
|
const fileName = toNormalizedPath(uncheckedFileName);
|
|
183617
183680
|
const configFiles = this.externalProjectToConfiguredProjectMap.get(fileName);
|
|
183618
183681
|
if (configFiles) {
|
|
@@ -183626,6 +183689,8 @@ Dynamic files must always be opened with service's current directory or service
|
|
|
183626
183689
|
this.removeProject(externalProject);
|
|
183627
183690
|
}
|
|
183628
183691
|
}
|
|
183692
|
+
if (print)
|
|
183693
|
+
this.printProjects();
|
|
183629
183694
|
}
|
|
183630
183695
|
openExternalProjects(projects) {
|
|
183631
183696
|
const projectsToClose = arrayToMap(this.externalProjects, (p) => p.getProjectName(), (_) => true);
|
|
@@ -183633,12 +183698,21 @@ Dynamic files must always be opened with service's current directory or service
|
|
|
183633
183698
|
projectsToClose.set(externalProjectName, true);
|
|
183634
183699
|
});
|
|
183635
183700
|
for (const externalProject of projects) {
|
|
183636
|
-
this.openExternalProject(
|
|
183701
|
+
this.openExternalProject(
|
|
183702
|
+
externalProject,
|
|
183703
|
+
/*print*/
|
|
183704
|
+
false
|
|
183705
|
+
);
|
|
183637
183706
|
projectsToClose.delete(externalProject.projectFileName);
|
|
183638
183707
|
}
|
|
183639
183708
|
forEachKey(projectsToClose, (externalProjectName) => {
|
|
183640
|
-
this.closeExternalProject(
|
|
183709
|
+
this.closeExternalProject(
|
|
183710
|
+
externalProjectName,
|
|
183711
|
+
/*print*/
|
|
183712
|
+
false
|
|
183713
|
+
);
|
|
183641
183714
|
});
|
|
183715
|
+
this.printProjects();
|
|
183642
183716
|
}
|
|
183643
183717
|
static escapeFilenameForRegex(filename) {
|
|
183644
183718
|
return filename.replace(this.filenameEscapeRegexp, "\\$&");
|
|
@@ -183731,7 +183805,7 @@ Dynamic files must always be opened with service's current directory or service
|
|
|
183731
183805
|
proj.rootFiles = filesToKeep;
|
|
183732
183806
|
return excludedFiles;
|
|
183733
183807
|
}
|
|
183734
|
-
openExternalProject(proj) {
|
|
183808
|
+
openExternalProject(proj, print) {
|
|
183735
183809
|
proj.typeAcquisition = proj.typeAcquisition || {};
|
|
183736
183810
|
proj.typeAcquisition.include = proj.typeAcquisition.include || [];
|
|
183737
183811
|
proj.typeAcquisition.exclude = proj.typeAcquisition.exclude || [];
|
|
@@ -183770,12 +183844,22 @@ Dynamic files must always be opened with service's current directory or service
|
|
|
183770
183844
|
externalProject.setProjectErrors(watchOptionsAndErrors == null ? void 0 : watchOptionsAndErrors.errors);
|
|
183771
183845
|
this.updateRootAndOptionsOfNonInferredProject(externalProject, proj.rootFiles, externalFilePropertyReader, compilerOptions, proj.typeAcquisition, proj.options.compileOnSave, watchOptionsAndErrors == null ? void 0 : watchOptionsAndErrors.watchOptions);
|
|
183772
183846
|
externalProject.updateGraph();
|
|
183847
|
+
if (print)
|
|
183848
|
+
this.printProjects();
|
|
183773
183849
|
return;
|
|
183774
183850
|
}
|
|
183775
|
-
this.closeExternalProject(
|
|
183851
|
+
this.closeExternalProject(
|
|
183852
|
+
proj.projectFileName,
|
|
183853
|
+
/*print*/
|
|
183854
|
+
false
|
|
183855
|
+
);
|
|
183776
183856
|
} else if (this.externalProjectToConfiguredProjectMap.get(proj.projectFileName)) {
|
|
183777
183857
|
if (!tsConfigFiles) {
|
|
183778
|
-
this.closeExternalProject(
|
|
183858
|
+
this.closeExternalProject(
|
|
183859
|
+
proj.projectFileName,
|
|
183860
|
+
/*print*/
|
|
183861
|
+
false
|
|
183862
|
+
);
|
|
183779
183863
|
} else {
|
|
183780
183864
|
const oldConfigFiles = this.externalProjectToConfiguredProjectMap.get(proj.projectFileName);
|
|
183781
183865
|
let iNew = 0;
|
|
@@ -183815,6 +183899,8 @@ Dynamic files must always be opened with service's current directory or service
|
|
|
183815
183899
|
const project = this.createExternalProject(proj.projectFileName, rootFiles, proj.options, proj.typeAcquisition, excludedFiles);
|
|
183816
183900
|
project.updateGraph();
|
|
183817
183901
|
}
|
|
183902
|
+
if (print)
|
|
183903
|
+
this.printProjects();
|
|
183818
183904
|
}
|
|
183819
183905
|
hasDeferredExtension() {
|
|
183820
183906
|
for (const extension of this.hostConfiguration.extraFileExtensions) {
|
|
@@ -184741,7 +184827,11 @@ var Session3 = class _Session {
|
|
|
184741
184827
|
return this.requiredResponse(response);
|
|
184742
184828
|
},
|
|
184743
184829
|
["openExternalProject" /* OpenExternalProject */]: (request) => {
|
|
184744
|
-
this.projectService.openExternalProject(
|
|
184830
|
+
this.projectService.openExternalProject(
|
|
184831
|
+
request.arguments,
|
|
184832
|
+
/*print*/
|
|
184833
|
+
true
|
|
184834
|
+
);
|
|
184745
184835
|
return this.requiredResponse(
|
|
184746
184836
|
/*response*/
|
|
184747
184837
|
true
|
|
@@ -184755,7 +184845,11 @@ var Session3 = class _Session {
|
|
|
184755
184845
|
);
|
|
184756
184846
|
},
|
|
184757
184847
|
["closeExternalProject" /* CloseExternalProject */]: (request) => {
|
|
184758
|
-
this.projectService.closeExternalProject(
|
|
184848
|
+
this.projectService.closeExternalProject(
|
|
184849
|
+
request.arguments.projectFileName,
|
|
184850
|
+
/*print*/
|
|
184851
|
+
true
|
|
184852
|
+
);
|
|
184759
184853
|
return this.requiredResponse(
|
|
184760
184854
|
/*response*/
|
|
184761
184855
|
true
|
package/lib/typescript.d.ts
CHANGED
|
@@ -3332,18 +3332,6 @@ declare namespace ts {
|
|
|
3332
3332
|
* Last version that was reported.
|
|
3333
3333
|
*/
|
|
3334
3334
|
private lastReportedVersion;
|
|
3335
|
-
/**
|
|
3336
|
-
* Current project's program version. (incremented everytime new program is created that is not complete reuse from the old one)
|
|
3337
|
-
* This property is changed in 'updateGraph' based on the set of files in program
|
|
3338
|
-
*/
|
|
3339
|
-
private projectProgramVersion;
|
|
3340
|
-
/**
|
|
3341
|
-
* Current version of the project state. It is changed when:
|
|
3342
|
-
* - new root file was added/removed
|
|
3343
|
-
* - edit happen in some file that is currently included in the project.
|
|
3344
|
-
* This property is different from projectStructureVersion since in most cases edits don't affect set of files in the project
|
|
3345
|
-
*/
|
|
3346
|
-
private projectStateVersion;
|
|
3347
3335
|
protected projectErrors: Diagnostic[] | undefined;
|
|
3348
3336
|
protected isInitialLoadPending: () => boolean;
|
|
3349
3337
|
private readonly cancellationToken;
|
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.4";
|
|
38
|
-
version = `${versionMajorMinor}.0-insiders.
|
|
38
|
+
version = `${versionMajorMinor}.0-insiders.20240205`;
|
|
39
39
|
Comparison = /* @__PURE__ */ ((Comparison3) => {
|
|
40
40
|
Comparison3[Comparison3["LessThan"] = -1] = "LessThan";
|
|
41
41
|
Comparison3[Comparison3["EqualTo"] = 0] = "EqualTo";
|
|
@@ -8260,7 +8260,6 @@ ${lanes.join("\n")}
|
|
|
8260
8260
|
Disallow_inconsistently_cased_references_to_the_same_file: diag(6078, 3 /* Message */, "Disallow_inconsistently_cased_references_to_the_same_file_6078", "Disallow inconsistently-cased references to the same file."),
|
|
8261
8261
|
Specify_library_files_to_be_included_in_the_compilation: diag(6079, 3 /* Message */, "Specify_library_files_to_be_included_in_the_compilation_6079", "Specify library files to be included in the compilation."),
|
|
8262
8262
|
Specify_JSX_code_generation: diag(6080, 3 /* Message */, "Specify_JSX_code_generation_6080", "Specify JSX code generation."),
|
|
8263
|
-
File_0_has_an_unsupported_extension_so_skipping_it: diag(6081, 3 /* Message */, "File_0_has_an_unsupported_extension_so_skipping_it_6081", "File '{0}' has an unsupported extension, so skipping it."),
|
|
8264
8263
|
Only_amd_and_system_modules_are_supported_alongside_0: diag(6082, 1 /* Error */, "Only_amd_and_system_modules_are_supported_alongside_0_6082", "Only 'amd' and 'system' modules are supported alongside --{0}."),
|
|
8265
8264
|
Base_directory_to_resolve_non_absolute_module_names: diag(6083, 3 /* Message */, "Base_directory_to_resolve_non_absolute_module_names_6083", "Base directory to resolve non-absolute module names."),
|
|
8266
8265
|
Deprecated_Use_jsxFactory_instead_Specify_the_object_invoked_for_createElement_when_targeting_react_JSX_emit: diag(6084, 3 /* Message */, "Deprecated_Use_jsxFactory_instead_Specify_the_object_invoked_for_createElement_when_targeting_react__6084", "[Deprecated] Use '--jsxFactory' instead. Specify the object invoked for createElement when targeting 'react' JSX emit"),
|
|
@@ -41225,15 +41224,9 @@ ${lanes.join("\n")}
|
|
|
41225
41224
|
}
|
|
41226
41225
|
}
|
|
41227
41226
|
const loader = (extensions2, candidate2, onlyRecordFailures2, state2) => {
|
|
41228
|
-
const fromFile =
|
|
41227
|
+
const fromFile = loadFileNameFromPackageJsonField(extensions2, candidate2, onlyRecordFailures2, state2);
|
|
41229
41228
|
if (fromFile) {
|
|
41230
|
-
|
|
41231
|
-
if (resolved) {
|
|
41232
|
-
return noPackageId(resolved);
|
|
41233
|
-
}
|
|
41234
|
-
if (state2.traceEnabled) {
|
|
41235
|
-
trace(state2.host, Diagnostics.File_0_has_an_unsupported_extension_so_skipping_it, fromFile);
|
|
41236
|
-
}
|
|
41229
|
+
return noPackageId(fromFile);
|
|
41237
41230
|
}
|
|
41238
41231
|
const expandedExtensions = extensions2 === 4 /* Declaration */ ? 1 /* TypeScript */ | 4 /* Declaration */ : extensions2;
|
|
41239
41232
|
const features = state2.features;
|
|
@@ -41289,10 +41282,6 @@ ${lanes.join("\n")}
|
|
|
41289
41282
|
return loadModuleFromFile(extensions, indexPath, onlyRecordFailuresForIndex, state);
|
|
41290
41283
|
}
|
|
41291
41284
|
}
|
|
41292
|
-
function resolvedIfExtensionMatches(extensions, path, resolvedUsingTsExtension) {
|
|
41293
|
-
const ext = tryGetExtensionFromPath2(path);
|
|
41294
|
-
return ext !== void 0 && extensionIsOk(extensions, ext) ? { path, ext, resolvedUsingTsExtension } : void 0;
|
|
41295
|
-
}
|
|
41296
41285
|
function extensionIsOk(extensions, extension) {
|
|
41297
41286
|
return extensions & 2 /* JavaScript */ && (extension === ".js" /* Js */ || extension === ".jsx" /* Jsx */ || extension === ".mjs" /* Mjs */ || extension === ".cjs" /* Cjs */) || extensions & 1 /* TypeScript */ && (extension === ".ts" /* Ts */ || extension === ".tsx" /* Tsx */ || extension === ".mts" /* Mts */ || extension === ".cts" /* Cts */) || extensions & 4 /* Declaration */ && (extension === ".d.ts" /* Dts */ || extension === ".d.mts" /* Dmts */ || extension === ".d.cts" /* Dcts */) || extensions & 8 /* Json */ && extension === ".json" /* Json */ || false;
|
|
41298
41287
|
}
|
|
@@ -85596,7 +85585,7 @@ ${lanes.join("\n")}
|
|
|
85596
85585
|
true,
|
|
85597
85586
|
location
|
|
85598
85587
|
);
|
|
85599
|
-
const
|
|
85588
|
+
const resolvedValueSymbol = valueSymbol && valueSymbol.flags & 2097152 /* Alias */ ? resolveAlias(valueSymbol) : valueSymbol;
|
|
85600
85589
|
isTypeOnly || (isTypeOnly = !!(valueSymbol && getTypeOnlyAliasDeclaration(valueSymbol, 111551 /* Value */)));
|
|
85601
85590
|
const typeSymbol = resolveEntityName(
|
|
85602
85591
|
typeName,
|
|
@@ -85604,26 +85593,30 @@ ${lanes.join("\n")}
|
|
|
85604
85593
|
/*ignoreErrors*/
|
|
85605
85594
|
true,
|
|
85606
85595
|
/*dontResolveAlias*/
|
|
85607
|
-
|
|
85596
|
+
true,
|
|
85608
85597
|
location
|
|
85609
85598
|
);
|
|
85610
|
-
|
|
85599
|
+
const resolvedTypeSymbol = typeSymbol && typeSymbol.flags & 2097152 /* Alias */ ? resolveAlias(typeSymbol) : typeSymbol;
|
|
85600
|
+
if (!valueSymbol) {
|
|
85601
|
+
isTypeOnly || (isTypeOnly = !!(typeSymbol && getTypeOnlyAliasDeclaration(typeSymbol, 788968 /* Type */)));
|
|
85602
|
+
}
|
|
85603
|
+
if (resolvedValueSymbol && resolvedValueSymbol === resolvedTypeSymbol) {
|
|
85611
85604
|
const globalPromiseSymbol = getGlobalPromiseConstructorSymbol(
|
|
85612
85605
|
/*reportErrors*/
|
|
85613
85606
|
false
|
|
85614
85607
|
);
|
|
85615
|
-
if (globalPromiseSymbol &&
|
|
85608
|
+
if (globalPromiseSymbol && resolvedValueSymbol === globalPromiseSymbol) {
|
|
85616
85609
|
return 9 /* Promise */;
|
|
85617
85610
|
}
|
|
85618
|
-
const constructorType = getTypeOfSymbol(
|
|
85611
|
+
const constructorType = getTypeOfSymbol(resolvedValueSymbol);
|
|
85619
85612
|
if (constructorType && isConstructorType(constructorType)) {
|
|
85620
85613
|
return isTypeOnly ? 10 /* TypeWithCallSignature */ : 1 /* TypeWithConstructSignatureAndValue */;
|
|
85621
85614
|
}
|
|
85622
85615
|
}
|
|
85623
|
-
if (!
|
|
85616
|
+
if (!resolvedTypeSymbol) {
|
|
85624
85617
|
return isTypeOnly ? 11 /* ObjectType */ : 0 /* Unknown */;
|
|
85625
85618
|
}
|
|
85626
|
-
const type = getDeclaredTypeOfSymbol(
|
|
85619
|
+
const type = getDeclaredTypeOfSymbol(resolvedTypeSymbol);
|
|
85627
85620
|
if (isErrorType(type)) {
|
|
85628
85621
|
return isTypeOnly ? 11 /* ObjectType */ : 0 /* Unknown */;
|
|
85629
85622
|
} else if (type.flags & 3 /* AnyOrUnknown */) {
|
|
@@ -91445,9 +91438,50 @@ ${lanes.join("\n")}
|
|
|
91445
91438
|
return visitorWorker(node);
|
|
91446
91439
|
}
|
|
91447
91440
|
}
|
|
91448
|
-
function
|
|
91441
|
+
function isElisionBlocked(node) {
|
|
91449
91442
|
const parsed = getParseTreeNode(node);
|
|
91450
|
-
if (parsed
|
|
91443
|
+
if (parsed === node || isExportAssignment(node)) {
|
|
91444
|
+
return false;
|
|
91445
|
+
}
|
|
91446
|
+
if (!parsed || parsed.kind !== node.kind) {
|
|
91447
|
+
return true;
|
|
91448
|
+
}
|
|
91449
|
+
switch (node.kind) {
|
|
91450
|
+
case 272 /* ImportDeclaration */:
|
|
91451
|
+
Debug.assertNode(parsed, isImportDeclaration);
|
|
91452
|
+
if (node.importClause !== parsed.importClause) {
|
|
91453
|
+
return true;
|
|
91454
|
+
}
|
|
91455
|
+
if (node.attributes !== parsed.attributes) {
|
|
91456
|
+
return true;
|
|
91457
|
+
}
|
|
91458
|
+
break;
|
|
91459
|
+
case 271 /* ImportEqualsDeclaration */:
|
|
91460
|
+
Debug.assertNode(parsed, isImportEqualsDeclaration);
|
|
91461
|
+
if (node.name !== parsed.name) {
|
|
91462
|
+
return true;
|
|
91463
|
+
}
|
|
91464
|
+
if (node.isTypeOnly !== parsed.isTypeOnly) {
|
|
91465
|
+
return true;
|
|
91466
|
+
}
|
|
91467
|
+
if (node.moduleReference !== parsed.moduleReference && (isEntityName(node.moduleReference) || isEntityName(parsed.moduleReference))) {
|
|
91468
|
+
return true;
|
|
91469
|
+
}
|
|
91470
|
+
break;
|
|
91471
|
+
case 278 /* ExportDeclaration */:
|
|
91472
|
+
Debug.assertNode(parsed, isExportDeclaration);
|
|
91473
|
+
if (node.exportClause !== parsed.exportClause) {
|
|
91474
|
+
return true;
|
|
91475
|
+
}
|
|
91476
|
+
if (node.attributes !== parsed.attributes) {
|
|
91477
|
+
return true;
|
|
91478
|
+
}
|
|
91479
|
+
break;
|
|
91480
|
+
}
|
|
91481
|
+
return false;
|
|
91482
|
+
}
|
|
91483
|
+
function visitElidableStatement(node) {
|
|
91484
|
+
if (isElisionBlocked(node)) {
|
|
91451
91485
|
if (node.transformFlags & 1 /* ContainsTypeScript */) {
|
|
91452
91486
|
return visitEachChild(node, visitor, context);
|
|
91453
91487
|
}
|
|
@@ -167224,84 +167258,98 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
167224
167258
|
if (importGroup.length === 0) {
|
|
167225
167259
|
return importGroup;
|
|
167226
167260
|
}
|
|
167227
|
-
const
|
|
167228
|
-
|
|
167229
|
-
|
|
167230
|
-
|
|
167231
|
-
|
|
167232
|
-
|
|
167233
|
-
|
|
167234
|
-
|
|
167235
|
-
if (!isTypeOnly && defaultImports.length === 1 && namespaceImports.length === 1 && namedImports.length === 0) {
|
|
167236
|
-
const defaultImport = defaultImports[0];
|
|
167237
|
-
coalescedImports.push(
|
|
167238
|
-
updateImportDeclarationAndClause(defaultImport, defaultImport.importClause.name, namespaceImports[0].importClause.namedBindings)
|
|
167239
|
-
);
|
|
167240
|
-
continue;
|
|
167241
|
-
}
|
|
167242
|
-
const sortedNamespaceImports = stableSort(namespaceImports, (i1, i2) => comparer(i1.importClause.namedBindings.name.text, i2.importClause.namedBindings.name.text));
|
|
167243
|
-
for (const namespaceImport of sortedNamespaceImports) {
|
|
167244
|
-
coalescedImports.push(
|
|
167245
|
-
updateImportDeclarationAndClause(
|
|
167246
|
-
namespaceImport,
|
|
167247
|
-
/*name*/
|
|
167248
|
-
void 0,
|
|
167249
|
-
namespaceImport.importClause.namedBindings
|
|
167250
|
-
)
|
|
167251
|
-
);
|
|
167252
|
-
}
|
|
167253
|
-
const firstDefaultImport = firstOrUndefined(defaultImports);
|
|
167254
|
-
const firstNamedImport = firstOrUndefined(namedImports);
|
|
167255
|
-
const importDecl = firstDefaultImport ?? firstNamedImport;
|
|
167256
|
-
if (!importDecl) {
|
|
167257
|
-
continue;
|
|
167261
|
+
const importGroupsByAttributes = groupBy(importGroup, (decl) => {
|
|
167262
|
+
if (decl.attributes) {
|
|
167263
|
+
let attrs = decl.attributes.token + " ";
|
|
167264
|
+
for (const x of sort(decl.attributes.elements, (x2, y) => compareStringsCaseSensitive(x2.name.text, y.name.text))) {
|
|
167265
|
+
attrs += x.name.text + ":";
|
|
167266
|
+
attrs += isStringLiteralLike(x.value) ? `"${x.value.text}"` : x.value.getText() + " ";
|
|
167267
|
+
}
|
|
167268
|
+
return attrs;
|
|
167258
167269
|
}
|
|
167259
|
-
|
|
167260
|
-
|
|
167261
|
-
|
|
167262
|
-
|
|
167263
|
-
|
|
167264
|
-
|
|
167265
|
-
|
|
167266
|
-
|
|
167267
|
-
|
|
167268
|
-
|
|
167269
|
-
|
|
167270
|
-
|
|
167270
|
+
return "";
|
|
167271
|
+
});
|
|
167272
|
+
const coalescedImports = [];
|
|
167273
|
+
for (const attribute in importGroupsByAttributes) {
|
|
167274
|
+
const importGroupSameAttrs = importGroupsByAttributes[attribute];
|
|
167275
|
+
const { importWithoutClause, typeOnlyImports, regularImports } = getCategorizedImports(importGroupSameAttrs);
|
|
167276
|
+
if (importWithoutClause) {
|
|
167277
|
+
coalescedImports.push(importWithoutClause);
|
|
167278
|
+
}
|
|
167279
|
+
for (const group2 of [regularImports, typeOnlyImports]) {
|
|
167280
|
+
const isTypeOnly = group2 === typeOnlyImports;
|
|
167281
|
+
const { defaultImports, namespaceImports, namedImports } = group2;
|
|
167282
|
+
if (!isTypeOnly && defaultImports.length === 1 && namespaceImports.length === 1 && namedImports.length === 0) {
|
|
167283
|
+
const defaultImport = defaultImports[0];
|
|
167284
|
+
coalescedImports.push(
|
|
167285
|
+
updateImportDeclarationAndClause(defaultImport, defaultImport.importClause.name, namespaceImports[0].importClause.namedBindings)
|
|
167286
|
+
);
|
|
167287
|
+
continue;
|
|
167288
|
+
}
|
|
167289
|
+
const sortedNamespaceImports = stableSort(namespaceImports, (i1, i2) => comparer(i1.importClause.namedBindings.name.text, i2.importClause.namedBindings.name.text));
|
|
167290
|
+
for (const namespaceImport of sortedNamespaceImports) {
|
|
167291
|
+
coalescedImports.push(
|
|
167292
|
+
updateImportDeclarationAndClause(
|
|
167293
|
+
namespaceImport,
|
|
167294
|
+
/*name*/
|
|
167295
|
+
void 0,
|
|
167296
|
+
namespaceImport.importClause.namedBindings
|
|
167271
167297
|
)
|
|
167272
167298
|
);
|
|
167273
167299
|
}
|
|
167274
|
-
|
|
167275
|
-
|
|
167276
|
-
|
|
167277
|
-
|
|
167278
|
-
|
|
167279
|
-
|
|
167280
|
-
|
|
167281
|
-
|
|
167282
|
-
|
|
167283
|
-
|
|
167284
|
-
|
|
167285
|
-
|
|
167286
|
-
|
|
167287
|
-
|
|
167288
|
-
|
|
167289
|
-
|
|
167290
|
-
|
|
167291
|
-
|
|
167292
|
-
|
|
167293
|
-
|
|
167294
|
-
|
|
167295
|
-
|
|
167296
|
-
|
|
167297
|
-
|
|
167298
|
-
|
|
167299
|
-
|
|
167300
|
-
);
|
|
167301
|
-
} else {
|
|
167302
|
-
coalescedImports.push(
|
|
167303
|
-
updateImportDeclarationAndClause(importDecl, newDefaultImport, newNamedImports)
|
|
167300
|
+
const firstDefaultImport = firstOrUndefined(defaultImports);
|
|
167301
|
+
const firstNamedImport = firstOrUndefined(namedImports);
|
|
167302
|
+
const importDecl = firstDefaultImport ?? firstNamedImport;
|
|
167303
|
+
if (!importDecl) {
|
|
167304
|
+
continue;
|
|
167305
|
+
}
|
|
167306
|
+
let newDefaultImport;
|
|
167307
|
+
const newImportSpecifiers = [];
|
|
167308
|
+
if (defaultImports.length === 1) {
|
|
167309
|
+
newDefaultImport = defaultImports[0].importClause.name;
|
|
167310
|
+
} else {
|
|
167311
|
+
for (const defaultImport of defaultImports) {
|
|
167312
|
+
newImportSpecifiers.push(
|
|
167313
|
+
factory.createImportSpecifier(
|
|
167314
|
+
/*isTypeOnly*/
|
|
167315
|
+
false,
|
|
167316
|
+
factory.createIdentifier("default"),
|
|
167317
|
+
defaultImport.importClause.name
|
|
167318
|
+
)
|
|
167319
|
+
);
|
|
167320
|
+
}
|
|
167321
|
+
}
|
|
167322
|
+
newImportSpecifiers.push(...getNewImportSpecifiers(namedImports));
|
|
167323
|
+
const sortedImportSpecifiers = factory.createNodeArray(
|
|
167324
|
+
sortSpecifiers(newImportSpecifiers, comparer, preferences),
|
|
167325
|
+
firstNamedImport == null ? void 0 : firstNamedImport.importClause.namedBindings.elements.hasTrailingComma
|
|
167304
167326
|
);
|
|
167327
|
+
const newNamedImports = sortedImportSpecifiers.length === 0 ? newDefaultImport ? void 0 : factory.createNamedImports(emptyArray) : firstNamedImport ? factory.updateNamedImports(firstNamedImport.importClause.namedBindings, sortedImportSpecifiers) : factory.createNamedImports(sortedImportSpecifiers);
|
|
167328
|
+
if (sourceFile && newNamedImports && (firstNamedImport == null ? void 0 : firstNamedImport.importClause.namedBindings) && !rangeIsOnSingleLine(firstNamedImport.importClause.namedBindings, sourceFile)) {
|
|
167329
|
+
setEmitFlags(newNamedImports, 2 /* MultiLine */);
|
|
167330
|
+
}
|
|
167331
|
+
if (isTypeOnly && newDefaultImport && newNamedImports) {
|
|
167332
|
+
coalescedImports.push(
|
|
167333
|
+
updateImportDeclarationAndClause(
|
|
167334
|
+
importDecl,
|
|
167335
|
+
newDefaultImport,
|
|
167336
|
+
/*namedBindings*/
|
|
167337
|
+
void 0
|
|
167338
|
+
)
|
|
167339
|
+
);
|
|
167340
|
+
coalescedImports.push(
|
|
167341
|
+
updateImportDeclarationAndClause(
|
|
167342
|
+
firstNamedImport ?? importDecl,
|
|
167343
|
+
/*name*/
|
|
167344
|
+
void 0,
|
|
167345
|
+
newNamedImports
|
|
167346
|
+
)
|
|
167347
|
+
);
|
|
167348
|
+
} else {
|
|
167349
|
+
coalescedImports.push(
|
|
167350
|
+
updateImportDeclarationAndClause(importDecl, newDefaultImport, newNamedImports)
|
|
167351
|
+
);
|
|
167352
|
+
}
|
|
167305
167353
|
}
|
|
167306
167354
|
}
|
|
167307
167355
|
return coalescedImports;
|
|
@@ -175754,6 +175802,7 @@ ${options.prefix}` : "\n" : options.prefix
|
|
|
175754
175802
|
/**
|
|
175755
175803
|
* Current project's program version. (incremented everytime new program is created that is not complete reuse from the old one)
|
|
175756
175804
|
* This property is changed in 'updateGraph' based on the set of files in program
|
|
175805
|
+
* @internal
|
|
175757
175806
|
*/
|
|
175758
175807
|
this.projectProgramVersion = 0;
|
|
175759
175808
|
/**
|
|
@@ -175761,6 +175810,7 @@ ${options.prefix}` : "\n" : options.prefix
|
|
|
175761
175810
|
* - new root file was added/removed
|
|
175762
175811
|
* - edit happen in some file that is currently included in the project.
|
|
175763
175812
|
* This property is different from projectStructureVersion since in most cases edits don't affect set of files in the project
|
|
175813
|
+
* @internal
|
|
175764
175814
|
*/
|
|
175765
175815
|
this.projectStateVersion = 0;
|
|
175766
175816
|
this.isInitialLoadPending = returnFalse;
|
|
@@ -176798,7 +176848,7 @@ ${options.prefix}` : "\n" : options.prefix
|
|
|
176798
176848
|
);
|
|
176799
176849
|
const elapsed = timestamp() - start;
|
|
176800
176850
|
this.sendPerformanceEvent("UpdateGraph", elapsed);
|
|
176801
|
-
this.writeLog(`Finishing updateGraphWorker: Project: ${this.getProjectName()}
|
|
176851
|
+
this.writeLog(`Finishing updateGraphWorker: Project: ${this.getProjectName()} projectStateVersion: ${this.projectStateVersion} projectProgramVersion: ${this.projectProgramVersion} structureChanged: ${hasNewProgram}${this.program ? ` structureIsReused:: ${StructureIsReused[this.program.structureIsReused]}` : ""} Elapsed: ${elapsed}ms`);
|
|
176802
176852
|
if (this.projectService.logger.isTestLogger) {
|
|
176803
176853
|
if (this.program !== oldProgram) {
|
|
176804
176854
|
this.print(
|
|
@@ -176961,6 +177011,7 @@ ${options.prefix}` : "\n" : options.prefix
|
|
|
176961
177011
|
}
|
|
176962
177012
|
/** @internal */
|
|
176963
177013
|
print(writeProjectFileNames, writeFileExplaination, writeFileVersionAndText) {
|
|
177014
|
+
var _a;
|
|
176964
177015
|
this.writeLog(`Project '${this.projectName}' (${ProjectKind[this.projectKind]})`);
|
|
176965
177016
|
this.writeLog(this.filesToStringWorker(
|
|
176966
177017
|
writeProjectFileNames && this.projectService.logger.hasLevel(3 /* verbose */),
|
|
@@ -176978,6 +177029,14 @@ ${options.prefix}` : "\n" : options.prefix
|
|
|
176978
177029
|
false
|
|
176979
177030
|
);
|
|
176980
177031
|
}
|
|
177032
|
+
(_a = this.noDtsResolutionProject) == null ? void 0 : _a.print(
|
|
177033
|
+
/*writeProjectFileNames*/
|
|
177034
|
+
false,
|
|
177035
|
+
/*writeFileExplaination*/
|
|
177036
|
+
false,
|
|
177037
|
+
/*writeFileVersionAndText*/
|
|
177038
|
+
false
|
|
177039
|
+
);
|
|
176981
177040
|
}
|
|
176982
177041
|
setCompilerOptions(compilerOptions) {
|
|
176983
177042
|
var _a;
|
|
@@ -178417,6 +178476,8 @@ ${options.prefix}` : "\n" : options.prefix
|
|
|
178417
178476
|
/** @internal */
|
|
178418
178477
|
this.extendedConfigCache = /* @__PURE__ */ new Map();
|
|
178419
178478
|
/** @internal */
|
|
178479
|
+
this.baseline = noop;
|
|
178480
|
+
/** @internal */
|
|
178420
178481
|
this.verifyDocumentRegistry = noop;
|
|
178421
178482
|
/** @internal */
|
|
178422
178483
|
this.verifyProgram = noop;
|
|
@@ -180406,6 +180467,8 @@ Dynamic files must always be opened with service's current directory or service
|
|
|
180406
180467
|
});
|
|
180407
180468
|
this.inferredProjects.forEach((project) => this.clearSemanticCache(project));
|
|
180408
180469
|
this.ensureProjectForOpenFiles();
|
|
180470
|
+
this.logger.info("After reloading projects..");
|
|
180471
|
+
this.printProjects();
|
|
180409
180472
|
}
|
|
180410
180473
|
/**
|
|
180411
180474
|
* This function goes through all the openFiles and tries to file the config file for them.
|
|
@@ -180931,7 +180994,7 @@ Dynamic files must always be opened with service's current directory or service
|
|
|
180931
180994
|
}
|
|
180932
180995
|
}
|
|
180933
180996
|
}
|
|
180934
|
-
closeExternalProject(uncheckedFileName) {
|
|
180997
|
+
closeExternalProject(uncheckedFileName, print) {
|
|
180935
180998
|
const fileName = toNormalizedPath(uncheckedFileName);
|
|
180936
180999
|
const configFiles = this.externalProjectToConfiguredProjectMap.get(fileName);
|
|
180937
181000
|
if (configFiles) {
|
|
@@ -180945,6 +181008,8 @@ Dynamic files must always be opened with service's current directory or service
|
|
|
180945
181008
|
this.removeProject(externalProject);
|
|
180946
181009
|
}
|
|
180947
181010
|
}
|
|
181011
|
+
if (print)
|
|
181012
|
+
this.printProjects();
|
|
180948
181013
|
}
|
|
180949
181014
|
openExternalProjects(projects) {
|
|
180950
181015
|
const projectsToClose = arrayToMap(this.externalProjects, (p) => p.getProjectName(), (_) => true);
|
|
@@ -180952,12 +181017,21 @@ Dynamic files must always be opened with service's current directory or service
|
|
|
180952
181017
|
projectsToClose.set(externalProjectName, true);
|
|
180953
181018
|
});
|
|
180954
181019
|
for (const externalProject of projects) {
|
|
180955
|
-
this.openExternalProject(
|
|
181020
|
+
this.openExternalProject(
|
|
181021
|
+
externalProject,
|
|
181022
|
+
/*print*/
|
|
181023
|
+
false
|
|
181024
|
+
);
|
|
180956
181025
|
projectsToClose.delete(externalProject.projectFileName);
|
|
180957
181026
|
}
|
|
180958
181027
|
forEachKey(projectsToClose, (externalProjectName) => {
|
|
180959
|
-
this.closeExternalProject(
|
|
181028
|
+
this.closeExternalProject(
|
|
181029
|
+
externalProjectName,
|
|
181030
|
+
/*print*/
|
|
181031
|
+
false
|
|
181032
|
+
);
|
|
180960
181033
|
});
|
|
181034
|
+
this.printProjects();
|
|
180961
181035
|
}
|
|
180962
181036
|
static escapeFilenameForRegex(filename) {
|
|
180963
181037
|
return filename.replace(this.filenameEscapeRegexp, "\\$&");
|
|
@@ -181050,7 +181124,7 @@ Dynamic files must always be opened with service's current directory or service
|
|
|
181050
181124
|
proj.rootFiles = filesToKeep;
|
|
181051
181125
|
return excludedFiles;
|
|
181052
181126
|
}
|
|
181053
|
-
openExternalProject(proj) {
|
|
181127
|
+
openExternalProject(proj, print) {
|
|
181054
181128
|
proj.typeAcquisition = proj.typeAcquisition || {};
|
|
181055
181129
|
proj.typeAcquisition.include = proj.typeAcquisition.include || [];
|
|
181056
181130
|
proj.typeAcquisition.exclude = proj.typeAcquisition.exclude || [];
|
|
@@ -181089,12 +181163,22 @@ Dynamic files must always be opened with service's current directory or service
|
|
|
181089
181163
|
externalProject.setProjectErrors(watchOptionsAndErrors == null ? void 0 : watchOptionsAndErrors.errors);
|
|
181090
181164
|
this.updateRootAndOptionsOfNonInferredProject(externalProject, proj.rootFiles, externalFilePropertyReader, compilerOptions, proj.typeAcquisition, proj.options.compileOnSave, watchOptionsAndErrors == null ? void 0 : watchOptionsAndErrors.watchOptions);
|
|
181091
181165
|
externalProject.updateGraph();
|
|
181166
|
+
if (print)
|
|
181167
|
+
this.printProjects();
|
|
181092
181168
|
return;
|
|
181093
181169
|
}
|
|
181094
|
-
this.closeExternalProject(
|
|
181170
|
+
this.closeExternalProject(
|
|
181171
|
+
proj.projectFileName,
|
|
181172
|
+
/*print*/
|
|
181173
|
+
false
|
|
181174
|
+
);
|
|
181095
181175
|
} else if (this.externalProjectToConfiguredProjectMap.get(proj.projectFileName)) {
|
|
181096
181176
|
if (!tsConfigFiles) {
|
|
181097
|
-
this.closeExternalProject(
|
|
181177
|
+
this.closeExternalProject(
|
|
181178
|
+
proj.projectFileName,
|
|
181179
|
+
/*print*/
|
|
181180
|
+
false
|
|
181181
|
+
);
|
|
181098
181182
|
} else {
|
|
181099
181183
|
const oldConfigFiles = this.externalProjectToConfiguredProjectMap.get(proj.projectFileName);
|
|
181100
181184
|
let iNew = 0;
|
|
@@ -181134,6 +181218,8 @@ Dynamic files must always be opened with service's current directory or service
|
|
|
181134
181218
|
const project = this.createExternalProject(proj.projectFileName, rootFiles, proj.options, proj.typeAcquisition, excludedFiles);
|
|
181135
181219
|
project.updateGraph();
|
|
181136
181220
|
}
|
|
181221
|
+
if (print)
|
|
181222
|
+
this.printProjects();
|
|
181137
181223
|
}
|
|
181138
181224
|
hasDeferredExtension() {
|
|
181139
181225
|
for (const extension of this.hostConfiguration.extraFileExtensions) {
|
|
@@ -182129,7 +182215,11 @@ ${json}${newLine}`;
|
|
|
182129
182215
|
return this.requiredResponse(response);
|
|
182130
182216
|
},
|
|
182131
182217
|
["openExternalProject" /* OpenExternalProject */]: (request) => {
|
|
182132
|
-
this.projectService.openExternalProject(
|
|
182218
|
+
this.projectService.openExternalProject(
|
|
182219
|
+
request.arguments,
|
|
182220
|
+
/*print*/
|
|
182221
|
+
true
|
|
182222
|
+
);
|
|
182133
182223
|
return this.requiredResponse(
|
|
182134
182224
|
/*response*/
|
|
182135
182225
|
true
|
|
@@ -182143,7 +182233,11 @@ ${json}${newLine}`;
|
|
|
182143
182233
|
);
|
|
182144
182234
|
},
|
|
182145
182235
|
["closeExternalProject" /* CloseExternalProject */]: (request) => {
|
|
182146
|
-
this.projectService.closeExternalProject(
|
|
182236
|
+
this.projectService.closeExternalProject(
|
|
182237
|
+
request.arguments.projectFileName,
|
|
182238
|
+
/*print*/
|
|
182239
|
+
true
|
|
182240
|
+
);
|
|
182147
182241
|
return this.requiredResponse(
|
|
182148
182242
|
/*response*/
|
|
182149
182243
|
true
|
package/lib/typingsInstaller.js
CHANGED
|
@@ -54,7 +54,7 @@ var path = __toESM(require("path"));
|
|
|
54
54
|
|
|
55
55
|
// src/compiler/corePublic.ts
|
|
56
56
|
var versionMajorMinor = "5.4";
|
|
57
|
-
var version = `${versionMajorMinor}.0-insiders.
|
|
57
|
+
var version = `${versionMajorMinor}.0-insiders.20240205`;
|
|
58
58
|
|
|
59
59
|
// src/compiler/core.ts
|
|
60
60
|
var emptyArray = [];
|
|
@@ -6299,7 +6299,6 @@ var Diagnostics = {
|
|
|
6299
6299
|
Disallow_inconsistently_cased_references_to_the_same_file: diag(6078, 3 /* Message */, "Disallow_inconsistently_cased_references_to_the_same_file_6078", "Disallow inconsistently-cased references to the same file."),
|
|
6300
6300
|
Specify_library_files_to_be_included_in_the_compilation: diag(6079, 3 /* Message */, "Specify_library_files_to_be_included_in_the_compilation_6079", "Specify library files to be included in the compilation."),
|
|
6301
6301
|
Specify_JSX_code_generation: diag(6080, 3 /* Message */, "Specify_JSX_code_generation_6080", "Specify JSX code generation."),
|
|
6302
|
-
File_0_has_an_unsupported_extension_so_skipping_it: diag(6081, 3 /* Message */, "File_0_has_an_unsupported_extension_so_skipping_it_6081", "File '{0}' has an unsupported extension, so skipping it."),
|
|
6303
6302
|
Only_amd_and_system_modules_are_supported_alongside_0: diag(6082, 1 /* Error */, "Only_amd_and_system_modules_are_supported_alongside_0_6082", "Only 'amd' and 'system' modules are supported alongside --{0}."),
|
|
6304
6303
|
Base_directory_to_resolve_non_absolute_module_names: diag(6083, 3 /* Message */, "Base_directory_to_resolve_non_absolute_module_names_6083", "Base directory to resolve non-absolute module names."),
|
|
6305
6304
|
Deprecated_Use_jsxFactory_instead_Specify_the_object_invoked_for_createElement_when_targeting_react_JSX_emit: diag(6084, 3 /* Message */, "Deprecated_Use_jsxFactory_instead_Specify_the_object_invoked_for_createElement_when_targeting_react__6084", "[Deprecated] Use '--jsxFactory' instead. Specify the object invoked for createElement when targeting 'react' JSX emit"),
|
|
@@ -28567,15 +28566,9 @@ function loadNodeModuleFromDirectoryWorker(extensions, candidate, onlyRecordFail
|
|
|
28567
28566
|
}
|
|
28568
28567
|
}
|
|
28569
28568
|
const loader = (extensions2, candidate2, onlyRecordFailures2, state2) => {
|
|
28570
|
-
const fromFile =
|
|
28569
|
+
const fromFile = loadFileNameFromPackageJsonField(extensions2, candidate2, onlyRecordFailures2, state2);
|
|
28571
28570
|
if (fromFile) {
|
|
28572
|
-
|
|
28573
|
-
if (resolved) {
|
|
28574
|
-
return noPackageId(resolved);
|
|
28575
|
-
}
|
|
28576
|
-
if (state2.traceEnabled) {
|
|
28577
|
-
trace(state2.host, Diagnostics.File_0_has_an_unsupported_extension_so_skipping_it, fromFile);
|
|
28578
|
-
}
|
|
28571
|
+
return noPackageId(fromFile);
|
|
28579
28572
|
}
|
|
28580
28573
|
const expandedExtensions = extensions2 === 4 /* Declaration */ ? 1 /* TypeScript */ | 4 /* Declaration */ : extensions2;
|
|
28581
28574
|
const features = state2.features;
|
|
@@ -28631,10 +28624,6 @@ function loadNodeModuleFromDirectoryWorker(extensions, candidate, onlyRecordFail
|
|
|
28631
28624
|
return loadModuleFromFile(extensions, indexPath, onlyRecordFailuresForIndex, state);
|
|
28632
28625
|
}
|
|
28633
28626
|
}
|
|
28634
|
-
function resolvedIfExtensionMatches(extensions, path2, resolvedUsingTsExtension) {
|
|
28635
|
-
const ext = tryGetExtensionFromPath2(path2);
|
|
28636
|
-
return ext !== void 0 && extensionIsOk(extensions, ext) ? { path: path2, ext, resolvedUsingTsExtension } : void 0;
|
|
28637
|
-
}
|
|
28638
28627
|
function extensionIsOk(extensions, extension) {
|
|
28639
28628
|
return extensions & 2 /* JavaScript */ && (extension === ".js" /* Js */ || extension === ".jsx" /* Jsx */ || extension === ".mjs" /* Mjs */ || extension === ".cjs" /* Cjs */) || extensions & 1 /* TypeScript */ && (extension === ".ts" /* Ts */ || extension === ".tsx" /* Tsx */ || extension === ".mts" /* Mts */ || extension === ".cts" /* Cts */) || extensions & 4 /* Declaration */ && (extension === ".d.ts" /* Dts */ || extension === ".d.mts" /* Dmts */ || extension === ".d.cts" /* Dcts */) || extensions & 8 /* Json */ && extension === ".json" /* Json */ || false;
|
|
28640
28629
|
}
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@typescript-deploys/pr-build",
|
|
3
3
|
"author": "Microsoft Corp.",
|
|
4
4
|
"homepage": "https://www.typescriptlang.org/",
|
|
5
|
-
"version": "5.4.0-pr-
|
|
5
|
+
"version": "5.4.0-pr-56594-3",
|
|
6
6
|
"license": "Apache-2.0",
|
|
7
7
|
"description": "TypeScript is a language for application scale JavaScript development",
|
|
8
8
|
"keywords": [
|
|
@@ -114,5 +114,5 @@
|
|
|
114
114
|
"node": "20.1.0",
|
|
115
115
|
"npm": "8.19.4"
|
|
116
116
|
},
|
|
117
|
-
"gitHead": "
|
|
117
|
+
"gitHead": "4a2f44461bd82f7d57ec11230a145ccdd5373350"
|
|
118
118
|
}
|