@typescript-deploys/pr-build 5.4.0-pr-55774-21 → 5.4.0-pr-56356-2
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/tsc.js +7 -9
- package/lib/tsserver.js +56 -13
- package/lib/typescript.js +56 -13
- package/lib/typingsInstaller.js +32 -21
- package/package.json +2 -2
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.20231109`;
|
|
22
22
|
|
|
23
23
|
// src/compiler/core.ts
|
|
24
24
|
var emptyArray = [];
|
|
@@ -54244,13 +54244,7 @@ function createTypeChecker(host) {
|
|
|
54244
54244
|
const templateModifiers = getMappedTypeModifiers(type);
|
|
54245
54245
|
const include = keyofStringsOnly ? 128 /* StringLiteral */ : 8576 /* StringOrNumberLiteralOrUnique */;
|
|
54246
54246
|
if (isMappedTypeWithKeyofConstraintDeclaration(type)) {
|
|
54247
|
-
|
|
54248
|
-
forEachType(getUnionType(getElementTypes(modifiersType).map((_, i) => getStringLiteralType("" + i))), addMemberForKeyType);
|
|
54249
|
-
} else if (isArrayType(modifiersType)) {
|
|
54250
|
-
addMemberForKeyType(numberType);
|
|
54251
|
-
} else {
|
|
54252
|
-
forEachMappedTypePropertyKeyTypeAndIndexSignatureKeyType(modifiersType, include, keyofStringsOnly, addMemberForKeyType);
|
|
54253
|
-
}
|
|
54247
|
+
forEachMappedTypePropertyKeyTypeAndIndexSignatureKeyType(modifiersType, include, keyofStringsOnly, addMemberForKeyType);
|
|
54254
54248
|
} else {
|
|
54255
54249
|
forEachType(getLowerBoundOfKeyType(constraintType), addMemberForKeyType);
|
|
54256
54250
|
}
|
|
@@ -56059,7 +56053,7 @@ function createTypeChecker(host) {
|
|
|
56059
56053
|
if (constraint) {
|
|
56060
56054
|
constraints = append(constraints, constraint);
|
|
56061
56055
|
}
|
|
56062
|
-
} else if (type.flags & 262144 /* TypeParameter */ && parent.kind === 200 /* MappedType */ &&
|
|
56056
|
+
} else if (type.flags & 262144 /* TypeParameter */ && parent.kind === 200 /* MappedType */ && node === parent.type) {
|
|
56063
56057
|
const mappedType = getTypeFromTypeNode(parent);
|
|
56064
56058
|
if (getTypeParameterFromMappedType(mappedType) === getActualTypeVariable(type)) {
|
|
56065
56059
|
const typeParameter = getHomomorphicTypeVariable(mappedType);
|
|
@@ -65649,6 +65643,10 @@ function createTypeChecker(host) {
|
|
|
65649
65643
|
case 211 /* PropertyAccessExpression */:
|
|
65650
65644
|
case 212 /* ElementAccessExpression */:
|
|
65651
65645
|
return isConstantReference(node.expression) && isReadonlySymbol(getNodeLinks(node).resolvedSymbol || unknownSymbol);
|
|
65646
|
+
case 206 /* ObjectBindingPattern */:
|
|
65647
|
+
case 207 /* ArrayBindingPattern */:
|
|
65648
|
+
const rootDeclaration = getRootDeclaration(node.parent);
|
|
65649
|
+
return isVariableDeclaration(rootDeclaration) && isVarConstLike(rootDeclaration);
|
|
65652
65650
|
}
|
|
65653
65651
|
return false;
|
|
65654
65652
|
}
|
package/lib/tsserver.js
CHANGED
|
@@ -2330,7 +2330,7 @@ module.exports = __toCommonJS(server_exports);
|
|
|
2330
2330
|
|
|
2331
2331
|
// src/compiler/corePublic.ts
|
|
2332
2332
|
var versionMajorMinor = "5.4";
|
|
2333
|
-
var version = `${versionMajorMinor}.0-insiders.
|
|
2333
|
+
var version = `${versionMajorMinor}.0-insiders.20231109`;
|
|
2334
2334
|
var Comparison = /* @__PURE__ */ ((Comparison3) => {
|
|
2335
2335
|
Comparison3[Comparison3["LessThan"] = -1] = "LessThan";
|
|
2336
2336
|
Comparison3[Comparison3["EqualTo"] = 0] = "EqualTo";
|
|
@@ -58952,13 +58952,7 @@ function createTypeChecker(host) {
|
|
|
58952
58952
|
const templateModifiers = getMappedTypeModifiers(type);
|
|
58953
58953
|
const include = keyofStringsOnly ? 128 /* StringLiteral */ : 8576 /* StringOrNumberLiteralOrUnique */;
|
|
58954
58954
|
if (isMappedTypeWithKeyofConstraintDeclaration(type)) {
|
|
58955
|
-
|
|
58956
|
-
forEachType(getUnionType(getElementTypes(modifiersType).map((_, i) => getStringLiteralType("" + i))), addMemberForKeyType);
|
|
58957
|
-
} else if (isArrayType(modifiersType)) {
|
|
58958
|
-
addMemberForKeyType(numberType);
|
|
58959
|
-
} else {
|
|
58960
|
-
forEachMappedTypePropertyKeyTypeAndIndexSignatureKeyType(modifiersType, include, keyofStringsOnly, addMemberForKeyType);
|
|
58961
|
-
}
|
|
58955
|
+
forEachMappedTypePropertyKeyTypeAndIndexSignatureKeyType(modifiersType, include, keyofStringsOnly, addMemberForKeyType);
|
|
58962
58956
|
} else {
|
|
58963
58957
|
forEachType(getLowerBoundOfKeyType(constraintType), addMemberForKeyType);
|
|
58964
58958
|
}
|
|
@@ -60767,7 +60761,7 @@ function createTypeChecker(host) {
|
|
|
60767
60761
|
if (constraint) {
|
|
60768
60762
|
constraints = append(constraints, constraint);
|
|
60769
60763
|
}
|
|
60770
|
-
} else if (type.flags & 262144 /* TypeParameter */ && parent2.kind === 200 /* MappedType */ &&
|
|
60764
|
+
} else if (type.flags & 262144 /* TypeParameter */ && parent2.kind === 200 /* MappedType */ && node === parent2.type) {
|
|
60771
60765
|
const mappedType = getTypeFromTypeNode(parent2);
|
|
60772
60766
|
if (getTypeParameterFromMappedType(mappedType) === getActualTypeVariable(type)) {
|
|
60773
60767
|
const typeParameter = getHomomorphicTypeVariable(mappedType);
|
|
@@ -70357,6 +70351,10 @@ function createTypeChecker(host) {
|
|
|
70357
70351
|
case 211 /* PropertyAccessExpression */:
|
|
70358
70352
|
case 212 /* ElementAccessExpression */:
|
|
70359
70353
|
return isConstantReference(node.expression) && isReadonlySymbol(getNodeLinks(node).resolvedSymbol || unknownSymbol);
|
|
70354
|
+
case 206 /* ObjectBindingPattern */:
|
|
70355
|
+
case 207 /* ArrayBindingPattern */:
|
|
70356
|
+
const rootDeclaration = getRootDeclaration(node.parent);
|
|
70357
|
+
return isVariableDeclaration(rootDeclaration) && isVarConstLike(rootDeclaration);
|
|
70360
70358
|
}
|
|
70361
70359
|
return false;
|
|
70362
70360
|
}
|
|
@@ -145048,6 +145046,13 @@ function createLanguageService(host, documentRegistry = createDocumentRegistry(h
|
|
|
145048
145046
|
return sourceFile;
|
|
145049
145047
|
}
|
|
145050
145048
|
function synchronizeHostData() {
|
|
145049
|
+
if (host.updateFromProject && !host.updateFromProjectInProgress) {
|
|
145050
|
+
host.updateFromProject();
|
|
145051
|
+
} else {
|
|
145052
|
+
synchronizeHostDataWorker();
|
|
145053
|
+
}
|
|
145054
|
+
}
|
|
145055
|
+
function synchronizeHostDataWorker() {
|
|
145051
145056
|
var _a2, _b, _c;
|
|
145052
145057
|
Debug.assert(languageServiceMode !== 2 /* Syntactic */);
|
|
145053
145058
|
if (host.getProjectVersion) {
|
|
@@ -175415,6 +175420,35 @@ var TypingsInstaller = class {
|
|
|
175415
175420
|
}
|
|
175416
175421
|
}
|
|
175417
175422
|
}
|
|
175423
|
+
/** @internal */
|
|
175424
|
+
installPackage(req) {
|
|
175425
|
+
const { fileName, packageName, projectName, projectRootPath } = req;
|
|
175426
|
+
const cwd = forEachAncestorDirectory(getDirectoryPath(fileName), (directory) => {
|
|
175427
|
+
if (this.installTypingHost.fileExists(combinePaths(directory, "package.json"))) {
|
|
175428
|
+
return directory;
|
|
175429
|
+
}
|
|
175430
|
+
}) || projectRootPath;
|
|
175431
|
+
if (cwd) {
|
|
175432
|
+
this.installWorker(-1, [packageName], cwd, (success) => {
|
|
175433
|
+
const message = success ? `Package ${packageName} installed.` : `There was an error installing ${packageName}.`;
|
|
175434
|
+
const response = {
|
|
175435
|
+
kind: ActionPackageInstalled,
|
|
175436
|
+
projectName,
|
|
175437
|
+
success,
|
|
175438
|
+
message
|
|
175439
|
+
};
|
|
175440
|
+
this.sendResponse(response);
|
|
175441
|
+
});
|
|
175442
|
+
} else {
|
|
175443
|
+
const response = {
|
|
175444
|
+
kind: ActionPackageInstalled,
|
|
175445
|
+
projectName,
|
|
175446
|
+
success: false,
|
|
175447
|
+
message: "Could not determine a project root path."
|
|
175448
|
+
};
|
|
175449
|
+
this.sendResponse(response);
|
|
175450
|
+
}
|
|
175451
|
+
}
|
|
175418
175452
|
initializeSafeList() {
|
|
175419
175453
|
if (this.typesMapLocation) {
|
|
175420
175454
|
const safeListFromMap = ts_JsTyping_exports.loadTypesMap(this.installTypingHost, this.typesMapLocation);
|
|
@@ -176790,6 +176824,8 @@ var Project3 = class _Project {
|
|
|
176790
176824
|
this.createHash = maybeBind(this.projectService.host, this.projectService.host.createHash);
|
|
176791
176825
|
/** @internal */
|
|
176792
176826
|
this.globalCacheResolutionModuleName = ts_JsTyping_exports.nonRelativeModuleNameForTypingCache;
|
|
176827
|
+
/** @internal */
|
|
176828
|
+
this.updateFromProjectInProgress = false;
|
|
176793
176829
|
this.projectName = projectName;
|
|
176794
176830
|
this.directoryStructureHost = directoryStructureHost;
|
|
176795
176831
|
this.currentDirectory = this.projectService.getNormalizedAbsolutePath(currentDirectory);
|
|
@@ -177534,6 +177570,10 @@ var Project3 = class _Project {
|
|
|
177534
177570
|
onDiscoveredSymlink() {
|
|
177535
177571
|
this.hasAddedOrRemovedSymlinks = true;
|
|
177536
177572
|
}
|
|
177573
|
+
/** @internal */
|
|
177574
|
+
updateFromProject() {
|
|
177575
|
+
updateProjectIfDirty(this);
|
|
177576
|
+
}
|
|
177537
177577
|
/**
|
|
177538
177578
|
* Updates set of files that contribute to this project
|
|
177539
177579
|
* @returns: true if set of files in the project stays the same and false - otherwise.
|
|
@@ -177551,7 +177591,7 @@ var Project3 = class _Project {
|
|
|
177551
177591
|
for (const file of changedFiles) {
|
|
177552
177592
|
this.cachedUnresolvedImportsPerFile.delete(file);
|
|
177553
177593
|
}
|
|
177554
|
-
if (this.languageServiceEnabled && this.projectService.serverMode === 0 /* Semantic */) {
|
|
177594
|
+
if (this.languageServiceEnabled && this.projectService.serverMode === 0 /* Semantic */ && !this.isOrphan()) {
|
|
177555
177595
|
if (hasNewProgram || changedFiles.length) {
|
|
177556
177596
|
this.lastCachedUnresolvedImportsList = getUnresolvedImports(this.program, this.cachedUnresolvedImportsPerFile);
|
|
177557
177597
|
}
|
|
@@ -177692,8 +177732,10 @@ var Project3 = class _Project {
|
|
|
177692
177732
|
this.hasInvalidatedResolutions = hasInvalidatedResolutions;
|
|
177693
177733
|
this.hasInvalidatedLibResolutions = hasInvalidatedLibResolutions;
|
|
177694
177734
|
this.resolutionCache.startCachingPerDirectoryResolution();
|
|
177695
|
-
this.program = this.languageService.getProgram();
|
|
177696
177735
|
this.dirty = false;
|
|
177736
|
+
this.updateFromProjectInProgress = true;
|
|
177737
|
+
this.program = this.languageService.getProgram();
|
|
177738
|
+
this.updateFromProjectInProgress = false;
|
|
177697
177739
|
(_a = tracing) == null ? void 0 : _a.push(tracing.Phase.Session, "finishCachingPerDirectoryResolution");
|
|
177698
177740
|
this.resolutionCache.finishCachingPerDirectoryResolution(this.program, oldProgram);
|
|
177699
177741
|
(_b = tracing) == null ? void 0 : _b.pop();
|
|
@@ -183809,9 +183851,10 @@ var Session3 = class _Session {
|
|
|
183809
183851
|
}
|
|
183810
183852
|
}
|
|
183811
183853
|
projectsUpdatedInBackgroundEvent(openFiles) {
|
|
183812
|
-
this.projectService.logger.info(`got projects updated in background
|
|
183854
|
+
this.projectService.logger.info(`got projects updated in background ${openFiles}`);
|
|
183813
183855
|
if (openFiles.length) {
|
|
183814
183856
|
if (!this.suppressDiagnosticEvents && !this.noGetErrOnBackgroundUpdate) {
|
|
183857
|
+
this.projectService.logger.info(`Queueing diagnostics update for ${openFiles}`);
|
|
183815
183858
|
this.errorCheck.startNew((next) => this.updateErrorCheck(
|
|
183816
183859
|
next,
|
|
183817
183860
|
openFiles,
|
|
@@ -183882,7 +183925,7 @@ Project '${project.projectName}' (${ProjectKind[project.projectKind]}) ${counter
|
|
|
183882
183925
|
send(msg) {
|
|
183883
183926
|
if (msg.type === "event" && !this.canUseEvents) {
|
|
183884
183927
|
if (this.logger.hasLevel(3 /* verbose */)) {
|
|
183885
|
-
this.logger.info(`Session does not support events: ignored event: ${
|
|
183928
|
+
this.logger.info(`Session does not support events: ignored event: ${stringifyIndented(msg)}`);
|
|
183886
183929
|
}
|
|
183887
183930
|
return;
|
|
183888
183931
|
}
|
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.20231109`;
|
|
39
39
|
Comparison = /* @__PURE__ */ ((Comparison3) => {
|
|
40
40
|
Comparison3[Comparison3["LessThan"] = -1] = "LessThan";
|
|
41
41
|
Comparison3[Comparison3["EqualTo"] = 0] = "EqualTo";
|
|
@@ -56717,13 +56717,7 @@ ${lanes.join("\n")}
|
|
|
56717
56717
|
const templateModifiers = getMappedTypeModifiers(type);
|
|
56718
56718
|
const include = keyofStringsOnly ? 128 /* StringLiteral */ : 8576 /* StringOrNumberLiteralOrUnique */;
|
|
56719
56719
|
if (isMappedTypeWithKeyofConstraintDeclaration(type)) {
|
|
56720
|
-
|
|
56721
|
-
forEachType(getUnionType(getElementTypes(modifiersType).map((_, i) => getStringLiteralType("" + i))), addMemberForKeyType);
|
|
56722
|
-
} else if (isArrayType(modifiersType)) {
|
|
56723
|
-
addMemberForKeyType(numberType);
|
|
56724
|
-
} else {
|
|
56725
|
-
forEachMappedTypePropertyKeyTypeAndIndexSignatureKeyType(modifiersType, include, keyofStringsOnly, addMemberForKeyType);
|
|
56726
|
-
}
|
|
56720
|
+
forEachMappedTypePropertyKeyTypeAndIndexSignatureKeyType(modifiersType, include, keyofStringsOnly, addMemberForKeyType);
|
|
56727
56721
|
} else {
|
|
56728
56722
|
forEachType(getLowerBoundOfKeyType(constraintType), addMemberForKeyType);
|
|
56729
56723
|
}
|
|
@@ -58532,7 +58526,7 @@ ${lanes.join("\n")}
|
|
|
58532
58526
|
if (constraint) {
|
|
58533
58527
|
constraints = append(constraints, constraint);
|
|
58534
58528
|
}
|
|
58535
|
-
} else if (type.flags & 262144 /* TypeParameter */ && parent2.kind === 200 /* MappedType */ &&
|
|
58529
|
+
} else if (type.flags & 262144 /* TypeParameter */ && parent2.kind === 200 /* MappedType */ && node === parent2.type) {
|
|
58536
58530
|
const mappedType = getTypeFromTypeNode(parent2);
|
|
58537
58531
|
if (getTypeParameterFromMappedType(mappedType) === getActualTypeVariable(type)) {
|
|
58538
58532
|
const typeParameter = getHomomorphicTypeVariable(mappedType);
|
|
@@ -68122,6 +68116,10 @@ ${lanes.join("\n")}
|
|
|
68122
68116
|
case 211 /* PropertyAccessExpression */:
|
|
68123
68117
|
case 212 /* ElementAccessExpression */:
|
|
68124
68118
|
return isConstantReference(node.expression) && isReadonlySymbol(getNodeLinks(node).resolvedSymbol || unknownSymbol);
|
|
68119
|
+
case 206 /* ObjectBindingPattern */:
|
|
68120
|
+
case 207 /* ArrayBindingPattern */:
|
|
68121
|
+
const rootDeclaration = getRootDeclaration(node.parent);
|
|
68122
|
+
return isVariableDeclaration(rootDeclaration) && isVarConstLike(rootDeclaration);
|
|
68125
68123
|
}
|
|
68126
68124
|
return false;
|
|
68127
68125
|
}
|
|
@@ -142989,6 +142987,13 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
142989
142987
|
return sourceFile;
|
|
142990
142988
|
}
|
|
142991
142989
|
function synchronizeHostData() {
|
|
142990
|
+
if (host.updateFromProject && !host.updateFromProjectInProgress) {
|
|
142991
|
+
host.updateFromProject();
|
|
142992
|
+
} else {
|
|
142993
|
+
synchronizeHostDataWorker();
|
|
142994
|
+
}
|
|
142995
|
+
}
|
|
142996
|
+
function synchronizeHostDataWorker() {
|
|
142992
142997
|
var _a2, _b, _c;
|
|
142993
142998
|
Debug.assert(languageServiceMode !== 2 /* Syntactic */);
|
|
142994
142999
|
if (host.getProjectVersion) {
|
|
@@ -172630,6 +172635,35 @@ ${options.prefix}` : "\n" : options.prefix
|
|
|
172630
172635
|
}
|
|
172631
172636
|
}
|
|
172632
172637
|
}
|
|
172638
|
+
/** @internal */
|
|
172639
|
+
installPackage(req) {
|
|
172640
|
+
const { fileName, packageName, projectName, projectRootPath } = req;
|
|
172641
|
+
const cwd = forEachAncestorDirectory(getDirectoryPath(fileName), (directory) => {
|
|
172642
|
+
if (this.installTypingHost.fileExists(combinePaths(directory, "package.json"))) {
|
|
172643
|
+
return directory;
|
|
172644
|
+
}
|
|
172645
|
+
}) || projectRootPath;
|
|
172646
|
+
if (cwd) {
|
|
172647
|
+
this.installWorker(-1, [packageName], cwd, (success) => {
|
|
172648
|
+
const message = success ? `Package ${packageName} installed.` : `There was an error installing ${packageName}.`;
|
|
172649
|
+
const response = {
|
|
172650
|
+
kind: ActionPackageInstalled,
|
|
172651
|
+
projectName,
|
|
172652
|
+
success,
|
|
172653
|
+
message
|
|
172654
|
+
};
|
|
172655
|
+
this.sendResponse(response);
|
|
172656
|
+
});
|
|
172657
|
+
} else {
|
|
172658
|
+
const response = {
|
|
172659
|
+
kind: ActionPackageInstalled,
|
|
172660
|
+
projectName,
|
|
172661
|
+
success: false,
|
|
172662
|
+
message: "Could not determine a project root path."
|
|
172663
|
+
};
|
|
172664
|
+
this.sendResponse(response);
|
|
172665
|
+
}
|
|
172666
|
+
}
|
|
172633
172667
|
initializeSafeList() {
|
|
172634
172668
|
if (this.typesMapLocation) {
|
|
172635
172669
|
const safeListFromMap = ts_JsTyping_exports.loadTypesMap(this.installTypingHost, this.typesMapLocation);
|
|
@@ -174121,6 +174155,8 @@ ${options.prefix}` : "\n" : options.prefix
|
|
|
174121
174155
|
this.createHash = maybeBind(this.projectService.host, this.projectService.host.createHash);
|
|
174122
174156
|
/** @internal */
|
|
174123
174157
|
this.globalCacheResolutionModuleName = ts_JsTyping_exports.nonRelativeModuleNameForTypingCache;
|
|
174158
|
+
/** @internal */
|
|
174159
|
+
this.updateFromProjectInProgress = false;
|
|
174124
174160
|
this.projectName = projectName;
|
|
174125
174161
|
this.directoryStructureHost = directoryStructureHost;
|
|
174126
174162
|
this.currentDirectory = this.projectService.getNormalizedAbsolutePath(currentDirectory);
|
|
@@ -174865,6 +174901,10 @@ ${options.prefix}` : "\n" : options.prefix
|
|
|
174865
174901
|
onDiscoveredSymlink() {
|
|
174866
174902
|
this.hasAddedOrRemovedSymlinks = true;
|
|
174867
174903
|
}
|
|
174904
|
+
/** @internal */
|
|
174905
|
+
updateFromProject() {
|
|
174906
|
+
updateProjectIfDirty(this);
|
|
174907
|
+
}
|
|
174868
174908
|
/**
|
|
174869
174909
|
* Updates set of files that contribute to this project
|
|
174870
174910
|
* @returns: true if set of files in the project stays the same and false - otherwise.
|
|
@@ -174882,7 +174922,7 @@ ${options.prefix}` : "\n" : options.prefix
|
|
|
174882
174922
|
for (const file of changedFiles) {
|
|
174883
174923
|
this.cachedUnresolvedImportsPerFile.delete(file);
|
|
174884
174924
|
}
|
|
174885
|
-
if (this.languageServiceEnabled && this.projectService.serverMode === 0 /* Semantic */) {
|
|
174925
|
+
if (this.languageServiceEnabled && this.projectService.serverMode === 0 /* Semantic */ && !this.isOrphan()) {
|
|
174886
174926
|
if (hasNewProgram || changedFiles.length) {
|
|
174887
174927
|
this.lastCachedUnresolvedImportsList = getUnresolvedImports(this.program, this.cachedUnresolvedImportsPerFile);
|
|
174888
174928
|
}
|
|
@@ -175023,8 +175063,10 @@ ${options.prefix}` : "\n" : options.prefix
|
|
|
175023
175063
|
this.hasInvalidatedResolutions = hasInvalidatedResolutions;
|
|
175024
175064
|
this.hasInvalidatedLibResolutions = hasInvalidatedLibResolutions;
|
|
175025
175065
|
this.resolutionCache.startCachingPerDirectoryResolution();
|
|
175026
|
-
this.program = this.languageService.getProgram();
|
|
175027
175066
|
this.dirty = false;
|
|
175067
|
+
this.updateFromProjectInProgress = true;
|
|
175068
|
+
this.program = this.languageService.getProgram();
|
|
175069
|
+
this.updateFromProjectInProgress = false;
|
|
175028
175070
|
(_a = tracing) == null ? void 0 : _a.push(tracing.Phase.Session, "finishCachingPerDirectoryResolution");
|
|
175029
175071
|
this.resolutionCache.finishCachingPerDirectoryResolution(this.program, oldProgram);
|
|
175030
175072
|
(_b = tracing) == null ? void 0 : _b.pop();
|
|
@@ -181208,9 +181250,10 @@ ${json}${newLine}`;
|
|
|
181208
181250
|
}
|
|
181209
181251
|
}
|
|
181210
181252
|
projectsUpdatedInBackgroundEvent(openFiles) {
|
|
181211
|
-
this.projectService.logger.info(`got projects updated in background
|
|
181253
|
+
this.projectService.logger.info(`got projects updated in background ${openFiles}`);
|
|
181212
181254
|
if (openFiles.length) {
|
|
181213
181255
|
if (!this.suppressDiagnosticEvents && !this.noGetErrOnBackgroundUpdate) {
|
|
181256
|
+
this.projectService.logger.info(`Queueing diagnostics update for ${openFiles}`);
|
|
181214
181257
|
this.errorCheck.startNew((next) => this.updateErrorCheck(
|
|
181215
181258
|
next,
|
|
181216
181259
|
openFiles,
|
|
@@ -181281,7 +181324,7 @@ Project '${project.projectName}' (${ProjectKind[project.projectKind]}) ${counter
|
|
|
181281
181324
|
send(msg) {
|
|
181282
181325
|
if (msg.type === "event" && !this.canUseEvents) {
|
|
181283
181326
|
if (this.logger.hasLevel(3 /* verbose */)) {
|
|
181284
|
-
this.logger.info(`Session does not support events: ignored event: ${
|
|
181327
|
+
this.logger.info(`Session does not support events: ignored event: ${stringifyIndented(msg)}`);
|
|
181285
181328
|
}
|
|
181286
181329
|
return;
|
|
181287
181330
|
}
|
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.20231109`;
|
|
58
58
|
|
|
59
59
|
// src/compiler/core.ts
|
|
60
60
|
var emptyArray = [];
|
|
@@ -31902,6 +31902,35 @@ var TypingsInstaller = class {
|
|
|
31902
31902
|
}
|
|
31903
31903
|
}
|
|
31904
31904
|
}
|
|
31905
|
+
/** @internal */
|
|
31906
|
+
installPackage(req) {
|
|
31907
|
+
const { fileName, packageName, projectName, projectRootPath } = req;
|
|
31908
|
+
const cwd = forEachAncestorDirectory(getDirectoryPath(fileName), (directory) => {
|
|
31909
|
+
if (this.installTypingHost.fileExists(combinePaths(directory, "package.json"))) {
|
|
31910
|
+
return directory;
|
|
31911
|
+
}
|
|
31912
|
+
}) || projectRootPath;
|
|
31913
|
+
if (cwd) {
|
|
31914
|
+
this.installWorker(-1, [packageName], cwd, (success) => {
|
|
31915
|
+
const message = success ? `Package ${packageName} installed.` : `There was an error installing ${packageName}.`;
|
|
31916
|
+
const response = {
|
|
31917
|
+
kind: ActionPackageInstalled,
|
|
31918
|
+
projectName,
|
|
31919
|
+
success,
|
|
31920
|
+
message
|
|
31921
|
+
};
|
|
31922
|
+
this.sendResponse(response);
|
|
31923
|
+
});
|
|
31924
|
+
} else {
|
|
31925
|
+
const response = {
|
|
31926
|
+
kind: ActionPackageInstalled,
|
|
31927
|
+
projectName,
|
|
31928
|
+
success: false,
|
|
31929
|
+
message: "Could not determine a project root path."
|
|
31930
|
+
};
|
|
31931
|
+
this.sendResponse(response);
|
|
31932
|
+
}
|
|
31933
|
+
}
|
|
31905
31934
|
initializeSafeList() {
|
|
31906
31935
|
if (this.typesMapLocation) {
|
|
31907
31936
|
const safeListFromMap = ts_JsTyping_exports.loadTypesMap(this.installTypingHost, this.typesMapLocation);
|
|
@@ -32252,18 +32281,7 @@ var NodeTypingsInstaller = class extends TypingsInstaller {
|
|
|
32252
32281
|
break;
|
|
32253
32282
|
}
|
|
32254
32283
|
case "installPackage": {
|
|
32255
|
-
|
|
32256
|
-
const cwd = getDirectoryOfPackageJson(fileName, this.installTypingHost) || projectRootPath;
|
|
32257
|
-
if (cwd) {
|
|
32258
|
-
this.installWorker(-1, [packageName], cwd, (success) => {
|
|
32259
|
-
const message = success ? `Package ${packageName} installed.` : `There was an error installing ${packageName}.`;
|
|
32260
|
-
const response = { kind: ActionPackageInstalled, projectName, success, message };
|
|
32261
|
-
this.sendResponse(response);
|
|
32262
|
-
});
|
|
32263
|
-
} else {
|
|
32264
|
-
const response = { kind: ActionPackageInstalled, projectName, success: false, message: "Could not determine a project root path." };
|
|
32265
|
-
this.sendResponse(response);
|
|
32266
|
-
}
|
|
32284
|
+
this.installPackage(req);
|
|
32267
32285
|
break;
|
|
32268
32286
|
}
|
|
32269
32287
|
default:
|
|
@@ -32281,7 +32299,7 @@ var NodeTypingsInstaller = class extends TypingsInstaller {
|
|
|
32281
32299
|
}
|
|
32282
32300
|
installWorker(requestId, packageNames, cwd, onRequestCompleted) {
|
|
32283
32301
|
if (this.log.isEnabled()) {
|
|
32284
|
-
this.log.writeLine(`#${requestId} with arguments
|
|
32302
|
+
this.log.writeLine(`#${requestId} with cwd: ${cwd} arguments: ${JSON.stringify(packageNames)}`);
|
|
32285
32303
|
}
|
|
32286
32304
|
const start = Date.now();
|
|
32287
32305
|
const hasError = installNpmPackages(this.npmPath, version, packageNames, (command) => this.execSyncAndLog(command, { cwd }));
|
|
@@ -32308,13 +32326,6 @@ var NodeTypingsInstaller = class extends TypingsInstaller {
|
|
|
32308
32326
|
}
|
|
32309
32327
|
}
|
|
32310
32328
|
};
|
|
32311
|
-
function getDirectoryOfPackageJson(fileName, host) {
|
|
32312
|
-
return forEachAncestorDirectory(getDirectoryPath(fileName), (directory) => {
|
|
32313
|
-
if (host.fileExists(combinePaths(directory, "package.json"))) {
|
|
32314
|
-
return directory;
|
|
32315
|
-
}
|
|
32316
|
-
});
|
|
32317
|
-
}
|
|
32318
32329
|
var logFilePath = findArgument(Arguments.LogFile);
|
|
32319
32330
|
var globalTypingsCacheLocation = findArgument(Arguments.GlobalCacheLocation);
|
|
32320
32331
|
var typingSafeListLocation = findArgument(Arguments.TypingSafeListLocation);
|
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-56356-2",
|
|
6
6
|
"license": "Apache-2.0",
|
|
7
7
|
"description": "TypeScript is a language for application scale JavaScript development",
|
|
8
8
|
"keywords": [
|
|
@@ -115,5 +115,5 @@
|
|
|
115
115
|
"node": "20.1.0",
|
|
116
116
|
"npm": "8.19.4"
|
|
117
117
|
},
|
|
118
|
-
"gitHead": "
|
|
118
|
+
"gitHead": "dc574fde3ad2ebc9dbad161f1b58409c91c712a1"
|
|
119
119
|
}
|