typescript 5.4.0-dev.20231109 → 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 +1 -1
- package/lib/tsserver.js +34 -4
- package/lib/typescript.js +34 -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 = [];
|
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";
|
|
@@ -175413,6 +175413,35 @@ var TypingsInstaller = class {
|
|
|
175413
175413
|
}
|
|
175414
175414
|
}
|
|
175415
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
|
+
}
|
|
175416
175445
|
initializeSafeList() {
|
|
175417
175446
|
if (this.typesMapLocation) {
|
|
175418
175447
|
const safeListFromMap = ts_JsTyping_exports.loadTypesMap(this.installTypingHost, this.typesMapLocation);
|
|
@@ -177549,7 +177578,7 @@ var Project3 = class _Project {
|
|
|
177549
177578
|
for (const file of changedFiles) {
|
|
177550
177579
|
this.cachedUnresolvedImportsPerFile.delete(file);
|
|
177551
177580
|
}
|
|
177552
|
-
if (this.languageServiceEnabled && this.projectService.serverMode === 0 /* Semantic */) {
|
|
177581
|
+
if (this.languageServiceEnabled && this.projectService.serverMode === 0 /* Semantic */ && !this.isOrphan()) {
|
|
177553
177582
|
if (hasNewProgram || changedFiles.length) {
|
|
177554
177583
|
this.lastCachedUnresolvedImportsList = getUnresolvedImports(this.program, this.cachedUnresolvedImportsPerFile);
|
|
177555
177584
|
}
|
|
@@ -183807,9 +183836,10 @@ var Session3 = class _Session {
|
|
|
183807
183836
|
}
|
|
183808
183837
|
}
|
|
183809
183838
|
projectsUpdatedInBackgroundEvent(openFiles) {
|
|
183810
|
-
this.projectService.logger.info(`got projects updated in background
|
|
183839
|
+
this.projectService.logger.info(`got projects updated in background ${openFiles}`);
|
|
183811
183840
|
if (openFiles.length) {
|
|
183812
183841
|
if (!this.suppressDiagnosticEvents && !this.noGetErrOnBackgroundUpdate) {
|
|
183842
|
+
this.projectService.logger.info(`Queueing diagnostics update for ${openFiles}`);
|
|
183813
183843
|
this.errorCheck.startNew((next) => this.updateErrorCheck(
|
|
183814
183844
|
next,
|
|
183815
183845
|
openFiles,
|
|
@@ -183880,7 +183910,7 @@ Project '${project.projectName}' (${ProjectKind[project.projectKind]}) ${counter
|
|
|
183880
183910
|
send(msg) {
|
|
183881
183911
|
if (msg.type === "event" && !this.canUseEvents) {
|
|
183882
183912
|
if (this.logger.hasLevel(3 /* verbose */)) {
|
|
183883
|
-
this.logger.info(`Session does not support events: ignored event: ${
|
|
183913
|
+
this.logger.info(`Session does not support events: ignored event: ${stringifyIndented(msg)}`);
|
|
183884
183914
|
}
|
|
183885
183915
|
return;
|
|
183886
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";
|
|
@@ -172628,6 +172628,35 @@ ${options.prefix}` : "\n" : options.prefix
|
|
|
172628
172628
|
}
|
|
172629
172629
|
}
|
|
172630
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
|
+
}
|
|
172631
172660
|
initializeSafeList() {
|
|
172632
172661
|
if (this.typesMapLocation) {
|
|
172633
172662
|
const safeListFromMap = ts_JsTyping_exports.loadTypesMap(this.installTypingHost, this.typesMapLocation);
|
|
@@ -174880,7 +174909,7 @@ ${options.prefix}` : "\n" : options.prefix
|
|
|
174880
174909
|
for (const file of changedFiles) {
|
|
174881
174910
|
this.cachedUnresolvedImportsPerFile.delete(file);
|
|
174882
174911
|
}
|
|
174883
|
-
if (this.languageServiceEnabled && this.projectService.serverMode === 0 /* Semantic */) {
|
|
174912
|
+
if (this.languageServiceEnabled && this.projectService.serverMode === 0 /* Semantic */ && !this.isOrphan()) {
|
|
174884
174913
|
if (hasNewProgram || changedFiles.length) {
|
|
174885
174914
|
this.lastCachedUnresolvedImportsList = getUnresolvedImports(this.program, this.cachedUnresolvedImportsPerFile);
|
|
174886
174915
|
}
|
|
@@ -181206,9 +181235,10 @@ ${json}${newLine}`;
|
|
|
181206
181235
|
}
|
|
181207
181236
|
}
|
|
181208
181237
|
projectsUpdatedInBackgroundEvent(openFiles) {
|
|
181209
|
-
this.projectService.logger.info(`got projects updated in background
|
|
181238
|
+
this.projectService.logger.info(`got projects updated in background ${openFiles}`);
|
|
181210
181239
|
if (openFiles.length) {
|
|
181211
181240
|
if (!this.suppressDiagnosticEvents && !this.noGetErrOnBackgroundUpdate) {
|
|
181241
|
+
this.projectService.logger.info(`Queueing diagnostics update for ${openFiles}`);
|
|
181212
181242
|
this.errorCheck.startNew((next) => this.updateErrorCheck(
|
|
181213
181243
|
next,
|
|
181214
181244
|
openFiles,
|
|
@@ -181279,7 +181309,7 @@ Project '${project.projectName}' (${ProjectKind[project.projectKind]}) ${counter
|
|
|
181279
181309
|
send(msg) {
|
|
181280
181310
|
if (msg.type === "event" && !this.canUseEvents) {
|
|
181281
181311
|
if (this.logger.hasLevel(3 /* verbose */)) {
|
|
181282
|
-
this.logger.info(`Session does not support events: ignored event: ${
|
|
181312
|
+
this.logger.info(`Session does not support events: ignored event: ${stringifyIndented(msg)}`);
|
|
181283
181313
|
}
|
|
181284
181314
|
return;
|
|
181285
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
|
}
|