Resolve violations of import/no-extraneous-dependencies lint

Fixes #201
This commit is contained in:
Chris Raynor 2020-09-29 15:03:21 +01:00
Родитель 228546a1e5
Коммит 8200c137dc
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 579A1FBC36FDA261
6 изменённых файлов: 14 добавлений и 13 удалений

Просмотреть файл

@ -18,7 +18,7 @@
"import/no-amd": "error",
"import/no-commonjs": "error",
"import/no-dynamic-require": "error",
"import/no-extraneous-dependencies": ["error", {"devDependencies": false}],
"import/no-extraneous-dependencies": ["error"],
"import/no-namespace": "off",
"import/no-unresolved": "error",
"import/no-webpack-loader-syntax": "error",
@ -46,7 +46,6 @@
"@typescript-eslint/restrict-template-expressions": "off",
"func-style": "off",
"github/no-then": "off",
"import/no-extraneous-dependencies": "off",
"no-shadow": "off"
}
}]

7
lib/codeql.js сгенерированный
Просмотреть файл

@ -6,9 +6,6 @@ var __importStar = (this && this.__importStar) || function (mod) {
result["default"] = mod;
return result;
};
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
const api = __importStar(require("./api-client"));
const defaults = __importStar(require("./defaults.json")); // Referenced from codeql-action-sync-tool!
@ -21,10 +18,10 @@ const stream = __importStar(require("stream"));
const toolcache = __importStar(require("@actions/tool-cache"));
const toolrunnner = __importStar(require("@actions/exec/lib/toolrunner"));
const util = __importStar(require("./util"));
const v4_1 = __importDefault(require("uuid/v4"));
const error_matcher_1 = require("./error-matcher");
const actions_util_1 = require("./actions-util");
const toolrunner_error_catcher_1 = require("./toolrunner-error-catcher");
const uuid_1 = require("uuid");
/**
* Stores the CodeQL object, and is populated by `setupCodeQL` or `getCodeQL`.
* Can be overridden in tests using `setCodeQL`.
@ -98,7 +95,7 @@ async function getCodeQLBundleDownloadURL(githubAuth, githubUrl, mode, logger) {
// This can be removed once https://github.com/actions/toolkit/pull/530 is merged and released.
async function toolcacheDownloadTool(url, headers, tempDir, logger) {
const client = new http.HttpClient("CodeQL Action");
const dest = path.join(tempDir, v4_1.default());
const dest = path.join(tempDir, uuid_1.v4());
const response = await client.get(url, headers);
if (response.message.statusCode !== 200) {
logger.info(`Failed to download from "${url}". Code(${response.message.statusCode}) Message(${response.message.statusMessage})`);

Различия файлов скрыты, потому что одна или несколько строк слишком длинны

11
package-lock.json сгенерированный
Просмотреть файл

@ -67,6 +67,11 @@
"version": "6.3.0",
"resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz",
"integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw=="
},
"uuid": {
"version": "3.4.0",
"resolved": "https://registry.npmjs.org/uuid/-/uuid-3.4.0.tgz",
"integrity": "sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A=="
}
}
},
@ -4339,9 +4344,9 @@
}
},
"uuid": {
"version": "3.4.0",
"resolved": "https://registry.npmjs.org/uuid/-/uuid-3.4.0.tgz",
"integrity": "sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A=="
"version": "8.3.0",
"resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.0.tgz",
"integrity": "sha512-fX6Z5o4m6XsXBdli9g7DtWgAx+osMsRRZFKma1mIUsLCz6vRvv+pz5VNbyu9UEDzpMWulZfvpgb/cmDXVulYFQ=="
},
"v8-compile-cache": {
"version": "2.1.1",

Просмотреть файл

@ -35,6 +35,7 @@
"md5": "^2.2.1",
"path": "^0.12.7",
"semver": "^7.3.2",
"uuid": "^8.3.0",
"zlib": "^1.0.5"
},
"//": [

Просмотреть файл

@ -10,14 +10,13 @@ import * as toolcache from "@actions/tool-cache";
import * as toolrunnner from "@actions/exec/lib/toolrunner";
import * as util from "./util";
import uuidV4 from "uuid/v4";
import { IHeaders } from "@actions/http-client/interfaces";
import { Language } from "./languages";
import { Logger } from "./logging";
import { errorMatchers } from "./error-matcher";
import { getRequiredEnvParam } from "./actions-util";
import { toolrunnerErrorCatcher } from "./toolrunner-error-catcher";
import { v4 as uuidV4 } from "uuid";
type Options = Array<string | number | boolean>;