Merge pull request #1201 from github/henrymercer/mergeback-v1-fixes

Mergeback fixes from v1 release
This commit is contained in:
Edoardo Pirovano 2022-08-22 14:10:44 +01:00 committed by GitHub
commit ec8883580f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
12 changed files with 15 additions and 73 deletions

6
lib/analyze-action.js generated
View file

@ -20,6 +20,8 @@ var __importStar = (this && this.__importStar) || function (mod) {
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.runPromise = exports.sendStatusReport = void 0;
// We need to import `performance` on Node 12
const perf_hooks_1 = require("perf_hooks");
const core = __importStar(require("@actions/core"));
const actionsUtil = __importStar(require("./actions-util"));
const analyze_1 = require("./analyze");
@ -120,10 +122,10 @@ async function run() {
// Possibly upload the database bundles for remote queries
await (0, database_upload_1.uploadDatabases)(repositoryNwo, config, apiDetails, logger);
// Possibly upload the TRAP caches for later re-use
const trapCacheUploadStartTime = performance.now();
const trapCacheUploadStartTime = perf_hooks_1.performance.now();
const codeql = await (0, codeql_1.getCodeQL)(config.codeQLCmd);
didUploadTrapCaches = await (0, trap_caching_1.uploadTrapCaches)(codeql, config, logger);
trapCacheUploadTime = performance.now() - trapCacheUploadStartTime;
trapCacheUploadTime = perf_hooks_1.performance.now() - trapCacheUploadStartTime;
// We don't upload results in test mode, so don't wait for processing
if (util.isInTestMode()) {
core.debug("In test mode. Waiting for processing is disabled.");

File diff suppressed because one or more lines are too long

6
lib/config-utils.js generated
View file

@ -22,6 +22,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
exports.getConfig = exports.getPathToParsedConfigFile = exports.initConfig = exports.parsePacks = exports.validatePackSpecification = exports.prettyPrintPack = exports.parsePacksSpecification = exports.parsePacksFromConfig = exports.calculateAugmentation = exports.getDefaultConfig = exports.getUnknownLanguagesError = exports.getNoLanguagesError = exports.getConfigFileDirectoryGivenMessage = exports.getConfigFileFormatInvalidMessage = exports.getConfigFileRepoFormatInvalidMessage = exports.getConfigFileDoesNotExistErrorMessage = exports.getConfigFileOutsideWorkspaceErrorMessage = exports.getLocalPathDoesNotExist = exports.getLocalPathOutsideOfRepository = exports.getPacksStrInvalid = exports.getPacksInvalid = exports.getPacksInvalidSplit = exports.getPathsInvalid = exports.getPathsIgnoreInvalid = exports.getQueryUsesInvalid = exports.getQueriesInvalid = exports.getDisableDefaultQueriesInvalid = exports.getNameInvalid = exports.validateAndSanitisePath = exports.defaultAugmentationProperties = void 0;
const fs = __importStar(require("fs"));
const path = __importStar(require("path"));
// We need to import `performance` on Node 12
const perf_hooks_1 = require("perf_hooks");
const yaml = __importStar(require("js-yaml"));
const semver = __importStar(require("semver"));
const api = __importStar(require("./api-client"));
@ -517,9 +519,9 @@ async function downloadCacheWithTime(trapCachingEnabled, codeQL, languages, logg
let trapCaches = {};
let trapCacheDownloadTime = 0;
if (trapCachingEnabled) {
const start = performance.now();
const start = perf_hooks_1.performance.now();
trapCaches = await (0, trap_caching_1.downloadTrapCaches)(codeQL, languages, logger);
trapCacheDownloadTime = performance.now() - start;
trapCacheDownloadTime = perf_hooks_1.performance.now() - start;
}
return { trapCaches, trapCacheDownloadTime };
}

File diff suppressed because one or more lines are too long

10
node_modules/.package-lock.json generated vendored
View file

@ -753,16 +753,6 @@
"integrity": "sha1-7ihweulOEdK4J7y+UnC86n8+ce4=",
"dev": true
},
"node_modules/@types/long": {
"version": "5.0.0",
"resolved": "https://registry.npmjs.org/@types/long/-/long-5.0.0.tgz",
"integrity": "sha512-eQs9RsucA/LNjnMoJvWG/nXa7Pot/RbBzilF/QRIU/xRl+0ApxrSUFsV5lmf01SvSlqMzJ7Zwxe440wmz2SJGA==",
"deprecated": "This is a stub types definition. long provides its own type definitions, so you do not need this installed.",
"dev": true,
"dependencies": {
"long": "*"
}
},
"node_modules/@types/node": {
"version": "16.11.22",
"resolved": "https://registry.npmjs.org/@types/node/-/node-16.11.22.tgz",

21
node_modules/@types/long/LICENSE generated vendored
View file

@ -1,21 +0,0 @@
MIT License
Copyright (c) Microsoft Corporation.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE

3
node_modules/@types/long/README.md generated vendored
View file

@ -1,3 +0,0 @@
This is a stub types definition for @types/long (https://github.com/dcodeIO/long.js#readme).
long provides its own type definitions, so you don't need @types/long installed!

View file

@ -1,12 +0,0 @@
{
"name": "@types/long",
"version": "5.0.0",
"description": "Stub TypeScript definitions entry for long, which provides its own types definitions",
"main": "",
"scripts": {},
"license": "MIT",
"dependencies": {
"long": "*"
},
"deprecated": "This is a stub types definition. long provides its own type definitions, so you do not need this installed."
}

20
package-lock.json generated
View file

@ -44,7 +44,6 @@
"@types/adm-zip": "^0.5.0",
"@types/get-folder-size": "^2.0.0",
"@types/js-yaml": "^4.0.5",
"@types/long": "5.0.0",
"@types/node": "16.11.22",
"@types/semver": "^7.3.8",
"@types/sinon": "^10.0.2",
@ -811,16 +810,6 @@
"integrity": "sha1-7ihweulOEdK4J7y+UnC86n8+ce4=",
"dev": true
},
"node_modules/@types/long": {
"version": "5.0.0",
"resolved": "https://registry.npmjs.org/@types/long/-/long-5.0.0.tgz",
"integrity": "sha512-eQs9RsucA/LNjnMoJvWG/nXa7Pot/RbBzilF/QRIU/xRl+0ApxrSUFsV5lmf01SvSlqMzJ7Zwxe440wmz2SJGA==",
"deprecated": "This is a stub types definition. long provides its own type definitions, so you do not need this installed.",
"dev": true,
"dependencies": {
"long": "*"
}
},
"node_modules/@types/node": {
"version": "16.11.22",
"resolved": "https://registry.npmjs.org/@types/node/-/node-16.11.22.tgz",
@ -6623,15 +6612,6 @@
"integrity": "sha1-7ihweulOEdK4J7y+UnC86n8+ce4=",
"dev": true
},
"@types/long": {
"version": "5.0.0",
"resolved": "https://registry.npmjs.org/@types/long/-/long-5.0.0.tgz",
"integrity": "sha512-eQs9RsucA/LNjnMoJvWG/nXa7Pot/RbBzilF/QRIU/xRl+0ApxrSUFsV5lmf01SvSlqMzJ7Zwxe440wmz2SJGA==",
"dev": true,
"requires": {
"long": "*"
}
},
"@types/node": {
"version": "16.11.22",
"resolved": "https://registry.npmjs.org/@types/node/-/node-16.11.22.tgz",

View file

@ -59,7 +59,6 @@
"@types/adm-zip": "^0.5.0",
"@types/get-folder-size": "^2.0.0",
"@types/js-yaml": "^4.0.5",
"@types/long": "5.0.0",
"@types/node": "16.11.22",
"@types/semver": "^7.3.8",
"@types/sinon": "^10.0.2",

View file

@ -1,3 +1,6 @@
// We need to import `performance` on Node 12
import { performance } from "perf_hooks";
import * as core from "@actions/core";
import * as actionsUtil from "./actions-util";

View file

@ -1,5 +1,7 @@
import * as fs from "fs";
import * as path from "path";
// We need to import `performance` on Node 12
import { performance } from "perf_hooks";
import * as yaml from "js-yaml";
import * as semver from "semver";