typescript 5.4.0-dev.20231108 → 5.4.0-dev.20231110
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 +5 -1
- package/lib/tsserver.js +38 -4
- package/lib/typescript.js +38 -4
- 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-dev.
|
|
21
|
+
var version = `${versionMajorMinor}.0-dev.20231110`;
|
|
22
22
|
|
|
23
23
|
// src/compiler/core.ts
|
|
24
24
|
var emptyArray = [];
|
|
@@ -65643,6 +65643,10 @@ function createTypeChecker(host) {
|
|
|
65643
65643
|
case 211 /* PropertyAccessExpression */:
|
|
65644
65644
|
case 212 /* ElementAccessExpression */:
|
|
65645
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);
|
|
65646
65650
|
}
|
|
65647
65651
|
return false;
|
|
65648
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-dev.
|
|
2333
|
+
var version = `${versionMajorMinor}.0-dev.20231110`;
|
|
2334
2334
|
var Comparison = /* @__PURE__ */ ((Comparison3) => {
|
|
2335
2335
|
Comparison3[Comparison3["LessThan"] = -1] = "LessThan";
|
|
2336
2336
|
Comparison3[Comparison3["EqualTo"] = 0] = "EqualTo";
|
|
@@ -70351,6 +70351,10 @@ function createTypeChecker(host) {
|
|
|
70351
70351
|
case 211 /* PropertyAccessExpression */:
|
|
70352
70352
|
case 212 /* ElementAccessExpression */:
|
|
70353
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);
|
|
70354
70358
|
}
|
|
70355
70359
|
return false;
|
|
70356
70360
|
}
|
|
@@ -175409,6 +175413,35 @@ var TypingsInstaller = class {
|
|
|
175409
175413
|
}
|
|
175410
175414
|
}
|
|
175411
175415
|
}
|
|
175416
|
+
/** @internal */
|
|
175417
|
+
installPackage(req) {
|
|
175418
|
+
const { fileName, packageName, projectName, projectRootPath } = req;
|
|
175419
|
+
const cwd = forEachAncestorDirectory(getDirectoryPath(fileName), (directory) => {
|
|
175420
|
+
if (this.installTypingHost.fileExists(combinePaths(directory, "package.json"))) {
|
|
175421
|
+
return directory;
|
|
175422
|
+
}
|
|
175423
|
+
}) || projectRootPath;
|
|
175424
|
+
if (cwd) {
|
|
175425
|
+
this.installWorker(-1, [packageName], cwd, (success) => {
|
|
175426
|
+
const message = success ? `Package ${packageName} installed.` : `There was an error installing ${packageName}.`;
|
|
175427
|
+
const response = {
|
|
175428
|
+
kind: ActionPackageInstalled,
|
|
175429
|
+
projectName,
|
|
175430
|
+
success,
|
|
175431
|
+
message
|
|
175432
|
+
};
|
|
175433
|
+
this.sendResponse(response);
|
|
175434
|
+
});
|
|
175435
|
+
} else {
|
|
175436
|
+
const response = {
|
|
175437
|
+
kind: ActionPackageInstalled,
|
|
175438
|
+
projectName,
|
|
175439
|
+
success: false,
|
|
175440
|
+
message: "Could not determine a project root path."
|
|
175441
|
+
};
|
|
175442
|
+
this.sendResponse(response);
|
|
175443
|
+
}
|
|
175444
|
+
}
|
|
175412
175445
|
initializeSafeList() {
|
|
175413
175446
|
if (this.typesMapLocation) {
|
|
175414
175447
|
const safeListFromMap = ts_JsTyping_exports.loadTypesMap(this.installTypingHost, this.typesMapLocation);
|
|
@@ -177545,7 +177578,7 @@ var Project3 = class _Project {
|
|
|
177545
177578
|
for (const file of changedFiles) {
|
|
177546
177579
|
this.cachedUnresolvedImportsPerFile.delete(file);
|
|
177547
177580
|
}
|
|
177548
|
-
if (this.languageServiceEnabled && this.projectService.serverMode === 0 /* Semantic */) {
|
|
177581
|
+
if (this.languageServiceEnabled && this.projectService.serverMode === 0 /* Semantic */ && !this.isOrphan()) {
|
|
177549
177582
|
if (hasNewProgram || changedFiles.length) {
|
|
177550
177583
|
this.lastCachedUnresolvedImportsList = getUnresolvedImports(this.program, this.cachedUnresolvedImportsPerFile);
|
|
177551
177584
|
}
|
|
@@ -183803,9 +183836,10 @@ var Session3 = class _Session {
|
|
|
183803
183836
|
}
|
|
183804
183837
|
}
|
|
183805
183838
|
projectsUpdatedInBackgroundEvent(openFiles) {
|
|
183806
|
-
this.projectService.logger.info(`got projects updated in background
|
|
183839
|
+
this.projectService.logger.info(`got projects updated in background ${openFiles}`);
|
|
183807
183840
|
if (openFiles.length) {
|
|
183808
183841
|
if (!this.suppressDiagnosticEvents && !this.noGetErrOnBackgroundUpdate) {
|
|
183842
|
+
this.projectService.logger.info(`Queueing diagnostics update for ${openFiles}`);
|
|
183809
183843
|
this.errorCheck.startNew((next) => this.updateErrorCheck(
|
|
183810
183844
|
next,
|
|
183811
183845
|
openFiles,
|
|
@@ -183876,7 +183910,7 @@ Project '${project.projectName}' (${ProjectKind[project.projectKind]}) ${counter
|
|
|
183876
183910
|
send(msg) {
|
|
183877
183911
|
if (msg.type === "event" && !this.canUseEvents) {
|
|
183878
183912
|
if (this.logger.hasLevel(3 /* verbose */)) {
|
|
183879
|
-
this.logger.info(`Session does not support events: ignored event: ${
|
|
183913
|
+
this.logger.info(`Session does not support events: ignored event: ${stringifyIndented(msg)}`);
|
|
183880
183914
|
}
|
|
183881
183915
|
return;
|
|
183882
183916
|
}
|
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-dev.
|
|
38
|
+
version = `${versionMajorMinor}.0-dev.20231110`;
|
|
39
39
|
Comparison = /* @__PURE__ */ ((Comparison3) => {
|
|
40
40
|
Comparison3[Comparison3["LessThan"] = -1] = "LessThan";
|
|
41
41
|
Comparison3[Comparison3["EqualTo"] = 0] = "EqualTo";
|
|
@@ -68116,6 +68116,10 @@ ${lanes.join("\n")}
|
|
|
68116
68116
|
case 211 /* PropertyAccessExpression */:
|
|
68117
68117
|
case 212 /* ElementAccessExpression */:
|
|
68118
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);
|
|
68119
68123
|
}
|
|
68120
68124
|
return false;
|
|
68121
68125
|
}
|
|
@@ -172624,6 +172628,35 @@ ${options.prefix}` : "\n" : options.prefix
|
|
|
172624
172628
|
}
|
|
172625
172629
|
}
|
|
172626
172630
|
}
|
|
172631
|
+
/** @internal */
|
|
172632
|
+
installPackage(req) {
|
|
172633
|
+
const { fileName, packageName, projectName, projectRootPath } = req;
|
|
172634
|
+
const cwd = forEachAncestorDirectory(getDirectoryPath(fileName), (directory) => {
|
|
172635
|
+
if (this.installTypingHost.fileExists(combinePaths(directory, "package.json"))) {
|
|
172636
|
+
return directory;
|
|
172637
|
+
}
|
|
172638
|
+
}) || projectRootPath;
|
|
172639
|
+
if (cwd) {
|
|
172640
|
+
this.installWorker(-1, [packageName], cwd, (success) => {
|
|
172641
|
+
const message = success ? `Package ${packageName} installed.` : `There was an error installing ${packageName}.`;
|
|
172642
|
+
const response = {
|
|
172643
|
+
kind: ActionPackageInstalled,
|
|
172644
|
+
projectName,
|
|
172645
|
+
success,
|
|
172646
|
+
message
|
|
172647
|
+
};
|
|
172648
|
+
this.sendResponse(response);
|
|
172649
|
+
});
|
|
172650
|
+
} else {
|
|
172651
|
+
const response = {
|
|
172652
|
+
kind: ActionPackageInstalled,
|
|
172653
|
+
projectName,
|
|
172654
|
+
success: false,
|
|
172655
|
+
message: "Could not determine a project root path."
|
|
172656
|
+
};
|
|
172657
|
+
this.sendResponse(response);
|
|
172658
|
+
}
|
|
172659
|
+
}
|
|
172627
172660
|
initializeSafeList() {
|
|
172628
172661
|
if (this.typesMapLocation) {
|
|
172629
172662
|
const safeListFromMap = ts_JsTyping_exports.loadTypesMap(this.installTypingHost, this.typesMapLocation);
|
|
@@ -174876,7 +174909,7 @@ ${options.prefix}` : "\n" : options.prefix
|
|
|
174876
174909
|
for (const file of changedFiles) {
|
|
174877
174910
|
this.cachedUnresolvedImportsPerFile.delete(file);
|
|
174878
174911
|
}
|
|
174879
|
-
if (this.languageServiceEnabled && this.projectService.serverMode === 0 /* Semantic */) {
|
|
174912
|
+
if (this.languageServiceEnabled && this.projectService.serverMode === 0 /* Semantic */ && !this.isOrphan()) {
|
|
174880
174913
|
if (hasNewProgram || changedFiles.length) {
|
|
174881
174914
|
this.lastCachedUnresolvedImportsList = getUnresolvedImports(this.program, this.cachedUnresolvedImportsPerFile);
|
|
174882
174915
|
}
|
|
@@ -181202,9 +181235,10 @@ ${json}${newLine}`;
|
|
|
181202
181235
|
}
|
|
181203
181236
|
}
|
|
181204
181237
|
projectsUpdatedInBackgroundEvent(openFiles) {
|
|
181205
|
-
this.projectService.logger.info(`got projects updated in background
|
|
181238
|
+
this.projectService.logger.info(`got projects updated in background ${openFiles}`);
|
|
181206
181239
|
if (openFiles.length) {
|
|
181207
181240
|
if (!this.suppressDiagnosticEvents && !this.noGetErrOnBackgroundUpdate) {
|
|
181241
|
+
this.projectService.logger.info(`Queueing diagnostics update for ${openFiles}`);
|
|
181208
181242
|
this.errorCheck.startNew((next) => this.updateErrorCheck(
|
|
181209
181243
|
next,
|
|
181210
181244
|
openFiles,
|
|
@@ -181275,7 +181309,7 @@ Project '${project.projectName}' (${ProjectKind[project.projectKind]}) ${counter
|
|
|
181275
181309
|
send(msg) {
|
|
181276
181310
|
if (msg.type === "event" && !this.canUseEvents) {
|
|
181277
181311
|
if (this.logger.hasLevel(3 /* verbose */)) {
|
|
181278
|
-
this.logger.info(`Session does not support events: ignored event: ${
|
|
181312
|
+
this.logger.info(`Session does not support events: ignored event: ${stringifyIndented(msg)}`);
|
|
181279
181313
|
}
|
|
181280
181314
|
return;
|
|
181281
181315
|
}
|
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-dev.
|
|
57
|
+
var version = `${versionMajorMinor}.0-dev.20231110`;
|
|
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",
|
|
3
3
|
"author": "Microsoft Corp.",
|
|
4
4
|
"homepage": "https://www.typescriptlang.org/",
|
|
5
|
-
"version": "5.4.0-dev.
|
|
5
|
+
"version": "5.4.0-dev.20231110",
|
|
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": "80ab111685e3e0c10d8d13cdd18d8dffa8328895"
|
|
118
118
|
}
|