Upgrade TypeScript to 9.2.0

This commit is contained in:
Henry Mercer 2023-01-18 20:00:33 +00:00
parent 40a75182e7
commit 5f644f971e
2873 changed files with 320828 additions and 210965 deletions

17
lib/util.js generated
View file

@ -1,7 +1,11 @@
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
@ -417,7 +421,7 @@ class UserError extends Error {
}
exports.UserError = UserError;
function isHTTPError(arg) {
return (arg === null || arg === void 0 ? void 0 : arg.status) !== undefined && Number.isInteger(arg.status);
return arg?.status !== undefined && Number.isInteger(arg.status);
}
exports.isHTTPError = isHTTPError;
let cachedCodeQlVersion = undefined;
@ -687,16 +691,13 @@ exports.checkForTimeout = checkForTimeout;
* @returns true iff the runner is hosted by GitHub
*/
function isHostedRunner() {
var _a, _b, _c;
return (
// Name of the runner on hosted Windows runners
((_a = process.env["RUNNER_NAME"]) === null || _a === void 0 ? void 0 : _a.includes("Hosted Agent")) ||
(
process.env["RUNNER_NAME"]?.includes("Hosted Agent") ||
// Name of the runner on hosted POSIX runners
(_b = process.env["RUNNER_NAME"]) === null || _b === void 0 ? void 0 : _b.includes("GitHub Actions")) ||
(
process.env["RUNNER_NAME"]?.includes("GitHub Actions") ||
// Segment of the path to the tool cache on all hosted runners
(_c = process.env["RUNNER_TOOL_CACHE"]) === null || _c === void 0 ? void 0 : _c.includes("hostedtoolcache")));
process.env["RUNNER_TOOL_CACHE"]?.includes("hostedtoolcache"));
}
exports.isHostedRunner = isHostedRunner;
/**