Merge branch 'main' into update-bundle/codeql-bundle-v2.17.1

This commit is contained in:
Alexander Eyers-Taylor 2024-04-24 16:33:51 +01:00 committed by GitHub
commit 79d9ee7f07
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
45 changed files with 451 additions and 1968 deletions

View file

@ -6,6 +6,14 @@ Note that the only difference between `v2` and `v3` of the CodeQL Action is the
## [UNRELEASED] ## [UNRELEASED]
No user facing changes.
## 3.25.2 - 22 Apr 2024
No user facing changes.
## 3.25.1 - 17 Apr 2024
- We are rolling out a feature in April/May 2024 that improves the reliability and performance of analyzing code when analyzing a compiled language with the `autobuild` [build mode](https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/codeql-code-scanning-for-compiled-languages#codeql-build-modes). [#2235](https://github.com/github/codeql-action/pull/2235) - We are rolling out a feature in April/May 2024 that improves the reliability and performance of analyzing code when analyzing a compiled language with the `autobuild` [build mode](https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/codeql-code-scanning-for-compiled-languages#codeql-build-modes). [#2235](https://github.com/github/codeql-action/pull/2235)
- Fix a bug where the `init` Action would fail if `--overwrite` was specified in `CODEQL_ACTION_EXTRA_OPTIONS`. [#2245](https://github.com/github/codeql-action/pull/2245) - Fix a bug where the `init` Action would fail if `--overwrite` was specified in `CODEQL_ACTION_EXTRA_OPTIONS`. [#2245](https://github.com/github/codeql-action/pull/2245)
- Update default CodeQL bundle version to 2.17.1. [#2247](https://github.com/github/codeql-action/pull/2247) - Update default CodeQL bundle version to 2.17.1. [#2247](https://github.com/github/codeql-action/pull/2247)

6
lib/cli-errors.js generated
View file

@ -116,6 +116,7 @@ function ensureEndsInPeriod(text) {
/** Error messages from the CLI that we consider configuration errors and handle specially. */ /** Error messages from the CLI that we consider configuration errors and handle specially. */
var CliConfigErrorCategory; var CliConfigErrorCategory;
(function (CliConfigErrorCategory) { (function (CliConfigErrorCategory) {
CliConfigErrorCategory["ExternalRepositoryCloneFailed"] = "ExternalRepositoryCloneFailed";
CliConfigErrorCategory["GradleBuildFailed"] = "GradleBuildFailed"; CliConfigErrorCategory["GradleBuildFailed"] = "GradleBuildFailed";
CliConfigErrorCategory["IncompatibleWithActionVersion"] = "IncompatibleWithActionVersion"; CliConfigErrorCategory["IncompatibleWithActionVersion"] = "IncompatibleWithActionVersion";
CliConfigErrorCategory["InitCalledTwice"] = "InitCalledTwice"; CliConfigErrorCategory["InitCalledTwice"] = "InitCalledTwice";
@ -134,6 +135,11 @@ var CliConfigErrorCategory;
* would like to categorize an error as a configuration error or not. * would like to categorize an error as a configuration error or not.
*/ */
exports.cliErrorsConfig = { exports.cliErrorsConfig = {
[CliConfigErrorCategory.ExternalRepositoryCloneFailed]: {
cliErrorMessageCandidates: [
new RegExp("Failed to clone external Git repository"),
],
},
[CliConfigErrorCategory.GradleBuildFailed]: { [CliConfigErrorCategory.GradleBuildFailed]: {
cliErrorMessageCandidates: [ cliErrorMessageCandidates: [
new RegExp("[autobuild] FAILURE: Build failed with an exception."), new RegExp("[autobuild] FAILURE: Build failed with an exception."),

File diff suppressed because one or more lines are too long

5
lib/upload-lib.js generated
View file

@ -293,8 +293,7 @@ function validateSarifFileSchema(sarifFilePath, logger) {
exports.validateSarifFileSchema = validateSarifFileSchema; exports.validateSarifFileSchema = validateSarifFileSchema;
// buildPayload constructs a map ready to be uploaded to the API from the given // buildPayload constructs a map ready to be uploaded to the API from the given
// parameters, respecting the current mode and target GitHub instance version. // parameters, respecting the current mode and target GitHub instance version.
function buildPayload(commitOid, ref, analysisKey, analysisName, zippedSarif, workflowRunID, workflowRunAttempt, checkoutURI, environment, toolNames, mergeBaseCommitOid, logger) { function buildPayload(commitOid, ref, analysisKey, analysisName, zippedSarif, workflowRunID, workflowRunAttempt, checkoutURI, environment, toolNames, mergeBaseCommitOid) {
logger.info(`Combining SARIF files using CLI`);
const payloadObj = { const payloadObj = {
commit_oid: commitOid, commit_oid: commitOid,
ref, ref,
@ -355,7 +354,7 @@ async function uploadFiles(sarifFiles, repositoryNwo, commitOid, ref, analysisKe
logger.debug(`Compressing serialized SARIF`); logger.debug(`Compressing serialized SARIF`);
const zippedSarif = zlib_1.default.gzipSync(sarifPayload).toString("base64"); const zippedSarif = zlib_1.default.gzipSync(sarifPayload).toString("base64");
const checkoutURI = (0, file_url_1.default)(sourceRoot); const checkoutURI = (0, file_url_1.default)(sourceRoot);
const payload = buildPayload(commitOid, ref, analysisKey, analysisName, zippedSarif, workflowRunID, workflowRunAttempt, checkoutURI, environment, toolNames, await actionsUtil.determineMergeBaseCommitOid(), logger); const payload = buildPayload(commitOid, ref, analysisKey, analysisName, zippedSarif, workflowRunID, workflowRunAttempt, checkoutURI, environment, toolNames, await actionsUtil.determineMergeBaseCommitOid());
// Log some useful debug info about the info // Log some useful debug info about the info
const rawUploadSizeBytes = sarifPayload.length; const rawUploadSizeBytes = sarifPayload.length;
logger.debug(`Raw upload size: ${rawUploadSizeBytes} bytes`); logger.debug(`Raw upload size: ${rawUploadSizeBytes} bytes`);

File diff suppressed because one or more lines are too long

View file

@ -47,7 +47,7 @@ ava_1.default.beforeEach(() => {
}); });
(0, ava_1.default)("validate correct payload used for push, PR merge commit, and PR head", async (t) => { (0, ava_1.default)("validate correct payload used for push, PR merge commit, and PR head", async (t) => {
process.env["GITHUB_EVENT_NAME"] = "push"; process.env["GITHUB_EVENT_NAME"] = "push";
const pushPayload = uploadLib.buildPayload("commit", "refs/heads/master", "key", undefined, "", 1234, 1, "/opt/src", undefined, ["CodeQL", "eslint"], "mergeBaseCommit", (0, logging_1.getRunnerLogger)(true)); const pushPayload = uploadLib.buildPayload("commit", "refs/heads/master", "key", undefined, "", 1234, 1, "/opt/src", undefined, ["CodeQL", "eslint"], "mergeBaseCommit");
// Not triggered by a pull request // Not triggered by a pull request
t.falsy(pushPayload.base_ref); t.falsy(pushPayload.base_ref);
t.falsy(pushPayload.base_sha); t.falsy(pushPayload.base_sha);
@ -55,11 +55,11 @@ ava_1.default.beforeEach(() => {
process.env["GITHUB_SHA"] = "commit"; process.env["GITHUB_SHA"] = "commit";
process.env["GITHUB_BASE_REF"] = "master"; process.env["GITHUB_BASE_REF"] = "master";
process.env["GITHUB_EVENT_PATH"] = `${__dirname}/../src/testdata/pull_request.json`; process.env["GITHUB_EVENT_PATH"] = `${__dirname}/../src/testdata/pull_request.json`;
const prMergePayload = uploadLib.buildPayload("commit", "refs/pull/123/merge", "key", undefined, "", 1234, 1, "/opt/src", undefined, ["CodeQL", "eslint"], "mergeBaseCommit", (0, logging_1.getRunnerLogger)(true)); const prMergePayload = uploadLib.buildPayload("commit", "refs/pull/123/merge", "key", undefined, "", 1234, 1, "/opt/src", undefined, ["CodeQL", "eslint"], "mergeBaseCommit");
// Uploads for a merge commit use the merge base // Uploads for a merge commit use the merge base
t.deepEqual(prMergePayload.base_ref, "refs/heads/master"); t.deepEqual(prMergePayload.base_ref, "refs/heads/master");
t.deepEqual(prMergePayload.base_sha, "mergeBaseCommit"); t.deepEqual(prMergePayload.base_sha, "mergeBaseCommit");
const prHeadPayload = uploadLib.buildPayload("headCommit", "refs/pull/123/head", "key", undefined, "", 1234, 1, "/opt/src", undefined, ["CodeQL", "eslint"], "mergeBaseCommit", (0, logging_1.getRunnerLogger)(true)); const prHeadPayload = uploadLib.buildPayload("headCommit", "refs/pull/123/head", "key", undefined, "", 1234, 1, "/opt/src", undefined, ["CodeQL", "eslint"], "mergeBaseCommit");
// Uploads for the head use the PR base // Uploads for the head use the PR base
t.deepEqual(prHeadPayload.base_ref, "refs/heads/master"); t.deepEqual(prHeadPayload.base_ref, "refs/heads/master");
t.deepEqual(prHeadPayload.base_sha, "f95f852bd8fca8fcc58a9a2d6c842781e32a215e"); t.deepEqual(prHeadPayload.base_sha, "f95f852bd8fca8fcc58a9a2d6c842781e32a215e");

File diff suppressed because one or more lines are too long

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

@ -1,6 +1,6 @@
{ {
"name": "codeql", "name": "codeql",
"version": "3.25.1", "version": "3.25.3",
"lockfileVersion": 3, "lockfileVersion": 3,
"requires": true, "requires": true,
"packages": { "packages": {
@ -762,17 +762,17 @@
} }
}, },
"node_modules/@octokit/types": { "node_modules/@octokit/types": {
"version": "13.4.0", "version": "13.4.1",
"resolved": "https://registry.npmjs.org/@octokit/types/-/types-13.4.0.tgz", "resolved": "https://registry.npmjs.org/@octokit/types/-/types-13.4.1.tgz",
"integrity": "sha512-WlMegy3lPXYWASe3k9Jslc5a0anrYAYMWtsFrxBTdQjS70hvLH6C+PGvHbOsgy3RA3LouGJoU/vAt4KarecQLQ==", "integrity": "sha512-Y73oOAzRBAUzR/iRAbGULzpNkX8vaxKCqEtg6K74Ff3w9f5apFnWtE/2nade7dMWWW3bS5Kkd6DJS4HF04xreg==",
"dependencies": { "dependencies": {
"@octokit/openapi-types": "^22.0.1" "@octokit/openapi-types": "^22.1.0"
} }
}, },
"node_modules/@octokit/types/node_modules/@octokit/openapi-types": { "node_modules/@octokit/types/node_modules/@octokit/openapi-types": {
"version": "22.0.1", "version": "22.1.0",
"resolved": "https://registry.npmjs.org/@octokit/openapi-types/-/openapi-types-22.0.1.tgz", "resolved": "https://registry.npmjs.org/@octokit/openapi-types/-/openapi-types-22.1.0.tgz",
"integrity": "sha512-1yN5m1IMNXthoBDUXFF97N1gHop04B3H8ws7wtOr8GgRyDO1gKALjwMHARNBoMBiB/2vEe/vxstrApcJZzQbnQ==" "integrity": "sha512-pGUdSP+eEPfZiQHNkZI0U01HLipxncisdJQB4G//OAmfeO8sqTQ9KRa0KF03TUPCziNsoXUrTg4B2Q1EX++T0Q=="
}, },
"node_modules/@opentelemetry/api": { "node_modules/@opentelemetry/api": {
"version": "1.4.1", "version": "1.4.1",
@ -960,16 +960,16 @@
"integrity": "sha512-jg+97EGIcY9AGHJJRaaPVgetKDsrTgbRjQ5Msgjh/DQKEFl0DtyRr/VCOyD1T2R1MNeWPK/u7JoGhlDZnKBAfA==" "integrity": "sha512-jg+97EGIcY9AGHJJRaaPVgetKDsrTgbRjQ5Msgjh/DQKEFl0DtyRr/VCOyD1T2R1MNeWPK/u7JoGhlDZnKBAfA=="
}, },
"node_modules/@typescript-eslint/eslint-plugin": { "node_modules/@typescript-eslint/eslint-plugin": {
"version": "7.7.0", "version": "7.7.1",
"resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-7.7.0.tgz", "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-7.7.1.tgz",
"integrity": "sha512-GJWR0YnfrKnsRoluVO3PRb9r5aMZriiMMM/RHj5nnTrBy1/wIgk76XCtCKcnXGjpZQJQRFtGV9/0JJ6n30uwpQ==", "integrity": "sha512-KwfdWXJBOviaBVhxO3p5TJiLpNuh2iyXyjmWN0f1nU87pwyvfS0EmjC6ukQVYVFJd/K1+0NWGPDXiyEyQorn0Q==",
"dev": true, "dev": true,
"dependencies": { "dependencies": {
"@eslint-community/regexpp": "^4.10.0", "@eslint-community/regexpp": "^4.10.0",
"@typescript-eslint/scope-manager": "7.7.0", "@typescript-eslint/scope-manager": "7.7.1",
"@typescript-eslint/type-utils": "7.7.0", "@typescript-eslint/type-utils": "7.7.1",
"@typescript-eslint/utils": "7.7.0", "@typescript-eslint/utils": "7.7.1",
"@typescript-eslint/visitor-keys": "7.7.0", "@typescript-eslint/visitor-keys": "7.7.1",
"debug": "^4.3.4", "debug": "^4.3.4",
"graphemer": "^1.4.0", "graphemer": "^1.4.0",
"ignore": "^5.3.1", "ignore": "^5.3.1",
@ -995,15 +995,15 @@
} }
}, },
"node_modules/@typescript-eslint/parser": { "node_modules/@typescript-eslint/parser": {
"version": "7.7.0", "version": "7.7.1",
"resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-7.7.0.tgz", "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-7.7.1.tgz",
"integrity": "sha512-fNcDm3wSwVM8QYL4HKVBggdIPAy9Q41vcvC/GtDobw3c4ndVT3K6cqudUmjHPw8EAp4ufax0o58/xvWaP2FmTg==", "integrity": "sha512-vmPzBOOtz48F6JAGVS/kZYk4EkXao6iGrD838sp1w3NQQC0W8ry/q641KU4PrG7AKNAf56NOcR8GOpH8l9FPCw==",
"dev": true, "dev": true,
"dependencies": { "dependencies": {
"@typescript-eslint/scope-manager": "7.7.0", "@typescript-eslint/scope-manager": "7.7.1",
"@typescript-eslint/types": "7.7.0", "@typescript-eslint/types": "7.7.1",
"@typescript-eslint/typescript-estree": "7.7.0", "@typescript-eslint/typescript-estree": "7.7.1",
"@typescript-eslint/visitor-keys": "7.7.0", "@typescript-eslint/visitor-keys": "7.7.1",
"debug": "^4.3.4" "debug": "^4.3.4"
}, },
"engines": { "engines": {
@ -1023,13 +1023,13 @@
} }
}, },
"node_modules/@typescript-eslint/scope-manager": { "node_modules/@typescript-eslint/scope-manager": {
"version": "7.7.0", "version": "7.7.1",
"resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-7.7.0.tgz", "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-7.7.1.tgz",
"integrity": "sha512-/8INDn0YLInbe9Wt7dK4cXLDYp0fNHP5xKLHvZl3mOT5X17rK/YShXaiNmorl+/U4VKCVIjJnx4Ri5b0y+HClw==", "integrity": "sha512-PytBif2SF+9SpEUKynYn5g1RHFddJUcyynGpztX3l/ik7KmZEv19WCMhUBkHXPU9es/VWGD3/zg3wg90+Dh2rA==",
"dev": true, "dev": true,
"dependencies": { "dependencies": {
"@typescript-eslint/types": "7.7.0", "@typescript-eslint/types": "7.7.1",
"@typescript-eslint/visitor-keys": "7.7.0" "@typescript-eslint/visitor-keys": "7.7.1"
}, },
"engines": { "engines": {
"node": "^18.18.0 || >=20.0.0" "node": "^18.18.0 || >=20.0.0"
@ -1040,13 +1040,13 @@
} }
}, },
"node_modules/@typescript-eslint/type-utils": { "node_modules/@typescript-eslint/type-utils": {
"version": "7.7.0", "version": "7.7.1",
"resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-7.7.0.tgz", "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-7.7.1.tgz",
"integrity": "sha512-bOp3ejoRYrhAlnT/bozNQi3nio9tIgv3U5C0mVDdZC7cpcQEDZXvq8inrHYghLVwuNABRqrMW5tzAv88Vy77Sg==", "integrity": "sha512-ZksJLW3WF7o75zaBPScdW1Gbkwhd/lyeXGf1kQCxJaOeITscoSl0MjynVvCzuV5boUz/3fOI06Lz8La55mu29Q==",
"dev": true, "dev": true,
"dependencies": { "dependencies": {
"@typescript-eslint/typescript-estree": "7.7.0", "@typescript-eslint/typescript-estree": "7.7.1",
"@typescript-eslint/utils": "7.7.0", "@typescript-eslint/utils": "7.7.1",
"debug": "^4.3.4", "debug": "^4.3.4",
"ts-api-utils": "^1.3.0" "ts-api-utils": "^1.3.0"
}, },
@ -1067,9 +1067,9 @@
} }
}, },
"node_modules/@typescript-eslint/types": { "node_modules/@typescript-eslint/types": {
"version": "7.7.0", "version": "7.7.1",
"resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-7.7.0.tgz", "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-7.7.1.tgz",
"integrity": "sha512-G01YPZ1Bd2hn+KPpIbrAhEWOn5lQBrjxkzHkWvP6NucMXFtfXoevK82hzQdpfuQYuhkvFDeQYbzXCjR1z9Z03w==", "integrity": "sha512-AmPmnGW1ZLTpWa+/2omPrPfR7BcbUU4oha5VIbSbS1a1Tv966bklvLNXxp3mrbc+P2j4MNOTfDffNsk4o0c6/w==",
"dev": true, "dev": true,
"engines": { "engines": {
"node": "^18.18.0 || >=20.0.0" "node": "^18.18.0 || >=20.0.0"
@ -1080,13 +1080,13 @@
} }
}, },
"node_modules/@typescript-eslint/typescript-estree": { "node_modules/@typescript-eslint/typescript-estree": {
"version": "7.7.0", "version": "7.7.1",
"resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-7.7.0.tgz", "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-7.7.1.tgz",
"integrity": "sha512-8p71HQPE6CbxIBy2kWHqM1KGrC07pk6RJn40n0DSc6bMOBBREZxSDJ+BmRzc8B5OdaMh1ty3mkuWRg4sCFiDQQ==", "integrity": "sha512-CXe0JHCXru8Fa36dteXqmH2YxngKJjkQLjxzoj6LYwzZ7qZvgsLSc+eqItCrqIop8Vl2UKoAi0StVWu97FQZIQ==",
"dev": true, "dev": true,
"dependencies": { "dependencies": {
"@typescript-eslint/types": "7.7.0", "@typescript-eslint/types": "7.7.1",
"@typescript-eslint/visitor-keys": "7.7.0", "@typescript-eslint/visitor-keys": "7.7.1",
"debug": "^4.3.4", "debug": "^4.3.4",
"globby": "^11.1.0", "globby": "^11.1.0",
"is-glob": "^4.0.3", "is-glob": "^4.0.3",
@ -1132,17 +1132,17 @@
} }
}, },
"node_modules/@typescript-eslint/utils": { "node_modules/@typescript-eslint/utils": {
"version": "7.7.0", "version": "7.7.1",
"resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-7.7.0.tgz", "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-7.7.1.tgz",
"integrity": "sha512-LKGAXMPQs8U/zMRFXDZOzmMKgFv3COlxUQ+2NMPhbqgVm6R1w+nU1i4836Pmxu9jZAuIeyySNrN/6Rc657ggig==", "integrity": "sha512-QUvBxPEaBXf41ZBbaidKICgVL8Hin0p6prQDu6bbetWo39BKbWJxRsErOzMNT1rXvTll+J7ChrbmMCXM9rsvOQ==",
"dev": true, "dev": true,
"dependencies": { "dependencies": {
"@eslint-community/eslint-utils": "^4.4.0", "@eslint-community/eslint-utils": "^4.4.0",
"@types/json-schema": "^7.0.15", "@types/json-schema": "^7.0.15",
"@types/semver": "^7.5.8", "@types/semver": "^7.5.8",
"@typescript-eslint/scope-manager": "7.7.0", "@typescript-eslint/scope-manager": "7.7.1",
"@typescript-eslint/types": "7.7.0", "@typescript-eslint/types": "7.7.1",
"@typescript-eslint/typescript-estree": "7.7.0", "@typescript-eslint/typescript-estree": "7.7.1",
"semver": "^7.6.0" "semver": "^7.6.0"
}, },
"engines": { "engines": {
@ -1157,12 +1157,12 @@
} }
}, },
"node_modules/@typescript-eslint/visitor-keys": { "node_modules/@typescript-eslint/visitor-keys": {
"version": "7.7.0", "version": "7.7.1",
"resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-7.7.0.tgz", "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-7.7.1.tgz",
"integrity": "sha512-h0WHOj8MhdhY8YWkzIF30R379y0NqyOHExI9N9KCzvmu05EgG4FumeYa3ccfKUSphyWkWQE1ybVrgz/Pbam6YA==", "integrity": "sha512-gBL3Eq25uADw1LQ9kVpf3hRM+DWzs0uZknHYK3hq4jcTPqVCClHGDnB6UUUV2SFeBeA4KWHWbbLqmbGcZ4FYbw==",
"dev": true, "dev": true,
"dependencies": { "dependencies": {
"@typescript-eslint/types": "7.7.0", "@typescript-eslint/types": "7.7.1",
"eslint-visitor-keys": "^3.4.3" "eslint-visitor-keys": "^3.4.3"
}, },
"engines": { "engines": {

View file

@ -1 +1 @@
export declare const VERSION = "13.4.0"; export declare const VERSION = "13.4.1";

View file

@ -10,12 +10,12 @@
"access": "public", "access": "public",
"provenance": true "provenance": true
}, },
"version": "22.0.1", "version": "22.1.0",
"main": "", "main": "",
"types": "types.d.ts", "types": "types.d.ts",
"author": "Gregor Martynus (https://twitter.com/gr2m)", "author": "Gregor Martynus (https://twitter.com/gr2m)",
"license": "MIT", "license": "MIT",
"octokit": { "octokit": {
"openapi-version": "16.1.0" "openapi-version": "16.2.0"
} }
} }

File diff suppressed because it is too large Load diff

View file

@ -1,13 +1,13 @@
{ {
"name": "@octokit/types", "name": "@octokit/types",
"version": "13.4.0", "version": "13.4.1",
"publishConfig": { "publishConfig": {
"access": "public", "access": "public",
"provenance": true "provenance": true
}, },
"description": "Shared TypeScript definitions for Octokit projects", "description": "Shared TypeScript definitions for Octokit projects",
"dependencies": { "dependencies": {
"@octokit/openapi-types": "^22.0.1" "@octokit/openapi-types": "^22.1.0"
}, },
"repository": "github:octokit/types.ts", "repository": "github:octokit/types.ts",
"keywords": [ "keywords": [
@ -37,7 +37,7 @@
"typescript": "^5.0.0" "typescript": "^5.0.0"
}, },
"octokit": { "octokit": {
"openapi-version": "16.1.0" "openapi-version": "16.2.0"
}, },
"files": [ "files": [
"dist-types/**" "dist-types/**"

View file

@ -25,6 +25,7 @@ var __importStar = (this && this.__importStar) || function (mod) {
Object.defineProperty(exports, "__esModule", { value: true }); Object.defineProperty(exports, "__esModule", { value: true });
const ts = __importStar(require("typescript")); const ts = __importStar(require("typescript"));
const util_1 = require("../util"); const util_1 = require("../util");
const getForStatementHeadLoc_1 = require("../util/getForStatementHeadLoc");
exports.default = (0, util_1.createRule)({ exports.default = (0, util_1.createRule)({
name: 'no-for-in-array', name: 'no-for-in-array',
meta: { meta: {
@ -49,7 +50,7 @@ exports.default = (0, util_1.createRule)({
if ((0, util_1.isTypeArrayTypeOrUnionOfArrayTypes)(type, checker) || if ((0, util_1.isTypeArrayTypeOrUnionOfArrayTypes)(type, checker) ||
(type.flags & ts.TypeFlags.StringLike) !== 0) { (type.flags & ts.TypeFlags.StringLike) !== 0) {
context.report({ context.report({
node, loc: (0, getForStatementHeadLoc_1.getForStatementHeadLoc)(context.sourceCode, node),
messageId: 'forInViolation', messageId: 'forInViolation',
}); });
} }

View file

@ -1 +1 @@
{"version":3,"file":"no-for-in-array.js","sourceRoot":"","sources":["../../src/rules/no-for-in-array.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAAA,+CAAiC;AAEjC,kCAKiB;AAEjB,kBAAe,IAAA,iBAAU,EAAC;IACxB,IAAI,EAAE,iBAAiB;IACvB,IAAI,EAAE;QACJ,IAAI,EAAE;YACJ,WAAW,EAAE,qDAAqD;YAClE,WAAW,EAAE,aAAa;YAC1B,oBAAoB,EAAE,IAAI;SAC3B;QACD,QAAQ,EAAE;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GAAG,IAAA,wBAAiB,EAAC,OAAO,CAAC,CAAC;gBAC5C,MAAM,OAAO,GAAG,QAAQ,CAAC,OAAO,CAAC,cAAc,EAAE,CAAC;gBAElD,MAAM,IAAI,GAAG,IAAA,mCAA4B,EAAC,QAAQ,EAAE,IAAI,CAAC,KAAK,CAAC,CAAC;gBAEhE,IACE,IAAA,yCAAkC,EAAC,IAAI,EAAE,OAAO,CAAC;oBACjD,CAAC,IAAI,CAAC,KAAK,GAAG,EAAE,CAAC,SAAS,CAAC,UAAU,CAAC,KAAK,CAAC,EAC5C,CAAC;oBACD,OAAO,CAAC,MAAM,CAAC;wBACb,GAAG,EAAE,IAAA,+CAAsB,EAAC,OAAO,CAAC,UAAU,EAAE,IAAI,CAAC;wBACrD,SAAS,EAAE,gBAAgB;qBAC5B,CAAC,CAAC;gBACL,CAAC;YACH,CAAC;SACF,CAAC;IACJ,CAAC;CACF,CAAC,CAAC"}

View file

@ -159,7 +159,7 @@ exports.default = (0, util_1.createRule)({
} }
const originalNode = services.esTreeNodeToTSNodeMap.get(node); const originalNode = services.esTreeNodeToTSNodeMap.get(node);
const type = (0, util_1.getConstrainedTypeAtLocation)(services, node.expression); const type = (0, util_1.getConstrainedTypeAtLocation)(services, node.expression);
if (!(0, util_1.isNullableType)(type)) { if (!(0, util_1.isNullableType)(type) && !(0, util_1.isTypeFlagSet)(type, ts.TypeFlags.Void)) {
if (node.expression.type === utils_1.AST_NODE_TYPES.Identifier && if (node.expression.type === utils_1.AST_NODE_TYPES.Identifier &&
isPossiblyUsedBeforeAssigned(node.expression)) { isPossiblyUsedBeforeAssigned(node.expression)) {
return; return;
@ -181,8 +181,10 @@ exports.default = (0, util_1.createRule)({
// the two types share a nullable type // the two types share a nullable type
const typeIncludesUndefined = (0, util_1.isTypeFlagSet)(type, ts.TypeFlags.Undefined); const typeIncludesUndefined = (0, util_1.isTypeFlagSet)(type, ts.TypeFlags.Undefined);
const typeIncludesNull = (0, util_1.isTypeFlagSet)(type, ts.TypeFlags.Null); const typeIncludesNull = (0, util_1.isTypeFlagSet)(type, ts.TypeFlags.Null);
const typeIncludesVoid = (0, util_1.isTypeFlagSet)(type, ts.TypeFlags.Void);
const contextualTypeIncludesUndefined = (0, util_1.isTypeFlagSet)(contextualType, ts.TypeFlags.Undefined); const contextualTypeIncludesUndefined = (0, util_1.isTypeFlagSet)(contextualType, ts.TypeFlags.Undefined);
const contextualTypeIncludesNull = (0, util_1.isTypeFlagSet)(contextualType, ts.TypeFlags.Null); const contextualTypeIncludesNull = (0, util_1.isTypeFlagSet)(contextualType, ts.TypeFlags.Null);
const contextualTypeIncludesVoid = (0, util_1.isTypeFlagSet)(contextualType, ts.TypeFlags.Void);
// make sure that the parent accepts the same types // make sure that the parent accepts the same types
// i.e. assigning `string | null | undefined` to `string | undefined` is invalid // i.e. assigning `string | null | undefined` to `string | undefined` is invalid
const isValidUndefined = typeIncludesUndefined const isValidUndefined = typeIncludesUndefined
@ -191,7 +193,10 @@ exports.default = (0, util_1.createRule)({
const isValidNull = typeIncludesNull const isValidNull = typeIncludesNull
? contextualTypeIncludesNull ? contextualTypeIncludesNull
: true; : true;
if (isValidUndefined && isValidNull) { const isValidVoid = typeIncludesVoid
? contextualTypeIncludesVoid
: true;
if (isValidUndefined && isValidNull && isValidVoid) {
context.report({ context.report({
node, node,
messageId: 'contextuallyUnnecessary', messageId: 'contextuallyUnnecessary',

File diff suppressed because one or more lines are too long

View file

@ -28,6 +28,7 @@ const utils_1 = require("@typescript-eslint/utils");
const ts_api_utils_1 = require("ts-api-utils"); const ts_api_utils_1 = require("ts-api-utils");
const ts = __importStar(require("typescript")); const ts = __importStar(require("typescript"));
const util_1 = require("../../util"); const util_1 = require("../../util");
const checkNullishAndReport_1 = require("./checkNullishAndReport");
const compareNodes_1 = require("./compareNodes"); const compareNodes_1 = require("./compareNodes");
function includesType(parserServices, node, typeFlagIn) { function includesType(parserServices, node, typeFlagIn) {
const typeFlag = typeFlagIn | ts.TypeFlags.Any | ts.TypeFlags.Unknown; const typeFlag = typeFlagIn | ts.TypeFlags.Any | ts.TypeFlags.Unknown;
@ -348,7 +349,7 @@ function analyzeChain(context, parserServices, options, operator, chain) {
const maybeReportThenReset = (newChainSeed) => { const maybeReportThenReset = (newChainSeed) => {
if (subChain.length > 1) { if (subChain.length > 1) {
const subChainFlat = subChain.flat(); const subChainFlat = subChain.flat();
context.report({ (0, checkNullishAndReport_1.checkNullishAndReport)(context, parserServices, options, subChainFlat.slice(0, -1).map(({ node }) => node), {
messageId: 'preferOptionalChain', messageId: 'preferOptionalChain',
loc: { loc: {
start: subChainFlat[0].node.loc.start, start: subChainFlat[0].node.loc.start,

File diff suppressed because one or more lines are too long

View file

@ -0,0 +1,37 @@
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = 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];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
__setModuleDefault(result, mod);
return result;
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.checkNullishAndReport = void 0;
const type_utils_1 = require("@typescript-eslint/type-utils");
const ts_api_utils_1 = require("ts-api-utils");
const ts = __importStar(require("typescript"));
function checkNullishAndReport(context, parserServices, { requireNullish }, maybeNullishNodes, descriptor) {
if (!requireNullish ||
maybeNullishNodes.some(node => (0, ts_api_utils_1.unionTypeParts)(parserServices.getTypeAtLocation(node)).some(t => (0, type_utils_1.isTypeFlagSet)(t, ts.TypeFlags.Null | ts.TypeFlags.Undefined)))) {
context.report(descriptor);
}
}
exports.checkNullishAndReport = checkNullishAndReport;
//# sourceMappingURL=checkNullishAndReport.js.map

View file

@ -0,0 +1 @@
{"version":3,"file":"checkNullishAndReport.js","sourceRoot":"","sources":["../../../src/rules/prefer-optional-chain-utils/checkNullishAndReport.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,8DAA8D;AAS9D,+CAA8C;AAC9C,+CAAiC;AAOjC,SAAgB,qBAAqB,CACnC,OAGC,EACD,cAAiD,EACjD,EAAE,cAAc,EAA8B,EAC9C,iBAAwC,EACxC,UAA2D;IAE3D,IACE,CAAC,cAAc;QACf,iBAAiB,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAC5B,IAAA,6BAAc,EAAC,cAAc,CAAC,iBAAiB,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAC9D,IAAA,0BAAa,EAAC,CAAC,EAAE,EAAE,CAAC,SAAS,CAAC,IAAI,GAAG,EAAE,CAAC,SAAS,CAAC,SAAS,CAAC,CAC7D,CACF,EACD,CAAC;QACD,OAAO,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC;IAC7B,CAAC;AACH,CAAC;AApBD,sDAoBC"}

View file

@ -51,9 +51,6 @@ function isValidFalseBooleanCheckType(node, disallowFalseyLiteral, parserService
return false; return false;
} }
} }
if (options.requireNullish === true) {
return types.some(t => (0, util_1.isTypeFlagSet)(t, NULLISH_FLAGS));
}
let allowedFlags = NULLISH_FLAGS | ts.TypeFlags.Object; let allowedFlags = NULLISH_FLAGS | ts.TypeFlags.Object;
if (options.checkAny === true) { if (options.checkAny === true) {
allowedFlags |= ts.TypeFlags.Any; allowedFlags |= ts.TypeFlags.Any;

File diff suppressed because one or more lines are too long

View file

@ -27,6 +27,7 @@ const utils_1 = require("@typescript-eslint/utils");
const ts = __importStar(require("typescript")); const ts = __importStar(require("typescript"));
const util_1 = require("../util"); const util_1 = require("../util");
const analyzeChain_1 = require("./prefer-optional-chain-utils/analyzeChain"); const analyzeChain_1 = require("./prefer-optional-chain-utils/analyzeChain");
const checkNullishAndReport_1 = require("./prefer-optional-chain-utils/checkNullishAndReport");
const gatherLogicalOperands_1 = require("./prefer-optional-chain-utils/gatherLogicalOperands"); const gatherLogicalOperands_1 = require("./prefer-optional-chain-utils/gatherLogicalOperands");
exports.default = (0, util_1.createRule)({ exports.default = (0, util_1.createRule)({
name: 'prefer-optional-chain', name: 'prefer-optional-chain',
@ -122,9 +123,9 @@ exports.default = (0, util_1.createRule)({
const leftPrecedence = (0, util_1.getOperatorPrecedence)(leftTsNode.kind, operator); const leftPrecedence = (0, util_1.getOperatorPrecedence)(leftTsNode.kind, operator);
return leftPrecedence < util_1.OperatorPrecedence.LeftHandSide; return leftPrecedence < util_1.OperatorPrecedence.LeftHandSide;
} }
context.report({ (0, checkNullishAndReport_1.checkNullishAndReport)(context, parserServices, options, [leftNode], {
node: parentNode,
messageId: 'preferOptionalChain', messageId: 'preferOptionalChain',
node: parentNode,
suggest: [ suggest: [
{ {
messageId: 'optionalChainSuggest', messageId: 'optionalChainSuggest',

View file

@ -1 +1 @@
{"version":3,"file":"prefer-optional-chain.js","sourceRoot":"","sources":["../../src/rules/prefer-optional-chain.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AACA,oDAA0D;AAE1D,+CAAiC;AAEjC,kCAKiB;AACjB,6EAA0E;AAE1E,+FAG6D;AAM7D,kBAAe,IAAA,iBAAU,EAGvB;IACA,IAAI,EAAE,uBAAuB;IAC7B,IAAI,EAAE;QACJ,IAAI,EAAE,YAAY;QAClB,IAAI,EAAE;YACJ,WAAW,EACT,yHAAyH;YAC3H,WAAW,EAAE,WAAW;YACxB,oBAAoB,EAAE,IAAI;SAC3B;QACD,OAAO,EAAE,MAAM;QACf,cAAc,EAAE,IAAI;QACpB,QAA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AAC;oBAC7B,CAAC;gBACH,CAAC;gBAED,qCAAqC;gBACrC,IAAI,YAAY,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;oBAC5B,IAAA,2BAAY,EACV,OAAO,EACP,cAAc,EACd,OAAO,EACP,IAAI,CAAC,QAAQ,EACb,YAAY,CACb,CAAC;gBACJ,CAAC;YACH,CAAC;SACF,CAAC;IACJ,CAAC;CACF,CAAC,CAAC"} {"version":3,"file":"prefer-optional-chain.js","sourceRoot":"","sources":["../../src/rules/prefer-optional-chain.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AACA,oDAA0D;AAE1D,+CAAiC;AAEjC,kCAKiB;AACjB,6EAA0E;AAC1E,+FAA4F;AAE5F,+FAG6D;AAM7D,kBAAe,IAAA,iBAAU,EAGvB;IACA,IAAI,EAAE,uBAAuB;IAC7B,IAAI,EAAE;QACJ,IAAI,EAAE,YAAY;QAClB,IAAI,EAAE;YACJ,WAAW,EACT,yHAAyH;YAC3H,WAAW,EAAE,WAAW;YACxB,oBAAoB,EAAE,IAAI;SAC3B;QACD,OAAO,EAAE,MAAM;QACf,cAAc,EAAE,IAAI;QACpB,QAAQ,EAAE;YACR,mBAAmB,EACjB,6FAA6F;YAC/F,oBAAoB,EAAE,8BAA8B;SACrD;QACD,MAAM,EAAE;YACN;gBACE,IAAI,EAAE,QAAQ;gBACd,oBAAoB,EAAE,KAAK;gBAC3B,UAAU,EAAE;oBACV,QAAQ,EAAE;wBACR,IAAI,EAAE,SAAS;wBACf,WAAW,EACT,kFAAkF;qBACrF;oBACD,YAAY,EAAE;wBACZ,IAAI,EAAE,SAAS;wBACf,WAAW,EACT,sFAAsF;qBACzF;oBACD,WAAW,EAAE;wBACX,IAAI,EAAE,SAAS;wBACf,WAAW,EACT,qFAAqF;qBACxF;oBACD,WAAW,EAAE;wBACX,IAAI,EAAE,SAAS;wBACf,WAAW,EACT,qFAAqF;qBACxF;oBACD,YAAY,EAAE;wBACZ,IAAI,EAAE,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AoB,EAAE,CACnD,CAAC;4BACJ,CAAC;yBACF;qBACF;iBACF,CAAC,CAAC;YACL,CAAC;YAED,mCAAmC,CACjC,IAAgC;gBAEhC,IAAI,YAAY,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC;oBAC3B,OAAO;gBACT,CAAC;gBAED,MAAM,EAAE,QAAQ,EAAE,iBAAiB,EAAE,GAAG,IAAA,6CAAqB,EAC3D,IAAI,EACJ,cAAc,EACd,OAAO,CAAC,UAAU,EAClB,OAAO,CACR,CAAC;gBAEF,KAAK,MAAM,OAAO,IAAI,iBAAiB,EAAE,CAAC;oBACxC,YAAY,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;gBAC5B,CAAC;gBAED,IAAI,YAAY,GAAmB,EAAE,CAAC;gBACtC,KAAK,MAAM,OAAO,IAAI,QAAQ,EAAE,CAAC;oBAC/B,IAAI,OAAO,CAAC,IAAI,4CAA4B,EAAE,CAAC;wBAC7C,IAAA,2BAAY,EACV,OAAO,EACP,cAAc,EACd,OAAO,EACP,IAAI,CAAC,QAAQ,EACb,YAAY,CACb,CAAC;wBACF,YAAY,GAAG,EAAE,CAAC;oBACpB,CAAC;yBAAM,CAAC;wBACN,YAAY,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;oBAC7B,CAAC;gBACH,CAAC;gBAED,qCAAqC;gBACrC,IAAI,YAAY,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;oBAC5B,IAAA,2BAAY,EACV,OAAO,EACP,cAAc,EACd,OAAO,EACP,IAAI,CAAC,QAAQ,EACb,YAAY,CACb,CAAC;gBACJ,CAAC;YACH,CAAC;SACF,CAAC;IACJ,CAAC;CACF,CAAC,CAAC"}

View file

@ -218,15 +218,11 @@ function ancestorHasReturnType(node) {
// const x: Foo = () => {}; // const x: Foo = () => {};
// Assume that a typed variable types the function expression // Assume that a typed variable types the function expression
case utils_1.AST_NODE_TYPES.VariableDeclarator: case utils_1.AST_NODE_TYPES.VariableDeclarator:
if (ancestor.id.typeAnnotation) { return !!ancestor.id.typeAnnotation;
return true;
}
break;
case utils_1.AST_NODE_TYPES.PropertyDefinition: case utils_1.AST_NODE_TYPES.PropertyDefinition:
if (ancestor.typeAnnotation) { return !!ancestor.typeAnnotation;
return true; case utils_1.AST_NODE_TYPES.ExpressionStatement:
} return false;
break;
} }
ancestor = ancestor.parent; ancestor = ancestor.parent;
} }

File diff suppressed because one or more lines are too long

View file

@ -0,0 +1,28 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.getForStatementHeadLoc = void 0;
const eslint_utils_1 = require("@typescript-eslint/utils/eslint-utils");
/**
* Gets the location of the head of the given for statement variant for reporting.
*
* - `for (const foo in bar) expressionOrBlock`
* ^^^^^^^^^^^^^^^^^^^^^^
*
* - `for (const foo of bar) expressionOrBlock`
* ^^^^^^^^^^^^^^^^^^^^^^
*
* - `for await (const foo of bar) expressionOrBlock`
* ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
*
* - `for (let i = 0; i < 10; i++) expressionOrBlock`
* ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
*/
function getForStatementHeadLoc(sourceCode, node) {
const closingParens = (0, eslint_utils_1.nullThrows)(sourceCode.getTokenBefore(node.body, token => token.value === ')'), 'for statement must have a closing parenthesis.');
return {
start: structuredClone(node.loc.start),
end: structuredClone(closingParens.loc.end),
};
}
exports.getForStatementHeadLoc = getForStatementHeadLoc;
//# sourceMappingURL=getForStatementHeadLoc.js.map

View file

@ -0,0 +1 @@
{"version":3,"file":"getForStatementHeadLoc.js","sourceRoot":"","sources":["../../src/util/getForStatementHeadLoc.ts"],"names":[],"mappings":";;;AACA,wEAAmE;AAEnE;;;;;;;;;;;;;;GAcG;AACH,SAAgB,sBAAsB,CACpC,UAA+B,EAC/B,IAGyB;IAEzB,MAAM,aAAa,GAAG,IAAA,yBAAU,EAC9B,UAAU,CAAC,cAAc,CAAC,IAAI,CAAC,IAAI,EAAE,KAAK,CAAC,EAAE,CAAC,KAAK,CAAC,KAAK,KAAK,GAAG,CAAC,EAClE,gDAAgD,CACjD,CAAC;IACF,OAAO;QACL,KAAK,EAAE,eAAe,CAAC,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC;QACtC,GAAG,EAAE,eAAe,CAAC,aAAa,CAAC,GAAG,CAAC,GAAG,CAAC;KAC5C,CAAC;AACJ,CAAC;AAfD,wDAeC"}

View file

@ -265,7 +265,7 @@ When this option is `true` the rule will skip operands that are not typed with `
<TabItem value="❌ Incorrect for `requireNullish: true`"> <TabItem value="❌ Incorrect for `requireNullish: true`">
```ts option='{ "requireNullish": true }' skipValidation ```ts option='{ "requireNullish": true }'
declare const thing1: string | null; declare const thing1: string | null;
thing1 && thing1.toString(); thing1 && thing1.toString();
``` ```

View file

@ -1,6 +1,6 @@
{ {
"name": "@typescript-eslint/eslint-plugin", "name": "@typescript-eslint/eslint-plugin",
"version": "7.7.0", "version": "7.7.1",
"description": "TypeScript plugin for ESLint", "description": "TypeScript plugin for ESLint",
"files": [ "files": [
"dist", "dist",
@ -62,10 +62,10 @@
}, },
"dependencies": { "dependencies": {
"@eslint-community/regexpp": "^4.10.0", "@eslint-community/regexpp": "^4.10.0",
"@typescript-eslint/scope-manager": "7.7.0", "@typescript-eslint/scope-manager": "7.7.1",
"@typescript-eslint/type-utils": "7.7.0", "@typescript-eslint/type-utils": "7.7.1",
"@typescript-eslint/utils": "7.7.0", "@typescript-eslint/utils": "7.7.1",
"@typescript-eslint/visitor-keys": "7.7.0", "@typescript-eslint/visitor-keys": "7.7.1",
"debug": "^4.3.4", "debug": "^4.3.4",
"graphemer": "^1.4.0", "graphemer": "^1.4.0",
"ignore": "^5.3.1", "ignore": "^5.3.1",
@ -78,8 +78,8 @@
"@types/marked": "*", "@types/marked": "*",
"@types/mdast": "^4.0.3", "@types/mdast": "^4.0.3",
"@types/natural-compare": "*", "@types/natural-compare": "*",
"@typescript-eslint/rule-schema-to-typescript-types": "7.7.0", "@typescript-eslint/rule-schema-to-typescript-types": "7.7.1",
"@typescript-eslint/rule-tester": "7.7.0", "@typescript-eslint/rule-tester": "7.7.1",
"ajv": "^6.12.6", "ajv": "^6.12.6",
"chalk": "^5.3.0", "chalk": "^5.3.0",
"cross-env": "^7.0.3", "cross-env": "^7.0.3",

View file

@ -1,6 +1,6 @@
{ {
"name": "@typescript-eslint/parser", "name": "@typescript-eslint/parser",
"version": "7.7.0", "version": "7.7.1",
"description": "An ESLint custom parser which leverages TypeScript ESTree", "description": "An ESLint custom parser which leverages TypeScript ESTree",
"files": [ "files": [
"dist", "dist",
@ -52,10 +52,10 @@
"eslint": "^8.56.0" "eslint": "^8.56.0"
}, },
"dependencies": { "dependencies": {
"@typescript-eslint/scope-manager": "7.7.0", "@typescript-eslint/scope-manager": "7.7.1",
"@typescript-eslint/types": "7.7.0", "@typescript-eslint/types": "7.7.1",
"@typescript-eslint/typescript-estree": "7.7.0", "@typescript-eslint/typescript-estree": "7.7.1",
"@typescript-eslint/visitor-keys": "7.7.0", "@typescript-eslint/visitor-keys": "7.7.1",
"debug": "^4.3.4" "debug": "^4.3.4"
}, },
"devDependencies": { "devDependencies": {

View file

@ -1,6 +1,6 @@
{ {
"name": "@typescript-eslint/scope-manager", "name": "@typescript-eslint/scope-manager",
"version": "7.7.0", "version": "7.7.1",
"description": "TypeScript scope analyser for ESLint", "description": "TypeScript scope analyser for ESLint",
"files": [ "files": [
"dist", "dist",
@ -46,12 +46,12 @@
"typecheck": "npx nx typecheck" "typecheck": "npx nx typecheck"
}, },
"dependencies": { "dependencies": {
"@typescript-eslint/types": "7.7.0", "@typescript-eslint/types": "7.7.1",
"@typescript-eslint/visitor-keys": "7.7.0" "@typescript-eslint/visitor-keys": "7.7.1"
}, },
"devDependencies": { "devDependencies": {
"@types/glob": "*", "@types/glob": "*",
"@typescript-eslint/typescript-estree": "7.7.0", "@typescript-eslint/typescript-estree": "7.7.1",
"glob": "*", "glob": "*",
"jest-specific-snapshot": "*", "jest-specific-snapshot": "*",
"make-dir": "*", "make-dir": "*",

View file

@ -1 +1 @@
{"version":3,"file":"getContextualType.d.ts","sourceRoot":"","sources":["../src/getContextualType.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,YAAY,CAAC;AAEjC;;;;GAIG;AACH,wBAAgB,iBAAiB,CAC/B,OAAO,EAAE,EAAE,CAAC,WAAW,EACvB,IAAI,EAAE,EAAE,CAAC,UAAU,GAClB,EAAE,CAAC,IAAI,GAAG,SAAS,CAoCrB"} {"version":3,"file":"getContextualType.d.ts","sourceRoot":"","sources":["../src/getContextualType.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,YAAY,CAAC;AAEjC;;;;GAIG;AACH,wBAAgB,iBAAiB,CAC/B,OAAO,EAAE,EAAE,CAAC,WAAW,EACvB,IAAI,EAAE,EAAE,CAAC,UAAU,GAClB,EAAE,CAAC,IAAI,GAAG,SAAS,CAwCrB"}

View file

@ -46,7 +46,9 @@ function getContextualType(checker, node) {
else if (ts.isJsxExpression(parent)) { else if (ts.isJsxExpression(parent)) {
return checker.getContextualType(parent); return checker.getContextualType(parent);
} }
else if (ts.isPropertyAssignment(parent) && ts.isIdentifier(node)) { else if (ts.isIdentifier(node) &&
(ts.isPropertyAssignment(parent) ||
ts.isShorthandPropertyAssignment(parent))) {
return checker.getContextualType(node); return checker.getContextualType(node);
} }
else if (ts.isBinaryExpression(parent) && else if (ts.isBinaryExpression(parent) &&

View file

@ -1 +1 @@
{"version":3,"file":"getContextualType.js","sourceRoot":"","sources":["../src/getContextualType.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,+CAAiC;AAEjC;;;;GAIG;AACH,SAAgB,iBAAiB,CAC/B,OAAuB,EACvB,IAAmB;IAEnB,MAAM,MAAM,GAAG,IAAI,CAAC,MAAM,CAAC;IAE3B,IAAI,EAAE,CAAC,gBAAgB,CAAC,MAAM,CAAC,IAAI,EAAE,CAAC,eAAe,CAAC,MAAM,CAAC,EAAE,CAAC;QAC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CAAC,KAAK,KAAK,IAAI,EACrB,CAAC;QACD,uBAAuB;QACvB,OAAO,OAAO,CAAC,iBAAiB,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;IAChD,CAAC;SAAM,IACL,CAAC,CAAC,EAAE,CAAC,UAAU,CAAC,YAAY,EAAE,EAAE,CAAC,UAAU,CAAC,aAAa,CAAC,CAAC,QAAQ,CACjE,MAAM,CAAC,IAAI,CACZ,EACD,CAAC;QACD,oEAAoE;QACpE,OAAO;IACT,CAAC;IACD,2CAA2C;IAE3C,OAAO,OAAO,CAAC,iBAAiB,CAAC,IAAI,CAAC,CAAC;AACzC,CAAC;AA3CD,8CA2CC"}

View file

@ -1,6 +1,6 @@
{ {
"name": "@typescript-eslint/type-utils", "name": "@typescript-eslint/type-utils",
"version": "7.7.0", "version": "7.7.1",
"description": "Type utilities for working with TypeScript + ESLint together", "description": "Type utilities for working with TypeScript + ESLint together",
"files": [ "files": [
"dist", "dist",
@ -46,13 +46,13 @@
"typecheck": "tsc -p tsconfig.json --noEmit" "typecheck": "tsc -p tsconfig.json --noEmit"
}, },
"dependencies": { "dependencies": {
"@typescript-eslint/typescript-estree": "7.7.0", "@typescript-eslint/typescript-estree": "7.7.1",
"@typescript-eslint/utils": "7.7.0", "@typescript-eslint/utils": "7.7.1",
"debug": "^4.3.4", "debug": "^4.3.4",
"ts-api-utils": "^1.3.0" "ts-api-utils": "^1.3.0"
}, },
"devDependencies": { "devDependencies": {
"@typescript-eslint/parser": "7.7.0", "@typescript-eslint/parser": "7.7.1",
"ajv": "^6.12.6", "ajv": "^6.12.6",
"downlevel-dts": "*", "downlevel-dts": "*",
"jest": "29.7.0", "jest": "29.7.0",

View file

@ -1,6 +1,6 @@
{ {
"name": "@typescript-eslint/types", "name": "@typescript-eslint/types",
"version": "7.7.0", "version": "7.7.1",
"description": "Types for the TypeScript-ESTree AST spec", "description": "Types for the TypeScript-ESTree AST spec",
"files": [ "files": [
"dist", "dist",

View file

@ -1,6 +1,6 @@
{ {
"name": "@typescript-eslint/typescript-estree", "name": "@typescript-eslint/typescript-estree",
"version": "7.7.0", "version": "7.7.1",
"description": "A parser that converts TypeScript source code into an ESTree compatible form", "description": "A parser that converts TypeScript source code into an ESTree compatible form",
"files": [ "files": [
"dist", "dist",
@ -54,8 +54,8 @@
"typecheck": "tsc -p tsconfig.json --noEmit" "typecheck": "tsc -p tsconfig.json --noEmit"
}, },
"dependencies": { "dependencies": {
"@typescript-eslint/types": "7.7.0", "@typescript-eslint/types": "7.7.1",
"@typescript-eslint/visitor-keys": "7.7.0", "@typescript-eslint/visitor-keys": "7.7.1",
"debug": "^4.3.4", "debug": "^4.3.4",
"globby": "^11.1.0", "globby": "^11.1.0",
"is-glob": "^4.0.3", "is-glob": "^4.0.3",

View file

@ -1,6 +1,6 @@
{ {
"name": "@typescript-eslint/utils", "name": "@typescript-eslint/utils",
"version": "7.7.0", "version": "7.7.1",
"description": "Utilities for working with TypeScript + ESLint together", "description": "Utilities for working with TypeScript + ESLint together",
"files": [ "files": [
"dist", "dist",
@ -70,16 +70,16 @@
"@eslint-community/eslint-utils": "^4.4.0", "@eslint-community/eslint-utils": "^4.4.0",
"@types/json-schema": "^7.0.15", "@types/json-schema": "^7.0.15",
"@types/semver": "^7.5.8", "@types/semver": "^7.5.8",
"@typescript-eslint/scope-manager": "7.7.0", "@typescript-eslint/scope-manager": "7.7.1",
"@typescript-eslint/types": "7.7.0", "@typescript-eslint/types": "7.7.1",
"@typescript-eslint/typescript-estree": "7.7.0", "@typescript-eslint/typescript-estree": "7.7.1",
"semver": "^7.6.0" "semver": "^7.6.0"
}, },
"peerDependencies": { "peerDependencies": {
"eslint": "^8.56.0" "eslint": "^8.56.0"
}, },
"devDependencies": { "devDependencies": {
"@typescript-eslint/parser": "7.7.0", "@typescript-eslint/parser": "7.7.1",
"downlevel-dts": "*", "downlevel-dts": "*",
"jest": "29.7.0", "jest": "29.7.0",
"prettier": "^3.2.5", "prettier": "^3.2.5",

View file

@ -1,6 +1,6 @@
{ {
"name": "@typescript-eslint/visitor-keys", "name": "@typescript-eslint/visitor-keys",
"version": "7.7.0", "version": "7.7.1",
"description": "Visitor keys used to help traverse the TypeScript-ESTree AST", "description": "Visitor keys used to help traverse the TypeScript-ESTree AST",
"files": [ "files": [
"dist", "dist",
@ -47,7 +47,7 @@
"typecheck": "tsc -p tsconfig.json --noEmit" "typecheck": "tsc -p tsconfig.json --noEmit"
}, },
"dependencies": { "dependencies": {
"@typescript-eslint/types": "7.7.0", "@typescript-eslint/types": "7.7.1",
"eslint-visitor-keys": "^3.4.3" "eslint-visitor-keys": "^3.4.3"
}, },
"devDependencies": { "devDependencies": {

108
package-lock.json generated
View file

@ -1,12 +1,12 @@
{ {
"name": "codeql", "name": "codeql",
"version": "3.25.1", "version": "3.25.3",
"lockfileVersion": 3, "lockfileVersion": 3,
"requires": true, "requires": true,
"packages": { "packages": {
"": { "": {
"name": "codeql", "name": "codeql",
"version": "3.25.1", "version": "3.25.3",
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"@actions/artifact": "^1.1.2", "@actions/artifact": "^1.1.2",
@ -18,7 +18,7 @@
"@actions/tool-cache": "^2.0.1", "@actions/tool-cache": "^2.0.1",
"@chrisgavin/safe-which": "^1.0.2", "@chrisgavin/safe-which": "^1.0.2",
"@octokit/plugin-retry": "^5.0.2", "@octokit/plugin-retry": "^5.0.2",
"@octokit/types": "^13.4.0", "@octokit/types": "^13.4.1",
"@schemastore/package": "0.0.10", "@schemastore/package": "0.0.10",
"@types/uuid": "^9.0.8", "@types/uuid": "^9.0.8",
"adm-zip": "^0.5.12", "adm-zip": "^0.5.12",
@ -45,8 +45,8 @@
"@types/node": "20.9.0", "@types/node": "20.9.0",
"@types/semver": "^7.5.8", "@types/semver": "^7.5.8",
"@types/sinon": "^17.0.3", "@types/sinon": "^17.0.3",
"@typescript-eslint/eslint-plugin": "^7.7.0", "@typescript-eslint/eslint-plugin": "^7.7.1",
"@typescript-eslint/parser": "^7.7.0", "@typescript-eslint/parser": "^7.7.1",
"ava": "^5.3.1", "ava": "^5.3.1",
"eslint": "^8.57.0", "eslint": "^8.57.0",
"eslint-import-resolver-typescript": "^3.6.1", "eslint-import-resolver-typescript": "^3.6.1",
@ -819,17 +819,17 @@
} }
}, },
"node_modules/@octokit/types": { "node_modules/@octokit/types": {
"version": "13.4.0", "version": "13.4.1",
"resolved": "https://registry.npmjs.org/@octokit/types/-/types-13.4.0.tgz", "resolved": "https://registry.npmjs.org/@octokit/types/-/types-13.4.1.tgz",
"integrity": "sha512-WlMegy3lPXYWASe3k9Jslc5a0anrYAYMWtsFrxBTdQjS70hvLH6C+PGvHbOsgy3RA3LouGJoU/vAt4KarecQLQ==", "integrity": "sha512-Y73oOAzRBAUzR/iRAbGULzpNkX8vaxKCqEtg6K74Ff3w9f5apFnWtE/2nade7dMWWW3bS5Kkd6DJS4HF04xreg==",
"dependencies": { "dependencies": {
"@octokit/openapi-types": "^22.0.1" "@octokit/openapi-types": "^22.1.0"
} }
}, },
"node_modules/@octokit/types/node_modules/@octokit/openapi-types": { "node_modules/@octokit/types/node_modules/@octokit/openapi-types": {
"version": "22.0.1", "version": "22.1.0",
"resolved": "https://registry.npmjs.org/@octokit/openapi-types/-/openapi-types-22.0.1.tgz", "resolved": "https://registry.npmjs.org/@octokit/openapi-types/-/openapi-types-22.1.0.tgz",
"integrity": "sha512-1yN5m1IMNXthoBDUXFF97N1gHop04B3H8ws7wtOr8GgRyDO1gKALjwMHARNBoMBiB/2vEe/vxstrApcJZzQbnQ==" "integrity": "sha512-pGUdSP+eEPfZiQHNkZI0U01HLipxncisdJQB4G//OAmfeO8sqTQ9KRa0KF03TUPCziNsoXUrTg4B2Q1EX++T0Q=="
}, },
"node_modules/@opentelemetry/api": { "node_modules/@opentelemetry/api": {
"version": "1.4.1", "version": "1.4.1",
@ -1017,16 +1017,16 @@
"integrity": "sha512-jg+97EGIcY9AGHJJRaaPVgetKDsrTgbRjQ5Msgjh/DQKEFl0DtyRr/VCOyD1T2R1MNeWPK/u7JoGhlDZnKBAfA==" "integrity": "sha512-jg+97EGIcY9AGHJJRaaPVgetKDsrTgbRjQ5Msgjh/DQKEFl0DtyRr/VCOyD1T2R1MNeWPK/u7JoGhlDZnKBAfA=="
}, },
"node_modules/@typescript-eslint/eslint-plugin": { "node_modules/@typescript-eslint/eslint-plugin": {
"version": "7.7.0", "version": "7.7.1",
"resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-7.7.0.tgz", "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-7.7.1.tgz",
"integrity": "sha512-GJWR0YnfrKnsRoluVO3PRb9r5aMZriiMMM/RHj5nnTrBy1/wIgk76XCtCKcnXGjpZQJQRFtGV9/0JJ6n30uwpQ==", "integrity": "sha512-KwfdWXJBOviaBVhxO3p5TJiLpNuh2iyXyjmWN0f1nU87pwyvfS0EmjC6ukQVYVFJd/K1+0NWGPDXiyEyQorn0Q==",
"dev": true, "dev": true,
"dependencies": { "dependencies": {
"@eslint-community/regexpp": "^4.10.0", "@eslint-community/regexpp": "^4.10.0",
"@typescript-eslint/scope-manager": "7.7.0", "@typescript-eslint/scope-manager": "7.7.1",
"@typescript-eslint/type-utils": "7.7.0", "@typescript-eslint/type-utils": "7.7.1",
"@typescript-eslint/utils": "7.7.0", "@typescript-eslint/utils": "7.7.1",
"@typescript-eslint/visitor-keys": "7.7.0", "@typescript-eslint/visitor-keys": "7.7.1",
"debug": "^4.3.4", "debug": "^4.3.4",
"graphemer": "^1.4.0", "graphemer": "^1.4.0",
"ignore": "^5.3.1", "ignore": "^5.3.1",
@ -1052,15 +1052,15 @@
} }
}, },
"node_modules/@typescript-eslint/parser": { "node_modules/@typescript-eslint/parser": {
"version": "7.7.0", "version": "7.7.1",
"resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-7.7.0.tgz", "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-7.7.1.tgz",
"integrity": "sha512-fNcDm3wSwVM8QYL4HKVBggdIPAy9Q41vcvC/GtDobw3c4ndVT3K6cqudUmjHPw8EAp4ufax0o58/xvWaP2FmTg==", "integrity": "sha512-vmPzBOOtz48F6JAGVS/kZYk4EkXao6iGrD838sp1w3NQQC0W8ry/q641KU4PrG7AKNAf56NOcR8GOpH8l9FPCw==",
"dev": true, "dev": true,
"dependencies": { "dependencies": {
"@typescript-eslint/scope-manager": "7.7.0", "@typescript-eslint/scope-manager": "7.7.1",
"@typescript-eslint/types": "7.7.0", "@typescript-eslint/types": "7.7.1",
"@typescript-eslint/typescript-estree": "7.7.0", "@typescript-eslint/typescript-estree": "7.7.1",
"@typescript-eslint/visitor-keys": "7.7.0", "@typescript-eslint/visitor-keys": "7.7.1",
"debug": "^4.3.4" "debug": "^4.3.4"
}, },
"engines": { "engines": {
@ -1080,13 +1080,13 @@
} }
}, },
"node_modules/@typescript-eslint/scope-manager": { "node_modules/@typescript-eslint/scope-manager": {
"version": "7.7.0", "version": "7.7.1",
"resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-7.7.0.tgz", "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-7.7.1.tgz",
"integrity": "sha512-/8INDn0YLInbe9Wt7dK4cXLDYp0fNHP5xKLHvZl3mOT5X17rK/YShXaiNmorl+/U4VKCVIjJnx4Ri5b0y+HClw==", "integrity": "sha512-PytBif2SF+9SpEUKynYn5g1RHFddJUcyynGpztX3l/ik7KmZEv19WCMhUBkHXPU9es/VWGD3/zg3wg90+Dh2rA==",
"dev": true, "dev": true,
"dependencies": { "dependencies": {
"@typescript-eslint/types": "7.7.0", "@typescript-eslint/types": "7.7.1",
"@typescript-eslint/visitor-keys": "7.7.0" "@typescript-eslint/visitor-keys": "7.7.1"
}, },
"engines": { "engines": {
"node": "^18.18.0 || >=20.0.0" "node": "^18.18.0 || >=20.0.0"
@ -1097,13 +1097,13 @@
} }
}, },
"node_modules/@typescript-eslint/type-utils": { "node_modules/@typescript-eslint/type-utils": {
"version": "7.7.0", "version": "7.7.1",
"resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-7.7.0.tgz", "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-7.7.1.tgz",
"integrity": "sha512-bOp3ejoRYrhAlnT/bozNQi3nio9tIgv3U5C0mVDdZC7cpcQEDZXvq8inrHYghLVwuNABRqrMW5tzAv88Vy77Sg==", "integrity": "sha512-ZksJLW3WF7o75zaBPScdW1Gbkwhd/lyeXGf1kQCxJaOeITscoSl0MjynVvCzuV5boUz/3fOI06Lz8La55mu29Q==",
"dev": true, "dev": true,
"dependencies": { "dependencies": {
"@typescript-eslint/typescript-estree": "7.7.0", "@typescript-eslint/typescript-estree": "7.7.1",
"@typescript-eslint/utils": "7.7.0", "@typescript-eslint/utils": "7.7.1",
"debug": "^4.3.4", "debug": "^4.3.4",
"ts-api-utils": "^1.3.0" "ts-api-utils": "^1.3.0"
}, },
@ -1124,9 +1124,9 @@
} }
}, },
"node_modules/@typescript-eslint/types": { "node_modules/@typescript-eslint/types": {
"version": "7.7.0", "version": "7.7.1",
"resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-7.7.0.tgz", "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-7.7.1.tgz",
"integrity": "sha512-G01YPZ1Bd2hn+KPpIbrAhEWOn5lQBrjxkzHkWvP6NucMXFtfXoevK82hzQdpfuQYuhkvFDeQYbzXCjR1z9Z03w==", "integrity": "sha512-AmPmnGW1ZLTpWa+/2omPrPfR7BcbUU4oha5VIbSbS1a1Tv966bklvLNXxp3mrbc+P2j4MNOTfDffNsk4o0c6/w==",
"dev": true, "dev": true,
"engines": { "engines": {
"node": "^18.18.0 || >=20.0.0" "node": "^18.18.0 || >=20.0.0"
@ -1137,13 +1137,13 @@
} }
}, },
"node_modules/@typescript-eslint/typescript-estree": { "node_modules/@typescript-eslint/typescript-estree": {
"version": "7.7.0", "version": "7.7.1",
"resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-7.7.0.tgz", "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-7.7.1.tgz",
"integrity": "sha512-8p71HQPE6CbxIBy2kWHqM1KGrC07pk6RJn40n0DSc6bMOBBREZxSDJ+BmRzc8B5OdaMh1ty3mkuWRg4sCFiDQQ==", "integrity": "sha512-CXe0JHCXru8Fa36dteXqmH2YxngKJjkQLjxzoj6LYwzZ7qZvgsLSc+eqItCrqIop8Vl2UKoAi0StVWu97FQZIQ==",
"dev": true, "dev": true,
"dependencies": { "dependencies": {
"@typescript-eslint/types": "7.7.0", "@typescript-eslint/types": "7.7.1",
"@typescript-eslint/visitor-keys": "7.7.0", "@typescript-eslint/visitor-keys": "7.7.1",
"debug": "^4.3.4", "debug": "^4.3.4",
"globby": "^11.1.0", "globby": "^11.1.0",
"is-glob": "^4.0.3", "is-glob": "^4.0.3",
@ -1189,17 +1189,17 @@
} }
}, },
"node_modules/@typescript-eslint/utils": { "node_modules/@typescript-eslint/utils": {
"version": "7.7.0", "version": "7.7.1",
"resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-7.7.0.tgz", "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-7.7.1.tgz",
"integrity": "sha512-LKGAXMPQs8U/zMRFXDZOzmMKgFv3COlxUQ+2NMPhbqgVm6R1w+nU1i4836Pmxu9jZAuIeyySNrN/6Rc657ggig==", "integrity": "sha512-QUvBxPEaBXf41ZBbaidKICgVL8Hin0p6prQDu6bbetWo39BKbWJxRsErOzMNT1rXvTll+J7ChrbmMCXM9rsvOQ==",
"dev": true, "dev": true,
"dependencies": { "dependencies": {
"@eslint-community/eslint-utils": "^4.4.0", "@eslint-community/eslint-utils": "^4.4.0",
"@types/json-schema": "^7.0.15", "@types/json-schema": "^7.0.15",
"@types/semver": "^7.5.8", "@types/semver": "^7.5.8",
"@typescript-eslint/scope-manager": "7.7.0", "@typescript-eslint/scope-manager": "7.7.1",
"@typescript-eslint/types": "7.7.0", "@typescript-eslint/types": "7.7.1",
"@typescript-eslint/typescript-estree": "7.7.0", "@typescript-eslint/typescript-estree": "7.7.1",
"semver": "^7.6.0" "semver": "^7.6.0"
}, },
"engines": { "engines": {
@ -1214,12 +1214,12 @@
} }
}, },
"node_modules/@typescript-eslint/visitor-keys": { "node_modules/@typescript-eslint/visitor-keys": {
"version": "7.7.0", "version": "7.7.1",
"resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-7.7.0.tgz", "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-7.7.1.tgz",
"integrity": "sha512-h0WHOj8MhdhY8YWkzIF30R379y0NqyOHExI9N9KCzvmu05EgG4FumeYa3ccfKUSphyWkWQE1ybVrgz/Pbam6YA==", "integrity": "sha512-gBL3Eq25uADw1LQ9kVpf3hRM+DWzs0uZknHYK3hq4jcTPqVCClHGDnB6UUUV2SFeBeA4KWHWbbLqmbGcZ4FYbw==",
"dev": true, "dev": true,
"dependencies": { "dependencies": {
"@typescript-eslint/types": "7.7.0", "@typescript-eslint/types": "7.7.1",
"eslint-visitor-keys": "^3.4.3" "eslint-visitor-keys": "^3.4.3"
}, },
"engines": { "engines": {

View file

@ -1,6 +1,6 @@
{ {
"name": "codeql", "name": "codeql",
"version": "3.25.1", "version": "3.25.3",
"private": true, "private": true,
"description": "CodeQL action", "description": "CodeQL action",
"scripts": { "scripts": {
@ -30,7 +30,7 @@
"@actions/tool-cache": "^2.0.1", "@actions/tool-cache": "^2.0.1",
"@chrisgavin/safe-which": "^1.0.2", "@chrisgavin/safe-which": "^1.0.2",
"@octokit/plugin-retry": "^5.0.2", "@octokit/plugin-retry": "^5.0.2",
"@octokit/types": "^13.4.0", "@octokit/types": "^13.4.1",
"@schemastore/package": "0.0.10", "@schemastore/package": "0.0.10",
"@types/uuid": "^9.0.8", "@types/uuid": "^9.0.8",
"adm-zip": "^0.5.12", "adm-zip": "^0.5.12",
@ -60,8 +60,8 @@
"@types/node": "20.9.0", "@types/node": "20.9.0",
"@types/semver": "^7.5.8", "@types/semver": "^7.5.8",
"@types/sinon": "^17.0.3", "@types/sinon": "^17.0.3",
"@typescript-eslint/eslint-plugin": "^7.7.0", "@typescript-eslint/eslint-plugin": "^7.7.1",
"@typescript-eslint/parser": "^7.7.0", "@typescript-eslint/parser": "^7.7.1",
"ava": "^5.3.1", "ava": "^5.3.1",
"eslint": "^8.57.0", "eslint": "^8.57.0",
"eslint-import-resolver-typescript": "^3.6.1", "eslint-import-resolver-typescript": "^3.6.1",

View file

@ -121,6 +121,7 @@ function ensureEndsInPeriod(text: string): string {
/** Error messages from the CLI that we consider configuration errors and handle specially. */ /** Error messages from the CLI that we consider configuration errors and handle specially. */
export enum CliConfigErrorCategory { export enum CliConfigErrorCategory {
ExternalRepositoryCloneFailed = "ExternalRepositoryCloneFailed",
GradleBuildFailed = "GradleBuildFailed", GradleBuildFailed = "GradleBuildFailed",
IncompatibleWithActionVersion = "IncompatibleWithActionVersion", IncompatibleWithActionVersion = "IncompatibleWithActionVersion",
InitCalledTwice = "InitCalledTwice", InitCalledTwice = "InitCalledTwice",
@ -150,6 +151,11 @@ export const cliErrorsConfig: Record<
CliConfigErrorCategory, CliConfigErrorCategory,
CliErrorConfiguration CliErrorConfiguration
> = { > = {
[CliConfigErrorCategory.ExternalRepositoryCloneFailed]: {
cliErrorMessageCandidates: [
new RegExp("Failed to clone external Git repository"),
],
},
[CliConfigErrorCategory.GradleBuildFailed]: { [CliConfigErrorCategory.GradleBuildFailed]: {
cliErrorMessageCandidates: [ cliErrorMessageCandidates: [
new RegExp("[autobuild] FAILURE: Build failed with an exception."), new RegExp("[autobuild] FAILURE: Build failed with an exception."),

View file

@ -42,7 +42,6 @@ test("validate correct payload used for push, PR merge commit, and PR head", asy
undefined, undefined,
["CodeQL", "eslint"], ["CodeQL", "eslint"],
"mergeBaseCommit", "mergeBaseCommit",
getRunnerLogger(true),
); );
// Not triggered by a pull request // Not triggered by a pull request
t.falsy(pushPayload.base_ref); t.falsy(pushPayload.base_ref);
@ -66,7 +65,6 @@ test("validate correct payload used for push, PR merge commit, and PR head", asy
undefined, undefined,
["CodeQL", "eslint"], ["CodeQL", "eslint"],
"mergeBaseCommit", "mergeBaseCommit",
getRunnerLogger(true),
); );
// Uploads for a merge commit use the merge base // Uploads for a merge commit use the merge base
t.deepEqual(prMergePayload.base_ref, "refs/heads/master"); t.deepEqual(prMergePayload.base_ref, "refs/heads/master");
@ -84,7 +82,6 @@ test("validate correct payload used for push, PR merge commit, and PR head", asy
undefined, undefined,
["CodeQL", "eslint"], ["CodeQL", "eslint"],
"mergeBaseCommit", "mergeBaseCommit",
getRunnerLogger(true),
); );
// Uploads for the head use the PR base // Uploads for the head use the PR base
t.deepEqual(prHeadPayload.base_ref, "refs/heads/master"); t.deepEqual(prHeadPayload.base_ref, "refs/heads/master");

View file

@ -421,9 +421,7 @@ export function buildPayload(
environment: string | undefined, environment: string | undefined,
toolNames: string[], toolNames: string[],
mergeBaseCommitOid: string | undefined, mergeBaseCommitOid: string | undefined,
logger: Logger,
) { ) {
logger.info(`Combining SARIF files using CLI`);
const payloadObj = { const payloadObj = {
commit_oid: commitOid, commit_oid: commitOid,
ref, ref,
@ -537,7 +535,6 @@ async function uploadFiles(
environment, environment,
toolNames, toolNames,
await actionsUtil.determineMergeBaseCommitOid(), await actionsUtil.determineMergeBaseCommitOid(),
logger,
); );
// Log some useful debug info about the info // Log some useful debug info about the info