@typescript-deploys/pr-build 5.1.0-pr-53268-4 → 5.1.0-pr-53292-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 +41 -55
- package/lib/tsserver.js +69 -79
- package/lib/tsserverlibrary.js +66 -78
- package/lib/typescript.js +42 -57
- package/lib/typingsInstaller.js +26 -44
- package/package.json +2 -2
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.1";
|
|
57
|
-
var version = `${versionMajorMinor}.0-insiders.
|
|
57
|
+
var version = `${versionMajorMinor}.0-insiders.20230316`;
|
|
58
58
|
|
|
59
59
|
// src/compiler/core.ts
|
|
60
60
|
var emptyArray = [];
|
|
@@ -2177,28 +2177,6 @@ var nativePerformance = nativePerformanceHooks == null ? void 0 : nativePerforma
|
|
|
2177
2177
|
var timestamp = nativePerformance ? () => nativePerformance.now() : Date.now ? Date.now : () => +/* @__PURE__ */ new Date();
|
|
2178
2178
|
|
|
2179
2179
|
// src/compiler/perfLogger.ts
|
|
2180
|
-
var nullLogger = {
|
|
2181
|
-
logEvent: noop,
|
|
2182
|
-
logErrEvent: noop,
|
|
2183
|
-
logPerfEvent: noop,
|
|
2184
|
-
logInfoEvent: noop,
|
|
2185
|
-
logStartCommand: noop,
|
|
2186
|
-
logStopCommand: noop,
|
|
2187
|
-
logStartUpdateProgram: noop,
|
|
2188
|
-
logStopUpdateProgram: noop,
|
|
2189
|
-
logStartUpdateGraph: noop,
|
|
2190
|
-
logStopUpdateGraph: noop,
|
|
2191
|
-
logStartResolveModule: noop,
|
|
2192
|
-
logStopResolveModule: noop,
|
|
2193
|
-
logStartParseSourceFile: noop,
|
|
2194
|
-
logStopParseSourceFile: noop,
|
|
2195
|
-
logStartReadFile: noop,
|
|
2196
|
-
logStopReadFile: noop,
|
|
2197
|
-
logStartBindFile: noop,
|
|
2198
|
-
logStopBindFile: noop,
|
|
2199
|
-
logStartScheduledOperation: noop,
|
|
2200
|
-
logStopScheduledOperation: noop
|
|
2201
|
-
};
|
|
2202
2180
|
var etwModule;
|
|
2203
2181
|
var _a;
|
|
2204
2182
|
try {
|
|
@@ -2207,7 +2185,7 @@ try {
|
|
|
2207
2185
|
} catch (e) {
|
|
2208
2186
|
etwModule = void 0;
|
|
2209
2187
|
}
|
|
2210
|
-
var perfLogger = (etwModule == null ? void 0 : etwModule.logEvent) ? etwModule :
|
|
2188
|
+
var perfLogger = (etwModule == null ? void 0 : etwModule.logEvent) ? etwModule : void 0;
|
|
2211
2189
|
|
|
2212
2190
|
// src/compiler/performance.ts
|
|
2213
2191
|
var performanceImpl;
|
|
@@ -4556,13 +4534,15 @@ var sys = (() => {
|
|
|
4556
4534
|
return buffer.toString("utf8");
|
|
4557
4535
|
}
|
|
4558
4536
|
function readFile(fileName, _encoding) {
|
|
4559
|
-
|
|
4537
|
+
var _a2, _b;
|
|
4538
|
+
(_a2 = perfLogger) == null ? void 0 : _a2.logStartReadFile(fileName);
|
|
4560
4539
|
const file = readFileWorker(fileName, _encoding);
|
|
4561
|
-
perfLogger.logStopReadFile();
|
|
4540
|
+
(_b = perfLogger) == null ? void 0 : _b.logStopReadFile();
|
|
4562
4541
|
return file;
|
|
4563
4542
|
}
|
|
4564
4543
|
function writeFile2(fileName, data, writeByteOrderMark) {
|
|
4565
|
-
|
|
4544
|
+
var _a2;
|
|
4545
|
+
(_a2 = perfLogger) == null ? void 0 : _a2.logEvent("WriteFile: " + fileName);
|
|
4566
4546
|
if (writeByteOrderMark) {
|
|
4567
4547
|
data = byteOrderMarkIndicator + data;
|
|
4568
4548
|
}
|
|
@@ -4583,7 +4563,8 @@ var sys = (() => {
|
|
|
4583
4563
|
}
|
|
4584
4564
|
}
|
|
4585
4565
|
function getAccessibleFileSystemEntries(path2) {
|
|
4586
|
-
|
|
4566
|
+
var _a2;
|
|
4567
|
+
(_a2 = perfLogger) == null ? void 0 : _a2.logEvent("ReadDir: " + (path2 || "."));
|
|
4587
4568
|
try {
|
|
4588
4569
|
const entries = _fs.readdirSync(path2 || ".", { withFileTypes: true });
|
|
4589
4570
|
const files = [];
|
|
@@ -27361,6 +27342,7 @@ function getConditions(options, esmMode) {
|
|
|
27361
27342
|
return concatenate(conditions, options.customConditions);
|
|
27362
27343
|
}
|
|
27363
27344
|
function resolveModuleName(moduleName, containingFile, compilerOptions, host, cache, redirectedReference, resolutionMode) {
|
|
27345
|
+
var _a2, _b, _c;
|
|
27364
27346
|
const traceEnabled = isTraceEnabled(compilerOptions, host);
|
|
27365
27347
|
if (redirectedReference) {
|
|
27366
27348
|
compilerOptions = redirectedReference.commandLine.options;
|
|
@@ -27402,10 +27384,7 @@ function resolveModuleName(moduleName, containingFile, compilerOptions, host, ca
|
|
|
27402
27384
|
trace(host, Diagnostics.Explicitly_specified_module_resolution_kind_Colon_0, ModuleResolutionKind[moduleResolution]);
|
|
27403
27385
|
}
|
|
27404
27386
|
}
|
|
27405
|
-
perfLogger.logStartResolveModule(
|
|
27406
|
-
moduleName
|
|
27407
|
-
/* , containingFile, ModuleResolutionKind[moduleResolution]*/
|
|
27408
|
-
);
|
|
27387
|
+
(_a2 = perfLogger) == null ? void 0 : _a2.logStartResolveModule(moduleName);
|
|
27409
27388
|
switch (moduleResolution) {
|
|
27410
27389
|
case 3 /* Node16 */:
|
|
27411
27390
|
result = node16ModuleNameResolver(moduleName, containingFile, compilerOptions, host, cache, redirectedReference, resolutionMode);
|
|
@@ -27426,8 +27405,8 @@ function resolveModuleName(moduleName, containingFile, compilerOptions, host, ca
|
|
|
27426
27405
|
return Debug.fail(`Unexpected moduleResolution: ${moduleResolution}`);
|
|
27427
27406
|
}
|
|
27428
27407
|
if (result && result.resolvedModule)
|
|
27429
|
-
perfLogger.logInfoEvent(`Module "${moduleName}" resolved to "${result.resolvedModule.resolvedFileName}"`);
|
|
27430
|
-
perfLogger.logStopResolveModule(result && result.resolvedModule ? "" + result.resolvedModule.resolvedFileName : "null");
|
|
27408
|
+
(_b = perfLogger) == null ? void 0 : _b.logInfoEvent(`Module "${moduleName}" resolved to "${result.resolvedModule.resolvedFileName}"`);
|
|
27409
|
+
(_c = perfLogger) == null ? void 0 : _c.logStopResolveModule(result && result.resolvedModule ? "" + result.resolvedModule.resolvedFileName : "null");
|
|
27431
27410
|
cache == null ? void 0 : cache.getOrCreateCacheForDirectory(containingDirectory, redirectedReference).set(moduleName, resolutionMode, result);
|
|
27432
27411
|
if (!isExternalModuleNameRelative(moduleName)) {
|
|
27433
27412
|
cache == null ? void 0 : cache.getOrCreateCacheForNonRelativeName(moduleName, resolutionMode, redirectedReference).set(containingDirectory, result);
|
|
@@ -31606,21 +31585,24 @@ function installNpmPackages(npmPath, tsVersion, packageNames, install) {
|
|
|
31606
31585
|
for (let remaining = packageNames.length; remaining > 0; ) {
|
|
31607
31586
|
const result = getNpmCommandForInstallation(npmPath, tsVersion, packageNames, remaining);
|
|
31608
31587
|
remaining = result.remaining;
|
|
31609
|
-
hasError = install(result.command) || hasError;
|
|
31588
|
+
hasError = install(result.command, result.args) || hasError;
|
|
31610
31589
|
}
|
|
31611
31590
|
return hasError;
|
|
31612
31591
|
}
|
|
31613
31592
|
function getNpmCommandForInstallation(npmPath, tsVersion, packageNames, remaining) {
|
|
31614
31593
|
const sliceStart = packageNames.length - remaining;
|
|
31615
|
-
let
|
|
31594
|
+
let toSlice = remaining;
|
|
31595
|
+
let args;
|
|
31616
31596
|
while (true) {
|
|
31617
|
-
|
|
31618
|
-
|
|
31597
|
+
const slice = toSlice === packageNames.length ? packageNames : packageNames.slice(sliceStart, sliceStart + toSlice);
|
|
31598
|
+
const length2 = reduceLeft(slice, (total, pkg) => total + pkg.length, 0);
|
|
31599
|
+
if (length2 < 8e3) {
|
|
31600
|
+
args = ["install", "--ignore-scripts", ...slice, "--save-dev", `--user-agent=typesInstaller/${tsVersion}`];
|
|
31619
31601
|
break;
|
|
31620
31602
|
}
|
|
31621
31603
|
toSlice = toSlice - Math.floor(toSlice / 2);
|
|
31622
31604
|
}
|
|
31623
|
-
return { command, remaining: remaining - toSlice };
|
|
31605
|
+
return { command: npmPath, args, remaining: remaining - toSlice };
|
|
31624
31606
|
}
|
|
31625
31607
|
function endsWith2(str, suffix, caseSensitive) {
|
|
31626
31608
|
const expectedPos = str.length - suffix.length;
|
|
@@ -32080,13 +32062,13 @@ var NodeTypingsInstaller = class extends TypingsInstaller {
|
|
|
32080
32062
|
this.log.writeLine(`NPM location: ${this.npmPath} (explicit '${Arguments.NpmLocation}' ${npmLocation2 === void 0 ? "not " : ""} provided)`);
|
|
32081
32063
|
this.log.writeLine(`validateDefaultNpmLocation: ${validateDefaultNpmLocation2}`);
|
|
32082
32064
|
}
|
|
32083
|
-
({ execSync: this.
|
|
32065
|
+
({ execSync: this.nodeExecFileSync } = require("child_process"));
|
|
32084
32066
|
this.ensurePackageDirectoryExists(globalTypingsCacheLocation2);
|
|
32085
32067
|
try {
|
|
32086
32068
|
if (this.log.isEnabled()) {
|
|
32087
32069
|
this.log.writeLine(`Updating ${typesRegistryPackageName} npm package...`);
|
|
32088
32070
|
}
|
|
32089
|
-
this.
|
|
32071
|
+
this.execFileSyncAndLog(this.npmPath, ["install", "--ignore-scripts", `${typesRegistryPackageName}@${this.latestDistTag}`], { cwd: globalTypingsCacheLocation2 });
|
|
32090
32072
|
if (this.log.isEnabled()) {
|
|
32091
32073
|
this.log.writeLine(`Updated ${typesRegistryPackageName} npm package`);
|
|
32092
32074
|
}
|
|
@@ -32157,19 +32139,19 @@ var NodeTypingsInstaller = class extends TypingsInstaller {
|
|
|
32157
32139
|
this.log.writeLine(`#${requestId} with arguments'${JSON.stringify(packageNames)}'.`);
|
|
32158
32140
|
}
|
|
32159
32141
|
const start = Date.now();
|
|
32160
|
-
const hasError = installNpmPackages(this.npmPath, version, packageNames, (command) => this.
|
|
32142
|
+
const hasError = installNpmPackages(this.npmPath, version, packageNames, (command, args) => this.execFileSyncAndLog(command, args, { cwd }));
|
|
32161
32143
|
if (this.log.isEnabled()) {
|
|
32162
32144
|
this.log.writeLine(`npm install #${requestId} took: ${Date.now() - start} ms`);
|
|
32163
32145
|
}
|
|
32164
32146
|
onRequestCompleted(!hasError);
|
|
32165
32147
|
}
|
|
32166
32148
|
/** Returns 'true' in case of error. */
|
|
32167
|
-
|
|
32149
|
+
execFileSyncAndLog(command, args, options) {
|
|
32168
32150
|
if (this.log.isEnabled()) {
|
|
32169
32151
|
this.log.writeLine(`Exec: ${command}`);
|
|
32170
32152
|
}
|
|
32171
32153
|
try {
|
|
32172
|
-
const stdout = this.
|
|
32154
|
+
const stdout = this.nodeExecFileSync(command, args, { ...options, encoding: "utf-8", timeout: 1e4 });
|
|
32173
32155
|
if (this.log.isEnabled()) {
|
|
32174
32156
|
this.log.writeLine(` Succeeded. stdout:${indent(sys.newLine, stdout)}`);
|
|
32175
32157
|
}
|
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.1.0-pr-
|
|
5
|
+
"version": "5.1.0-pr-53292-2",
|
|
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": "14.21.1",
|
|
115
115
|
"npm": "8.19.3"
|
|
116
116
|
},
|
|
117
|
-
"gitHead": "
|
|
117
|
+
"gitHead": "d914d6c336c9c603779e8e9001e3be829e54b878"
|
|
118
118
|
}
|