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

12
lib/trap-caching.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];
@ -70,7 +74,6 @@ exports.getTrapCachingExtractorConfigArgsForLang = getTrapCachingExtractorConfig
* languages for which we shouldn't use TRAP caching omitted.
*/
async function downloadTrapCaches(codeql, languages, logger) {
var _a, _b;
const result = {};
const languagesSupportingCaching = await getLanguagesSupportingCaching(codeql, languages, logger);
logger.info(`Found ${languagesSupportingCaching.length} languages that support TRAP caching`);
@ -91,7 +94,7 @@ async function downloadTrapCaches(codeql, languages, logger) {
if (actionsUtil.workflowEventName() === "pull_request" &&
eventPath !== undefined) {
const event = JSON.parse(fs.readFileSync(path.resolve(eventPath), "utf-8"));
baseSha = ((_b = (_a = event.pull_request) === null || _a === void 0 ? void 0 : _a.base) === null || _b === void 0 ? void 0 : _b.sha) || baseSha;
baseSha = event.pull_request?.base?.sha || baseSha;
}
for (const language of languages) {
const cacheDir = result[language];
@ -150,7 +153,6 @@ async function uploadTrapCaches(codeql, config, logger) {
}
exports.uploadTrapCaches = uploadTrapCaches;
async function getLanguagesSupportingCaching(codeql, languages, logger) {
var _a, _b, _c, _d;
const result = [];
if (!(await (0, util_1.codeQlVersionAbove)(codeql, codeql_1.CODEQL_VERSION_BETTER_RESOLVE_LANGUAGES)))
return result;
@ -166,7 +168,7 @@ async function getLanguagesSupportingCaching(codeql, languages, logger) {
continue;
}
const extractor = extractorsForLanguage[0];
const trapCacheOptions = (_d = (_c = (_b = (_a = extractor.extractor_options) === null || _a === void 0 ? void 0 : _a.trap) === null || _b === void 0 ? void 0 : _b.properties) === null || _c === void 0 ? void 0 : _c.cache) === null || _d === void 0 ? void 0 : _d.properties;
const trapCacheOptions = extractor.extractor_options?.trap?.properties?.cache?.properties;
if (trapCacheOptions === undefined) {
logger.info(`${lang} does not support TRAP caching (missing option group)`);
continue;