Merge pull request #2275 from github/update-v3.25.4-4b812a5df
Merge main into releases/v3
This commit is contained in:
Коммит
ccf74c9479
|
@ -1,5 +1,6 @@
|
|||
import argparse
|
||||
import datetime
|
||||
import fileinput
|
||||
import re
|
||||
from github import Github
|
||||
import json
|
||||
|
@ -171,6 +172,19 @@ def get_current_version():
|
|||
with open('package.json', 'r') as f:
|
||||
return json.load(f)['version']
|
||||
|
||||
# `npm version` doesn't always work because of merge conflicts, so we
|
||||
# replace the version in package.json textually.
|
||||
def replace_version_package_json(prev_version, new_version):
|
||||
prev_line_is_codeql = False
|
||||
for line in fileinput.input('package.json', inplace = True, encoding='utf-8'):
|
||||
if prev_line_is_codeql and f'\"version\": \"{prev_version}\"' in line:
|
||||
print(line.replace(prev_version, new_version), end='')
|
||||
else:
|
||||
prev_line_is_codeql = False
|
||||
print(line, end='')
|
||||
if '\"name\": \"codeql\",' in line:
|
||||
prev_line_is_codeql = True
|
||||
|
||||
def get_today_string():
|
||||
today = datetime.datetime.today()
|
||||
return '{:%d %b %Y}'.format(today)
|
||||
|
@ -374,9 +388,9 @@ def main():
|
|||
run_git('commit', '--no-edit')
|
||||
|
||||
# Migrate the package version number from a vLatest version number to a vOlder version number
|
||||
print(f'Setting version number to {version}')
|
||||
subprocess.check_output(['npm', 'version', version, '--no-git-tag-version'])
|
||||
run_git('add', 'package.json', 'package-lock.json')
|
||||
print(f'Setting version number to {version} in package.json')
|
||||
replace_version_package_json(get_current_version(), version) # We rely on the `Update dependencies` workflow to update package-lock.json
|
||||
run_git('add', 'package.json')
|
||||
|
||||
# Migrate the changelog notes from vLatest version numbers to vOlder version numbers
|
||||
print(f'Migrating changelog notes from v{source_branch_major_version} to v{target_branch_major_version}')
|
||||
|
|
|
@ -4,6 +4,10 @@ See the [releases page](https://github.com/github/codeql-action/releases) for th
|
|||
|
||||
Note that the only difference between `v2` and `v3` of the CodeQL Action is the node version they support, with `v3` running on node 20 while we continue to release `v2` to support running on node 16. For example `3.22.11` was the first `v3` release and is functionally identical to `2.22.11`. This approach ensures an easy way to track exactly which features are included in different versions, indicated by the minor and patch version numbers.
|
||||
|
||||
## 3.25.4 - 08 May 2024
|
||||
|
||||
- Update default CodeQL bundle version to 2.17.2. [#2270](https://github.com/github/codeql-action/pull/2270)
|
||||
|
||||
## 3.25.3 - 25 Apr 2024
|
||||
|
||||
- Update default CodeQL bundle version to 2.17.1. [#2247](https://github.com/github/codeql-action/pull/2247)
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"bundleVersion": "codeql-bundle-v2.17.1",
|
||||
"cliVersion": "2.17.1",
|
||||
"priorBundleVersion": "codeql-bundle-v2.17.0",
|
||||
"priorCliVersion": "2.17.0"
|
||||
"bundleVersion": "codeql-bundle-v2.17.2",
|
||||
"cliVersion": "2.17.2",
|
||||
"priorBundleVersion": "codeql-bundle-v2.17.1",
|
||||
"priorCliVersion": "2.17.1"
|
||||
}
|
||||
|
|
|
@ -50,7 +50,7 @@ exports.CODEQL_VERSION_FINE_GRAINED_PARALLELISM = "2.15.1";
|
|||
var Feature;
|
||||
(function (Feature) {
|
||||
Feature["AutobuildDirectTracingEnabled"] = "autobuild_direct_tracing_enabled";
|
||||
Feature["CliSarifMerge"] = "cli_sarif_merge_enabled";
|
||||
Feature["CombineSarifFilesDeprecationWarning"] = "combine_sarif_files_deprecation_warning_enabled";
|
||||
Feature["CppDependencyInstallation"] = "cpp_dependency_installation_enabled";
|
||||
Feature["CppTrapCachingEnabled"] = "cpp_trap_caching_enabled";
|
||||
Feature["DisableJavaBuildlessEnabled"] = "disable_java_buildless_enabled";
|
||||
|
@ -65,9 +65,9 @@ exports.featureConfig = {
|
|||
toolsFeature: tools_features_1.ToolsFeature.TraceCommandUseBuildMode,
|
||||
defaultValue: false,
|
||||
},
|
||||
[Feature.CliSarifMerge]: {
|
||||
envVar: "CODEQL_ACTION_CLI_SARIF_MERGE",
|
||||
// This is guarded by a `supportsFeature` check rather than by a version check.
|
||||
[Feature.CombineSarifFilesDeprecationWarning]: {
|
||||
envVar: "CODEQL_ACTION_COMBINE_SARIF_FILES_DEPRECATION_WARNING",
|
||||
// Independent of the CLI version.
|
||||
minimumVersion: undefined,
|
||||
defaultValue: false,
|
||||
},
|
||||
|
|
Различия файлов скрыты, потому что одна или несколько строк слишком длинны
|
@ -26,13 +26,14 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|||
return (mod && mod.__esModule) ? mod : { "default": mod };
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.InvalidSarifUploadError = exports.validateUniqueCategory = exports.waitForProcessing = exports.buildPayload = exports.validateSarifFileSchema = exports.uploadFromActions = exports.findSarifFilesInDir = exports.populateRunAutomationDetails = void 0;
|
||||
exports.InvalidSarifUploadError = exports.validateUniqueCategory = exports.waitForProcessing = exports.buildPayload = exports.validateSarifFileSchema = exports.uploadFromActions = exports.findSarifFilesInDir = exports.populateRunAutomationDetails = exports.shouldShowCombineSarifFilesDeprecationWarning = void 0;
|
||||
const fs = __importStar(require("fs"));
|
||||
const path = __importStar(require("path"));
|
||||
const zlib_1 = __importDefault(require("zlib"));
|
||||
const core = __importStar(require("@actions/core"));
|
||||
const file_url_1 = __importDefault(require("file-url"));
|
||||
const jsonschema = __importStar(require("jsonschema"));
|
||||
const semver = __importStar(require("semver"));
|
||||
const actionsUtil = __importStar(require("./actions-util"));
|
||||
const actions_util_1 = require("./actions-util");
|
||||
const api = __importStar(require("./api-client"));
|
||||
|
@ -73,14 +74,58 @@ function combineSarifFiles(sarifFiles, logger) {
|
|||
}
|
||||
/**
|
||||
* Checks whether all the runs in the given SARIF files were produced by CodeQL.
|
||||
* @param sarifFiles The list of SARIF files to check.
|
||||
* @param sarifObjects The list of SARIF objects to check.
|
||||
*/
|
||||
function areAllRunsProducedByCodeQL(sarifFiles) {
|
||||
return sarifFiles.every((sarifFile) => {
|
||||
const sarifObject = JSON.parse(fs.readFileSync(sarifFile, "utf8"));
|
||||
function areAllRunsProducedByCodeQL(sarifObjects) {
|
||||
return sarifObjects.every((sarifObject) => {
|
||||
return sarifObject.runs?.every((run) => run.tool?.driver?.name === "CodeQL");
|
||||
});
|
||||
}
|
||||
function createRunKey(run) {
|
||||
return {
|
||||
name: run.tool?.driver?.name,
|
||||
fullName: run.tool?.driver?.fullName,
|
||||
version: run.tool?.driver?.version,
|
||||
semanticVersion: run.tool?.driver?.semanticVersion,
|
||||
guid: run.tool?.driver?.guid,
|
||||
automationId: run.automationDetails?.id,
|
||||
};
|
||||
}
|
||||
/**
|
||||
* Checks whether all runs in the given SARIF files are unique (based on the
|
||||
* criteria used by Code Scanning to determine analysis categories).
|
||||
* @param sarifObjects The list of SARIF objects to check.
|
||||
*/
|
||||
function areAllRunsUnique(sarifObjects) {
|
||||
const keys = new Set();
|
||||
for (const sarifObject of sarifObjects) {
|
||||
for (const run of sarifObject.runs) {
|
||||
const key = JSON.stringify(createRunKey(run));
|
||||
// If the key already exists, the runs are not unique.
|
||||
if (keys.has(key)) {
|
||||
return false;
|
||||
}
|
||||
keys.add(key);
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
// Checks whether the deprecation warning for combining SARIF files should be shown.
|
||||
async function shouldShowCombineSarifFilesDeprecationWarning(sarifObjects, features, githubVersion) {
|
||||
if (!(await features.getValue(feature_flags_1.Feature.CombineSarifFilesDeprecationWarning))) {
|
||||
return false;
|
||||
}
|
||||
// Do not show this warning on GHES versions before 3.14.0
|
||||
if (githubVersion.type === util_1.GitHubVariant.GHES &&
|
||||
semver.lt(githubVersion.version, "3.14.0")) {
|
||||
return false;
|
||||
}
|
||||
// Only give a deprecation warning when not all runs are unique and
|
||||
// we haven't already shown the warning.
|
||||
return (!areAllRunsUnique(sarifObjects) &&
|
||||
!process.env.CODEQL_MERGE_SARIF_DEPRECATION_WARNING);
|
||||
}
|
||||
exports.shouldShowCombineSarifFilesDeprecationWarning = shouldShowCombineSarifFilesDeprecationWarning;
|
||||
// Takes a list of paths to sarif files and combines them together using the
|
||||
// CLI `github merge-results` command when all SARIF files are produced by
|
||||
// CodeQL. Otherwise, it will fall back to combining the files in the action.
|
||||
|
@ -90,8 +135,19 @@ async function combineSarifFilesUsingCLI(sarifFiles, gitHubVersion, features, lo
|
|||
if (sarifFiles.length === 1) {
|
||||
return JSON.parse(fs.readFileSync(sarifFiles[0], "utf8"));
|
||||
}
|
||||
if (!areAllRunsProducedByCodeQL(sarifFiles)) {
|
||||
const sarifObjects = sarifFiles.map((sarifFile) => {
|
||||
return JSON.parse(fs.readFileSync(sarifFile, "utf8"));
|
||||
});
|
||||
const deprecationWarningMessage = gitHubVersion.type === util_1.GitHubVariant.GHES
|
||||
? "and will be removed in GitHub Enterprise Server 3.18"
|
||||
: "and will be removed on June 4, 2025";
|
||||
const deprecationMoreInformationMessage = "For more information, see https://github.blog/changelog/2024-05-06-code-scanning-will-stop-combining-runs-from-a-single-upload";
|
||||
if (!areAllRunsProducedByCodeQL(sarifObjects)) {
|
||||
logger.debug("Not all SARIF files were produced by CodeQL. Merging files in the action.");
|
||||
if (await shouldShowCombineSarifFilesDeprecationWarning(sarifObjects, features, gitHubVersion)) {
|
||||
logger.warning(`Uploading multiple SARIF runs with the same category is deprecated ${deprecationWarningMessage}. Please update your workflow to upload a single run per category. ${deprecationMoreInformationMessage}`);
|
||||
core.exportVariable("CODEQL_MERGE_SARIF_DEPRECATION_WARNING", "true");
|
||||
}
|
||||
// If not, use the naive method of combining the files.
|
||||
return combineSarifFiles(sarifFiles, logger);
|
||||
}
|
||||
|
@ -119,6 +175,10 @@ async function combineSarifFilesUsingCLI(sarifFiles, gitHubVersion, features, lo
|
|||
}
|
||||
if (!(await codeQL.supportsFeature(tools_features_1.ToolsFeature.SarifMergeRunsFromEqualCategory))) {
|
||||
logger.warning("The CodeQL CLI does not support merging SARIF files. Merging files in the action.");
|
||||
if (await shouldShowCombineSarifFilesDeprecationWarning(sarifObjects, features, gitHubVersion)) {
|
||||
logger.warning(`Uploading multiple CodeQL runs with the same category is deprecated ${deprecationWarningMessage} for CodeQL CLI 2.16.6 and earlier. Please update your CodeQL CLI version or update your workflow to set a distinct category for each CodeQL run. ${deprecationMoreInformationMessage}`);
|
||||
core.exportVariable("CODEQL_MERGE_SARIF_DEPRECATION_WARNING", "true");
|
||||
}
|
||||
return combineSarifFiles(sarifFiles, logger);
|
||||
}
|
||||
const baseTempDir = path.resolve(tempDir, "combined-sarif");
|
||||
|
@ -341,9 +401,7 @@ async function uploadFiles(sarifFiles, repositoryNwo, commitOid, ref, analysisKe
|
|||
for (const file of sarifFiles) {
|
||||
validateSarifFileSchema(file, logger);
|
||||
}
|
||||
let sarif = (await features.getValue(feature_flags_1.Feature.CliSarifMerge))
|
||||
? await combineSarifFilesUsingCLI(sarifFiles, gitHubVersion, features, logger)
|
||||
: combineSarifFiles(sarifFiles, logger);
|
||||
let sarif = await combineSarifFilesUsingCLI(sarifFiles, gitHubVersion, features, logger);
|
||||
sarif = await fingerprints.addFingerprints(sarif, sourceRoot, logger);
|
||||
sarif = populateRunAutomationDetails(sarif, category, analysisKey, environment);
|
||||
const toolNames = util.getToolNames(sarif);
|
||||
|
|
Различия файлов скрыты, потому что одна или несколько строк слишком длинны
|
@ -29,6 +29,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|||
const fs = __importStar(require("fs"));
|
||||
const path = __importStar(require("path"));
|
||||
const ava_1 = __importDefault(require("ava"));
|
||||
const feature_flags_1 = require("./feature-flags");
|
||||
const logging_1 = require("./logging");
|
||||
const testing_utils_1 = require("./testing-utils");
|
||||
const uploadLib = __importStar(require("./upload-lib"));
|
||||
|
@ -195,6 +196,49 @@ ava_1.default.beforeEach(() => {
|
|||
t.deepEqual(loggedMessages.length, 2);
|
||||
t.deepEqual(loggedMessages[1], "Warning: 'not a valid URI' is not a valid URI in 'instance.runs[0].results[0].locations[0].physicalLocation.artifactLocation.uri'.");
|
||||
});
|
||||
(0, ava_1.default)("shouldShowCombineSarifFilesDeprecationWarning when on dotcom with feature flag", async (t) => {
|
||||
t.true(await uploadLib.shouldShowCombineSarifFilesDeprecationWarning([createMockSarif("abc", "def"), createMockSarif("abc", "def")], (0, testing_utils_1.createFeatures)([feature_flags_1.Feature.CombineSarifFilesDeprecationWarning]), {
|
||||
type: util_1.GitHubVariant.DOTCOM,
|
||||
}));
|
||||
});
|
||||
(0, ava_1.default)("shouldShowCombineSarifFilesDeprecationWarning without feature flag", async (t) => {
|
||||
t.false(await uploadLib.shouldShowCombineSarifFilesDeprecationWarning([createMockSarif("abc", "def"), createMockSarif("abc", "def")], (0, testing_utils_1.createFeatures)([]), {
|
||||
type: util_1.GitHubVariant.DOTCOM,
|
||||
}));
|
||||
});
|
||||
(0, ava_1.default)("shouldShowCombineSarifFilesDeprecationWarning when on GHES 3.13", async (t) => {
|
||||
t.false(await uploadLib.shouldShowCombineSarifFilesDeprecationWarning([createMockSarif("abc", "def"), createMockSarif("abc", "def")], (0, testing_utils_1.createFeatures)([feature_flags_1.Feature.CombineSarifFilesDeprecationWarning]), {
|
||||
type: util_1.GitHubVariant.GHES,
|
||||
version: "3.13.2",
|
||||
}));
|
||||
});
|
||||
(0, ava_1.default)("shouldShowCombineSarifFilesDeprecationWarning when on GHES 3.14", async (t) => {
|
||||
t.true(await uploadLib.shouldShowCombineSarifFilesDeprecationWarning([createMockSarif("abc", "def"), createMockSarif("abc", "def")], (0, testing_utils_1.createFeatures)([feature_flags_1.Feature.CombineSarifFilesDeprecationWarning]), {
|
||||
type: util_1.GitHubVariant.GHES,
|
||||
version: "3.14.0",
|
||||
}));
|
||||
});
|
||||
(0, ava_1.default)("shouldShowCombineSarifFilesDeprecationWarning with only 1 run", async (t) => {
|
||||
t.false(await uploadLib.shouldShowCombineSarifFilesDeprecationWarning([createMockSarif("abc", "def")], (0, testing_utils_1.createFeatures)([feature_flags_1.Feature.CombineSarifFilesDeprecationWarning]), {
|
||||
type: util_1.GitHubVariant.DOTCOM,
|
||||
}));
|
||||
});
|
||||
(0, ava_1.default)("shouldShowCombineSarifFilesDeprecationWarning with distinct categories", async (t) => {
|
||||
t.false(await uploadLib.shouldShowCombineSarifFilesDeprecationWarning([createMockSarif("abc", "def"), createMockSarif("def", "def")], (0, testing_utils_1.createFeatures)([feature_flags_1.Feature.CombineSarifFilesDeprecationWarning]), {
|
||||
type: util_1.GitHubVariant.DOTCOM,
|
||||
}));
|
||||
});
|
||||
(0, ava_1.default)("shouldShowCombineSarifFilesDeprecationWarning with distinct tools", async (t) => {
|
||||
t.false(await uploadLib.shouldShowCombineSarifFilesDeprecationWarning([createMockSarif("abc", "abc"), createMockSarif("abc", "def")], (0, testing_utils_1.createFeatures)([feature_flags_1.Feature.CombineSarifFilesDeprecationWarning]), {
|
||||
type: util_1.GitHubVariant.DOTCOM,
|
||||
}));
|
||||
});
|
||||
(0, ava_1.default)("shouldShowCombineSarifFilesDeprecationWarning when environment variable is already set", async (t) => {
|
||||
process.env["CODEQL_MERGE_SARIF_DEPRECATION_WARNING"] = "true";
|
||||
t.false(await uploadLib.shouldShowCombineSarifFilesDeprecationWarning([createMockSarif("abc", "def"), createMockSarif("abc", "def")], (0, testing_utils_1.createFeatures)([feature_flags_1.Feature.CombineSarifFilesDeprecationWarning]), {
|
||||
type: util_1.GitHubVariant.DOTCOM,
|
||||
}));
|
||||
});
|
||||
function createMockSarif(id, tool) {
|
||||
return {
|
||||
runs: [
|
||||
|
|
Различия файлов скрыты, потому что одна или несколько строк слишком длинны
Различия файлов скрыты, потому что одна или несколько строк слишком длинны
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "codeql",
|
||||
"version": "3.25.3",
|
||||
"version": "3.25.4",
|
||||
"lockfileVersion": 3,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
|
@ -960,16 +960,16 @@
|
|||
"integrity": "sha512-jg+97EGIcY9AGHJJRaaPVgetKDsrTgbRjQ5Msgjh/DQKEFl0DtyRr/VCOyD1T2R1MNeWPK/u7JoGhlDZnKBAfA=="
|
||||
},
|
||||
"node_modules/@typescript-eslint/eslint-plugin": {
|
||||
"version": "7.7.1",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-7.7.1.tgz",
|
||||
"integrity": "sha512-KwfdWXJBOviaBVhxO3p5TJiLpNuh2iyXyjmWN0f1nU87pwyvfS0EmjC6ukQVYVFJd/K1+0NWGPDXiyEyQorn0Q==",
|
||||
"version": "7.8.0",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-7.8.0.tgz",
|
||||
"integrity": "sha512-gFTT+ezJmkwutUPmB0skOj3GZJtlEGnlssems4AjkVweUPGj7jRwwqg0Hhg7++kPGJqKtTYx+R05Ftww372aIg==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"@eslint-community/regexpp": "^4.10.0",
|
||||
"@typescript-eslint/scope-manager": "7.7.1",
|
||||
"@typescript-eslint/type-utils": "7.7.1",
|
||||
"@typescript-eslint/utils": "7.7.1",
|
||||
"@typescript-eslint/visitor-keys": "7.7.1",
|
||||
"@typescript-eslint/scope-manager": "7.8.0",
|
||||
"@typescript-eslint/type-utils": "7.8.0",
|
||||
"@typescript-eslint/utils": "7.8.0",
|
||||
"@typescript-eslint/visitor-keys": "7.8.0",
|
||||
"debug": "^4.3.4",
|
||||
"graphemer": "^1.4.0",
|
||||
"ignore": "^5.3.1",
|
||||
|
@ -995,15 +995,15 @@
|
|||
}
|
||||
},
|
||||
"node_modules/@typescript-eslint/parser": {
|
||||
"version": "7.7.1",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-7.7.1.tgz",
|
||||
"integrity": "sha512-vmPzBOOtz48F6JAGVS/kZYk4EkXao6iGrD838sp1w3NQQC0W8ry/q641KU4PrG7AKNAf56NOcR8GOpH8l9FPCw==",
|
||||
"version": "7.8.0",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-7.8.0.tgz",
|
||||
"integrity": "sha512-KgKQly1pv0l4ltcftP59uQZCi4HUYswCLbTqVZEJu7uLX8CTLyswqMLqLN+2QFz4jCptqWVV4SB7vdxcH2+0kQ==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"@typescript-eslint/scope-manager": "7.7.1",
|
||||
"@typescript-eslint/types": "7.7.1",
|
||||
"@typescript-eslint/typescript-estree": "7.7.1",
|
||||
"@typescript-eslint/visitor-keys": "7.7.1",
|
||||
"@typescript-eslint/scope-manager": "7.8.0",
|
||||
"@typescript-eslint/types": "7.8.0",
|
||||
"@typescript-eslint/typescript-estree": "7.8.0",
|
||||
"@typescript-eslint/visitor-keys": "7.8.0",
|
||||
"debug": "^4.3.4"
|
||||
},
|
||||
"engines": {
|
||||
|
@ -1023,13 +1023,13 @@
|
|||
}
|
||||
},
|
||||
"node_modules/@typescript-eslint/scope-manager": {
|
||||
"version": "7.7.1",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-7.7.1.tgz",
|
||||
"integrity": "sha512-PytBif2SF+9SpEUKynYn5g1RHFddJUcyynGpztX3l/ik7KmZEv19WCMhUBkHXPU9es/VWGD3/zg3wg90+Dh2rA==",
|
||||
"version": "7.8.0",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-7.8.0.tgz",
|
||||
"integrity": "sha512-viEmZ1LmwsGcnr85gIq+FCYI7nO90DVbE37/ll51hjv9aG+YZMb4WDE2fyWpUR4O/UrhGRpYXK/XajcGTk2B8g==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"@typescript-eslint/types": "7.7.1",
|
||||
"@typescript-eslint/visitor-keys": "7.7.1"
|
||||
"@typescript-eslint/types": "7.8.0",
|
||||
"@typescript-eslint/visitor-keys": "7.8.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": "^18.18.0 || >=20.0.0"
|
||||
|
@ -1040,13 +1040,13 @@
|
|||
}
|
||||
},
|
||||
"node_modules/@typescript-eslint/type-utils": {
|
||||
"version": "7.7.1",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-7.7.1.tgz",
|
||||
"integrity": "sha512-ZksJLW3WF7o75zaBPScdW1Gbkwhd/lyeXGf1kQCxJaOeITscoSl0MjynVvCzuV5boUz/3fOI06Lz8La55mu29Q==",
|
||||
"version": "7.8.0",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-7.8.0.tgz",
|
||||
"integrity": "sha512-H70R3AefQDQpz9mGv13Uhi121FNMh+WEaRqcXTX09YEDky21km4dV1ZXJIp8QjXc4ZaVkXVdohvWDzbnbHDS+A==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"@typescript-eslint/typescript-estree": "7.7.1",
|
||||
"@typescript-eslint/utils": "7.7.1",
|
||||
"@typescript-eslint/typescript-estree": "7.8.0",
|
||||
"@typescript-eslint/utils": "7.8.0",
|
||||
"debug": "^4.3.4",
|
||||
"ts-api-utils": "^1.3.0"
|
||||
},
|
||||
|
@ -1067,9 +1067,9 @@
|
|||
}
|
||||
},
|
||||
"node_modules/@typescript-eslint/types": {
|
||||
"version": "7.7.1",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-7.7.1.tgz",
|
||||
"integrity": "sha512-AmPmnGW1ZLTpWa+/2omPrPfR7BcbUU4oha5VIbSbS1a1Tv966bklvLNXxp3mrbc+P2j4MNOTfDffNsk4o0c6/w==",
|
||||
"version": "7.8.0",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-7.8.0.tgz",
|
||||
"integrity": "sha512-wf0peJ+ZGlcH+2ZS23aJbOv+ztjeeP8uQ9GgwMJGVLx/Nj9CJt17GWgWWoSmoRVKAX2X+7fzEnAjxdvK2gqCLw==",
|
||||
"dev": true,
|
||||
"engines": {
|
||||
"node": "^18.18.0 || >=20.0.0"
|
||||
|
@ -1080,13 +1080,13 @@
|
|||
}
|
||||
},
|
||||
"node_modules/@typescript-eslint/typescript-estree": {
|
||||
"version": "7.7.1",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-7.7.1.tgz",
|
||||
"integrity": "sha512-CXe0JHCXru8Fa36dteXqmH2YxngKJjkQLjxzoj6LYwzZ7qZvgsLSc+eqItCrqIop8Vl2UKoAi0StVWu97FQZIQ==",
|
||||
"version": "7.8.0",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-7.8.0.tgz",
|
||||
"integrity": "sha512-5pfUCOwK5yjPaJQNy44prjCwtr981dO8Qo9J9PwYXZ0MosgAbfEMB008dJ5sNo3+/BN6ytBPuSvXUg9SAqB0dg==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"@typescript-eslint/types": "7.7.1",
|
||||
"@typescript-eslint/visitor-keys": "7.7.1",
|
||||
"@typescript-eslint/types": "7.8.0",
|
||||
"@typescript-eslint/visitor-keys": "7.8.0",
|
||||
"debug": "^4.3.4",
|
||||
"globby": "^11.1.0",
|
||||
"is-glob": "^4.0.3",
|
||||
|
@ -1132,17 +1132,17 @@
|
|||
}
|
||||
},
|
||||
"node_modules/@typescript-eslint/utils": {
|
||||
"version": "7.7.1",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-7.7.1.tgz",
|
||||
"integrity": "sha512-QUvBxPEaBXf41ZBbaidKICgVL8Hin0p6prQDu6bbetWo39BKbWJxRsErOzMNT1rXvTll+J7ChrbmMCXM9rsvOQ==",
|
||||
"version": "7.8.0",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-7.8.0.tgz",
|
||||
"integrity": "sha512-L0yFqOCflVqXxiZyXrDr80lnahQfSOfc9ELAAZ75sqicqp2i36kEZZGuUymHNFoYOqxRT05up760b4iGsl02nQ==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"@eslint-community/eslint-utils": "^4.4.0",
|
||||
"@types/json-schema": "^7.0.15",
|
||||
"@types/semver": "^7.5.8",
|
||||
"@typescript-eslint/scope-manager": "7.7.1",
|
||||
"@typescript-eslint/types": "7.7.1",
|
||||
"@typescript-eslint/typescript-estree": "7.7.1",
|
||||
"@typescript-eslint/scope-manager": "7.8.0",
|
||||
"@typescript-eslint/types": "7.8.0",
|
||||
"@typescript-eslint/typescript-estree": "7.8.0",
|
||||
"semver": "^7.6.0"
|
||||
},
|
||||
"engines": {
|
||||
|
@ -1157,12 +1157,12 @@
|
|||
}
|
||||
},
|
||||
"node_modules/@typescript-eslint/visitor-keys": {
|
||||
"version": "7.7.1",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-7.7.1.tgz",
|
||||
"integrity": "sha512-gBL3Eq25uADw1LQ9kVpf3hRM+DWzs0uZknHYK3hq4jcTPqVCClHGDnB6UUUV2SFeBeA4KWHWbbLqmbGcZ4FYbw==",
|
||||
"version": "7.8.0",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-7.8.0.tgz",
|
||||
"integrity": "sha512-q4/gibTNBQNA0lGyYQCmWRS5D15n8rXh4QjK3KV+MBPlTYHpfBUT3D3PaPR/HeNiI9W6R7FvlkcGhNyAoP+caA==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"@typescript-eslint/types": "7.7.1",
|
||||
"@typescript-eslint/types": "7.8.0",
|
||||
"eslint-visitor-keys": "^3.4.3"
|
||||
},
|
||||
"engines": {
|
||||
|
|
5
node_modules/@typescript-eslint/eslint-plugin/dist/rules/consistent-type-assertions.js
сгенерированный
поставляемый
5
node_modules/@typescript-eslint/eslint-plugin/dist/rules/consistent-type-assertions.js
сгенерированный
поставляемый
|
@ -167,7 +167,10 @@ exports.default = (0, util_1.createRule)({
|
|||
node.parent.type === utils_1.AST_NODE_TYPES.CallExpression ||
|
||||
node.parent.type === utils_1.AST_NODE_TYPES.ThrowStatement ||
|
||||
node.parent.type === utils_1.AST_NODE_TYPES.AssignmentPattern ||
|
||||
node.parent.type === utils_1.AST_NODE_TYPES.JSXExpressionContainer)) {
|
||||
node.parent.type === utils_1.AST_NODE_TYPES.JSXExpressionContainer ||
|
||||
(node.parent.type === utils_1.AST_NODE_TYPES.TemplateLiteral &&
|
||||
node.parent.parent.type ===
|
||||
utils_1.AST_NODE_TYPES.TaggedTemplateExpression))) {
|
||||
return;
|
||||
}
|
||||
if (checkType(node.typeAnnotation)) {
|
||||
|
|
2
node_modules/@typescript-eslint/eslint-plugin/dist/rules/consistent-type-assertions.js.map
сгенерированный
поставляемый
2
node_modules/@typescript-eslint/eslint-plugin/dist/rules/consistent-type-assertions.js.map
сгенерированный
поставляемый
Различия файлов скрыты, потому что одна или несколько строк слишком длинны
175
node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unsafe-argument.js
сгенерированный
поставляемый
175
node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unsafe-argument.js
сгенерированный
поставляемый
|
@ -105,96 +105,103 @@ exports.default = (0, util_1.createRule)({
|
|||
create(context) {
|
||||
const services = (0, util_1.getParserServices)(context);
|
||||
const checker = services.program.getTypeChecker();
|
||||
return {
|
||||
'CallExpression, NewExpression'(node) {
|
||||
if (node.arguments.length === 0) {
|
||||
return;
|
||||
}
|
||||
// ignore any-typed calls as these are caught by no-unsafe-call
|
||||
if ((0, util_1.isTypeAnyType)(services.getTypeAtLocation(node.callee))) {
|
||||
return;
|
||||
}
|
||||
const tsNode = services.esTreeNodeToTSNodeMap.get(node);
|
||||
const signature = FunctionSignature.create(checker, tsNode);
|
||||
if (!signature) {
|
||||
return;
|
||||
}
|
||||
for (const argument of node.arguments) {
|
||||
switch (argument.type) {
|
||||
// spreads consume
|
||||
case utils_1.AST_NODE_TYPES.SpreadElement: {
|
||||
const spreadArgType = services.getTypeAtLocation(argument.argument);
|
||||
if ((0, util_1.isTypeAnyType)(spreadArgType)) {
|
||||
// foo(...any)
|
||||
context.report({
|
||||
node: argument,
|
||||
messageId: 'unsafeSpread',
|
||||
});
|
||||
}
|
||||
else if ((0, util_1.isTypeAnyArrayType)(spreadArgType, checker)) {
|
||||
// foo(...any[])
|
||||
// TODO - we could break down the spread and compare the array type against each argument
|
||||
context.report({
|
||||
node: argument,
|
||||
messageId: 'unsafeArraySpread',
|
||||
});
|
||||
}
|
||||
else if (checker.isTupleType(spreadArgType)) {
|
||||
// foo(...[tuple1, tuple2])
|
||||
const spreadTypeArguments = checker.getTypeArguments(spreadArgType);
|
||||
for (const tupleType of spreadTypeArguments) {
|
||||
const parameterType = signature.getNextParameterType();
|
||||
if (parameterType == null) {
|
||||
continue;
|
||||
}
|
||||
const result = (0, util_1.isUnsafeAssignment)(tupleType, parameterType, checker,
|
||||
// we can't pass the individual tuple members in here as this will most likely be a spread variable
|
||||
// not a spread array
|
||||
null);
|
||||
if (result) {
|
||||
context.report({
|
||||
node: argument,
|
||||
messageId: 'unsafeTupleSpread',
|
||||
data: {
|
||||
sender: checker.typeToString(tupleType),
|
||||
receiver: checker.typeToString(parameterType),
|
||||
},
|
||||
});
|
||||
}
|
||||
}
|
||||
if (spreadArgType.target.hasRestElement) {
|
||||
// the last element was a rest - so all remaining defined arguments can be considered "consumed"
|
||||
// all remaining arguments should be compared against the rest type (if one exists)
|
||||
signature.consumeRemainingArguments();
|
||||
}
|
||||
}
|
||||
else {
|
||||
// something that's iterable
|
||||
// handling this will be pretty complex - so we ignore it for now
|
||||
// TODO - handle generic iterable case
|
||||
}
|
||||
break;
|
||||
function checkUnsafeArguments(args, callee, node) {
|
||||
if (args.length === 0) {
|
||||
return;
|
||||
}
|
||||
// ignore any-typed calls as these are caught by no-unsafe-call
|
||||
if ((0, util_1.isTypeAnyType)(services.getTypeAtLocation(callee))) {
|
||||
return;
|
||||
}
|
||||
const tsNode = services.esTreeNodeToTSNodeMap.get(node);
|
||||
const signature = (0, util_1.nullThrows)(FunctionSignature.create(checker, tsNode), 'Expected to a signature resolved');
|
||||
if (node.type === utils_1.AST_NODE_TYPES.TaggedTemplateExpression) {
|
||||
// Consumes the first parameter (TemplateStringsArray) of the function called with TaggedTemplateExpression.
|
||||
signature.getNextParameterType();
|
||||
}
|
||||
for (const argument of args) {
|
||||
switch (argument.type) {
|
||||
// spreads consume
|
||||
case utils_1.AST_NODE_TYPES.SpreadElement: {
|
||||
const spreadArgType = services.getTypeAtLocation(argument.argument);
|
||||
if ((0, util_1.isTypeAnyType)(spreadArgType)) {
|
||||
// foo(...any)
|
||||
context.report({
|
||||
node: argument,
|
||||
messageId: 'unsafeSpread',
|
||||
});
|
||||
}
|
||||
default: {
|
||||
const parameterType = signature.getNextParameterType();
|
||||
if (parameterType == null) {
|
||||
continue;
|
||||
else if ((0, util_1.isTypeAnyArrayType)(spreadArgType, checker)) {
|
||||
// foo(...any[])
|
||||
// TODO - we could break down the spread and compare the array type against each argument
|
||||
context.report({
|
||||
node: argument,
|
||||
messageId: 'unsafeArraySpread',
|
||||
});
|
||||
}
|
||||
else if (checker.isTupleType(spreadArgType)) {
|
||||
// foo(...[tuple1, tuple2])
|
||||
const spreadTypeArguments = checker.getTypeArguments(spreadArgType);
|
||||
for (const tupleType of spreadTypeArguments) {
|
||||
const parameterType = signature.getNextParameterType();
|
||||
if (parameterType == null) {
|
||||
continue;
|
||||
}
|
||||
const result = (0, util_1.isUnsafeAssignment)(tupleType, parameterType, checker,
|
||||
// we can't pass the individual tuple members in here as this will most likely be a spread variable
|
||||
// not a spread array
|
||||
null);
|
||||
if (result) {
|
||||
context.report({
|
||||
node: argument,
|
||||
messageId: 'unsafeTupleSpread',
|
||||
data: {
|
||||
sender: checker.typeToString(tupleType),
|
||||
receiver: checker.typeToString(parameterType),
|
||||
},
|
||||
});
|
||||
}
|
||||
}
|
||||
const argumentType = services.getTypeAtLocation(argument);
|
||||
const result = (0, util_1.isUnsafeAssignment)(argumentType, parameterType, checker, argument);
|
||||
if (result) {
|
||||
context.report({
|
||||
node: argument,
|
||||
messageId: 'unsafeArgument',
|
||||
data: {
|
||||
sender: checker.typeToString(argumentType),
|
||||
receiver: checker.typeToString(parameterType),
|
||||
},
|
||||
});
|
||||
if (spreadArgType.target.hasRestElement) {
|
||||
// the last element was a rest - so all remaining defined arguments can be considered "consumed"
|
||||
// all remaining arguments should be compared against the rest type (if one exists)
|
||||
signature.consumeRemainingArguments();
|
||||
}
|
||||
}
|
||||
else {
|
||||
// something that's iterable
|
||||
// handling this will be pretty complex - so we ignore it for now
|
||||
// TODO - handle generic iterable case
|
||||
}
|
||||
break;
|
||||
}
|
||||
default: {
|
||||
const parameterType = signature.getNextParameterType();
|
||||
if (parameterType == null) {
|
||||
continue;
|
||||
}
|
||||
const argumentType = services.getTypeAtLocation(argument);
|
||||
const result = (0, util_1.isUnsafeAssignment)(argumentType, parameterType, checker, argument);
|
||||
if (result) {
|
||||
context.report({
|
||||
node: argument,
|
||||
messageId: 'unsafeArgument',
|
||||
data: {
|
||||
sender: checker.typeToString(argumentType),
|
||||
receiver: checker.typeToString(parameterType),
|
||||
},
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return {
|
||||
'CallExpression, NewExpression'(node) {
|
||||
checkUnsafeArguments(node.arguments, node.callee, node);
|
||||
},
|
||||
TaggedTemplateExpression(node) {
|
||||
checkUnsafeArguments(node.quasi.expressions, node.tag, node);
|
||||
},
|
||||
};
|
||||
},
|
||||
|
|
2
node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unsafe-argument.js.map
сгенерированный
поставляемый
2
node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unsafe-argument.js.map
сгенерированный
поставляемый
Различия файлов скрыты, потому что одна или несколько строк слишком длинны
2
node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unsafe-return.js
сгенерированный
поставляемый
2
node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unsafe-return.js
сгенерированный
поставляемый
|
@ -90,7 +90,7 @@ exports.default = (0, util_1.createRule)({
|
|||
// If there is an explicit type annotation *and* that type matches the actual
|
||||
// function return type, we shouldn't complain (it's intentional, even if unsafe)
|
||||
if (functionTSNode.type) {
|
||||
for (const signature of functionType.getCallSignatures()) {
|
||||
for (const signature of tsutils.getCallSignaturesOfType(functionType)) {
|
||||
if (returnNodeType === signature.getReturnType() ||
|
||||
(0, util_1.isTypeFlagSet)(signature.getReturnType(), ts.TypeFlags.Any | ts.TypeFlags.Unknown)) {
|
||||
return;
|
||||
|
|
2
node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unsafe-return.js.map
сгенерированный
поставляемый
2
node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unsafe-return.js.map
сгенерированный
поставляемый
|
@ -1 +1 @@
|
|||
{"version":3,"file":"no-unsafe-return.js","sourceRoot":"","sources":["../../src/rules/no-unsafe-return.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AACA,oDAA0D;AAC1D,sDAAwC;AACxC,+CAAiC;AAEjC,kCAaiB;AAEjB,kBAAe,IAAA,iBAAU,EAAC;IACxB,IAAI,EAAE,kBAAkB;IACxB,IAAI,EAAE;QACJ,IAAI,EAAE,SAAS;QACf,IAAI,EAAE;YACJ,WAAW,EAAE,4DAA4D;YACzE,WAAW,EAAE,aAAa;YAC1B,oBAAoB,EAAE,IAAI;SAC3B;QACD,QAAQ,EAAE;YACR,YAAY,EAAE,6CAA6C;YAC3D,gBAAgB,EAAE;gBAChB,uEAAuE;gBACvE,2HAA2H;aAC5H,CAAC,IAAI,CAAC,IAAI,CAAC;YACZ,sBAAsB,EACpB,mFAAmF;SACtF;QACD,MAAM,EAAE,EAAE;KACX;IACD,cAAc,EAAE,EAAE;IAClB,MAAM,CAAC,OAAO;QACZ,MAAM,QAAQ,GAAG,IAAA,wBAAiB,EAAC,OAAO,CAAC,CAAC;QAC5C,MAAM,OAAO,GAAG,QAAQ,CAAC,OAAO,CAAC,cAAc,EAAE,CAAC;QAClD,MAAM,eAAe,GAAG,QAAQ,CAAC,OAAO,CAAC,kBAAkB,EAAE,CAAC;QAC9D,MAAM,gBAAgB,GAAG,OAAO,CAAC,6BAA6B,CAC5D,eAAe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C,CAAC,CAAC,OAAO;qBAChD;iBACF,CAAC,CAAC;YACL,CAAC;YAED,KAAK,MAAM,SAAS,IAAI,YAAY,CAAC,iBAAiB,EAAE,EAAE,CAAC;gBACzD,MAAM,kBAAkB,GAAG,SAAS,CAAC,aAAa,EAAE,CAAC;gBACrD,MAAM,MAAM,GAAG,IAAA,yBAAkB,EAC/B,cAAc,EACd,kBAAkB,EAClB,OAAO,EACP,UAAU,CACX,CAAC;gBACF,IAAI,CAAC,MAAM,EAAE,CAAC;oBACZ,OAAO;gBACT,CAAC;gBAED,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,GAAG,MAAM,CAAC;gBACpC,OAAO,OAAO,CAAC,MAAM,CAAC;oBACpB,IAAI,EAAE,aAAa;oBACnB,SAAS,EAAE,wBAAwB;oBACnC,IAAI,EAAE;wBACJ,MAAM,EAAE,OAAO,CAAC,YAAY,CAAC,MAAM,CAAC;wBACpC,QAAQ,EAAE,OAAO,CAAC,YAAY,CAAC,QAAQ,CAAC;qBACzC;iBACF,CAAC,CAAC;YACL,CAAC;QACH,CAAC;QAED,OAAO;YACL,eAAe,CAAC,IAAI;gBAClB,MAAM,QAAQ,GAAG,IAAI,CAAC,QAAQ,CAAC;gBAC/B,IAAI,CAAC,QAAQ,EAAE,CAAC;oBACd,OAAO;gBACT,CAAC;gBAED,WAAW,CAAC,QAAQ,EAAE,IAAI,CAAC,CAAC;YAC9B,CAAC;YACD,qDAAqD,EAAE,WAAW;SACnE,CAAC;IACJ,CAAC;CACF,CAAC,CAAC"}
|
16
node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unused-vars.js
сгенерированный
поставляемый
16
node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unused-vars.js
сгенерированный
поставляемый
|
@ -286,10 +286,20 @@ exports.default = (0, util_1.createRule)({
|
|||
if (unusedVar.defs.length > 0) {
|
||||
const writeReferences = unusedVar.references.filter(ref => ref.isWrite() &&
|
||||
ref.from.variableScope === unusedVar.scope.variableScope);
|
||||
const id = writeReferences.length
|
||||
? writeReferences[writeReferences.length - 1].identifier
|
||||
: unusedVar.identifiers[0];
|
||||
const { start } = id.loc;
|
||||
const idLength = id.name.length;
|
||||
const loc = {
|
||||
start,
|
||||
end: {
|
||||
line: start.line,
|
||||
column: start.column + idLength,
|
||||
},
|
||||
};
|
||||
context.report({
|
||||
node: writeReferences.length
|
||||
? writeReferences[writeReferences.length - 1].identifier
|
||||
: unusedVar.identifiers[0],
|
||||
loc,
|
||||
messageId: 'unusedVar',
|
||||
data: unusedVar.references.some(ref => ref.isWrite())
|
||||
? getAssignedMessageData(unusedVar)
|
||||
|
|
2
node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unused-vars.js.map
сгенерированный
поставляемый
2
node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unused-vars.js.map
сгенерированный
поставляемый
Различия файлов скрыты, потому что одна или несколько строк слишком длинны
18
node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-optional-chain-utils/analyzeChain.js
сгенерированный
поставляемый
18
node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-optional-chain-utils/analyzeChain.js
сгенерированный
поставляемый
|
@ -42,12 +42,20 @@ function includesType(parserServices, node, typeFlagIn) {
|
|||
}
|
||||
const analyzeAndChainOperand = (parserServices, operand, index, chain) => {
|
||||
switch (operand.comparisonType) {
|
||||
case "Boolean" /* NullishComparisonType.Boolean */:
|
||||
case "Boolean" /* NullishComparisonType.Boolean */: {
|
||||
const nextOperand = chain.at(index + 1);
|
||||
if (nextOperand?.comparisonType ===
|
||||
"NotStrictEqualNull" /* NullishComparisonType.NotStrictEqualNull */ &&
|
||||
operand.comparedName.type === utils_1.AST_NODE_TYPES.Identifier) {
|
||||
return null;
|
||||
}
|
||||
return [operand];
|
||||
}
|
||||
case "NotEqualNullOrUndefined" /* NullishComparisonType.NotEqualNullOrUndefined */:
|
||||
return [operand];
|
||||
case "NotStrictEqualNull" /* NullishComparisonType.NotStrictEqualNull */: {
|
||||
// handle `x !== null && x !== undefined`
|
||||
const nextOperand = chain[index + 1];
|
||||
const nextOperand = chain.at(index + 1);
|
||||
if (nextOperand?.comparisonType ===
|
||||
"NotStrictEqualUndefined" /* NullishComparisonType.NotStrictEqualUndefined */ &&
|
||||
(0, compareNodes_1.compareNodes)(operand.comparedName, nextOperand.comparedName) ===
|
||||
|
@ -64,7 +72,7 @@ const analyzeAndChainOperand = (parserServices, operand, index, chain) => {
|
|||
}
|
||||
case "NotStrictEqualUndefined" /* NullishComparisonType.NotStrictEqualUndefined */: {
|
||||
// handle `x !== undefined && x !== null`
|
||||
const nextOperand = chain[index + 1];
|
||||
const nextOperand = chain.at(index + 1);
|
||||
if (nextOperand?.comparisonType ===
|
||||
"NotStrictEqualNull" /* NullishComparisonType.NotStrictEqualNull */ &&
|
||||
(0, compareNodes_1.compareNodes)(operand.comparedName, nextOperand.comparedName) ===
|
||||
|
@ -90,7 +98,7 @@ const analyzeOrChainOperand = (parserServices, operand, index, chain) => {
|
|||
return [operand];
|
||||
case "StrictEqualNull" /* NullishComparisonType.StrictEqualNull */: {
|
||||
// handle `x === null || x === undefined`
|
||||
const nextOperand = chain[index + 1];
|
||||
const nextOperand = chain.at(index + 1);
|
||||
if (nextOperand?.comparisonType ===
|
||||
"StrictEqualUndefined" /* NullishComparisonType.StrictEqualUndefined */ &&
|
||||
(0, compareNodes_1.compareNodes)(operand.comparedName, nextOperand.comparedName) ===
|
||||
|
@ -107,7 +115,7 @@ const analyzeOrChainOperand = (parserServices, operand, index, chain) => {
|
|||
}
|
||||
case "StrictEqualUndefined" /* NullishComparisonType.StrictEqualUndefined */: {
|
||||
// handle `x === undefined || x === null`
|
||||
const nextOperand = chain[index + 1];
|
||||
const nextOperand = chain.at(index + 1);
|
||||
if (nextOperand?.comparisonType === "StrictEqualNull" /* NullishComparisonType.StrictEqualNull */ &&
|
||||
(0, compareNodes_1.compareNodes)(operand.comparedName, nextOperand.comparedName) ===
|
||||
"Equal" /* NodeComparisonResult.Equal */) {
|
||||
|
|
2
node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-optional-chain-utils/analyzeChain.js.map
сгенерированный
поставляемый
2
node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-optional-chain-utils/analyzeChain.js.map
сгенерированный
поставляемый
Различия файлов скрыты, потому что одна или несколько строк слишком длинны
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "@typescript-eslint/eslint-plugin",
|
||||
"version": "7.7.1",
|
||||
"version": "7.8.0",
|
||||
"description": "TypeScript plugin for ESLint",
|
||||
"files": [
|
||||
"dist",
|
||||
|
@ -62,10 +62,10 @@
|
|||
},
|
||||
"dependencies": {
|
||||
"@eslint-community/regexpp": "^4.10.0",
|
||||
"@typescript-eslint/scope-manager": "7.7.1",
|
||||
"@typescript-eslint/type-utils": "7.7.1",
|
||||
"@typescript-eslint/utils": "7.7.1",
|
||||
"@typescript-eslint/visitor-keys": "7.7.1",
|
||||
"@typescript-eslint/scope-manager": "7.8.0",
|
||||
"@typescript-eslint/type-utils": "7.8.0",
|
||||
"@typescript-eslint/utils": "7.8.0",
|
||||
"@typescript-eslint/visitor-keys": "7.8.0",
|
||||
"debug": "^4.3.4",
|
||||
"graphemer": "^1.4.0",
|
||||
"ignore": "^5.3.1",
|
||||
|
@ -78,8 +78,8 @@
|
|||
"@types/marked": "*",
|
||||
"@types/mdast": "^4.0.3",
|
||||
"@types/natural-compare": "*",
|
||||
"@typescript-eslint/rule-schema-to-typescript-types": "7.7.1",
|
||||
"@typescript-eslint/rule-tester": "7.7.1",
|
||||
"@typescript-eslint/rule-schema-to-typescript-types": "7.8.0",
|
||||
"@typescript-eslint/rule-tester": "7.8.0",
|
||||
"ajv": "^6.12.6",
|
||||
"chalk": "^5.3.0",
|
||||
"cross-env": "^7.0.3",
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "@typescript-eslint/parser",
|
||||
"version": "7.7.1",
|
||||
"version": "7.8.0",
|
||||
"description": "An ESLint custom parser which leverages TypeScript ESTree",
|
||||
"files": [
|
||||
"dist",
|
||||
|
@ -52,10 +52,10 @@
|
|||
"eslint": "^8.56.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"@typescript-eslint/scope-manager": "7.7.1",
|
||||
"@typescript-eslint/types": "7.7.1",
|
||||
"@typescript-eslint/typescript-estree": "7.7.1",
|
||||
"@typescript-eslint/visitor-keys": "7.7.1",
|
||||
"@typescript-eslint/scope-manager": "7.8.0",
|
||||
"@typescript-eslint/types": "7.8.0",
|
||||
"@typescript-eslint/typescript-estree": "7.8.0",
|
||||
"@typescript-eslint/visitor-keys": "7.8.0",
|
||||
"debug": "^4.3.4"
|
||||
},
|
||||
"devDependencies": {
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "@typescript-eslint/scope-manager",
|
||||
"version": "7.7.1",
|
||||
"version": "7.8.0",
|
||||
"description": "TypeScript scope analyser for ESLint",
|
||||
"files": [
|
||||
"dist",
|
||||
|
@ -46,12 +46,12 @@
|
|||
"typecheck": "npx nx typecheck"
|
||||
},
|
||||
"dependencies": {
|
||||
"@typescript-eslint/types": "7.7.1",
|
||||
"@typescript-eslint/visitor-keys": "7.7.1"
|
||||
"@typescript-eslint/types": "7.8.0",
|
||||
"@typescript-eslint/visitor-keys": "7.8.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/glob": "*",
|
||||
"@typescript-eslint/typescript-estree": "7.7.1",
|
||||
"@typescript-eslint/typescript-estree": "7.8.0",
|
||||
"glob": "*",
|
||||
"jest-specific-snapshot": "*",
|
||||
"make-dir": "*",
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
import * as ts from 'typescript';
|
||||
/*** Indicates whether identifiers require the use of quotation marks when accessing property definitions and dot notation. */
|
||||
declare function requiresQuoting(name: string, target?: ts.ScriptTarget): boolean;
|
||||
export { requiresQuoting };
|
||||
//# sourceMappingURL=requiresQuoting.d.ts.map
|
2
node_modules/@typescript-eslint/type-utils/dist/requiresQuoting.d.ts.map
сгенерированный
поставляемый
2
node_modules/@typescript-eslint/type-utils/dist/requiresQuoting.d.ts.map
сгенерированный
поставляемый
|
@ -1 +1 @@
|
|||
{"version":3,"file":"requiresQuoting.d.ts","sourceRoot":"","sources":["../src/requiresQuoting.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,YAAY,CAAC;AAEjC,iBAAS,eAAe,CACtB,IAAI,EAAE,MAAM,EACZ,MAAM,GAAE,EAAE,CAAC,YAAqC,GAC/C,OAAO,CAgBT;AAED,OAAO,EAAE,eAAe,EAAE,CAAC"}
|
||||
{"version":3,"file":"requiresQuoting.d.ts","sourceRoot":"","sources":["../src/requiresQuoting.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,YAAY,CAAC;AACjC,8HAA8H;AAC9H,iBAAS,eAAe,CACtB,IAAI,EAAE,MAAM,EACZ,MAAM,GAAE,EAAE,CAAC,YAAqC,GAC/C,OAAO,CAgBT;AAED,OAAO,EAAE,eAAe,EAAE,CAAC"}
|
|
@ -25,6 +25,7 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.requiresQuoting = void 0;
|
||||
const ts = __importStar(require("typescript"));
|
||||
/*** Indicates whether identifiers require the use of quotation marks when accessing property definitions and dot notation. */
|
||||
function requiresQuoting(name, target = ts.ScriptTarget.ESNext) {
|
||||
if (name.length === 0) {
|
||||
return true;
|
||||
|
|
2
node_modules/@typescript-eslint/type-utils/dist/requiresQuoting.js.map
сгенерированный
поставляемый
2
node_modules/@typescript-eslint/type-utils/dist/requiresQuoting.js.map
сгенерированный
поставляемый
|
@ -1 +1 @@
|
|||
{"version":3,"file":"requiresQuoting.js","sourceRoot":"","sources":["../src/requiresQuoting.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,+CAAiC;AAEjC,SAAS,eAAe,CACtB,IAAY,EACZ,SAA0B,EAAE,C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C;YACrD,OAAO,IAAI,CAAC;QACd,CAAC;IACH,CAAC;IAED,OAAO,KAAK,CAAC;AACf,CAAC;AAEQ,0CAAe"}
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "@typescript-eslint/type-utils",
|
||||
"version": "7.7.1",
|
||||
"version": "7.8.0",
|
||||
"description": "Type utilities for working with TypeScript + ESLint together",
|
||||
"files": [
|
||||
"dist",
|
||||
|
@ -46,13 +46,13 @@
|
|||
"typecheck": "tsc -p tsconfig.json --noEmit"
|
||||
},
|
||||
"dependencies": {
|
||||
"@typescript-eslint/typescript-estree": "7.7.1",
|
||||
"@typescript-eslint/utils": "7.7.1",
|
||||
"@typescript-eslint/typescript-estree": "7.8.0",
|
||||
"@typescript-eslint/utils": "7.8.0",
|
||||
"debug": "^4.3.4",
|
||||
"ts-api-utils": "^1.3.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@typescript-eslint/parser": "7.7.1",
|
||||
"@typescript-eslint/parser": "7.8.0",
|
||||
"ajv": "^6.12.6",
|
||||
"downlevel-dts": "*",
|
||||
"jest": "29.7.0",
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "@typescript-eslint/types",
|
||||
"version": "7.7.1",
|
||||
"version": "7.8.0",
|
||||
"description": "Types for the TypeScript-ESTree AST spec",
|
||||
"files": [
|
||||
"dist",
|
||||
|
|
2
node_modules/@typescript-eslint/typescript-estree/dist/clear-caches.d.ts.map
сгенерированный
поставляемый
2
node_modules/@typescript-eslint/typescript-estree/dist/clear-caches.d.ts.map
сгенерированный
поставляемый
|
@ -1 +1 @@
|
|||
{"version":3,"file":"clear-caches.d.ts","sourceRoot":"","sources":["../src/clear-caches.ts"],"names":[],"mappings":"AAQA;;;;;;GAMG;AACH,wBAAgB,WAAW,IAAI,IAAI,CAMlC;AAGD,eAAO,MAAM,iBAAiB,oBAAc,CAAC"}
|
||||
{"version":3,"file":"clear-caches.d.ts","sourceRoot":"","sources":["../src/clear-caches.ts"],"names":[],"mappings":"AAWA;;;;;;GAMG;AACH,wBAAgB,WAAW,IAAI,IAAI,CAOlC;AAGD,eAAO,MAAM,iBAAiB,oBAAc,CAAC"}
|
1
node_modules/@typescript-eslint/typescript-estree/dist/clear-caches.js
сгенерированный
поставляемый
1
node_modules/@typescript-eslint/typescript-estree/dist/clear-caches.js
сгенерированный
поставляемый
|
@ -13,6 +13,7 @@ const resolveProjectList_1 = require("./parseSettings/resolveProjectList");
|
|||
* - In custom lint tooling that iteratively lints one project at a time to prevent OOMs.
|
||||
*/
|
||||
function clearCaches() {
|
||||
(0, parser_1.clearDefaultProjectMatchedFiles)();
|
||||
(0, parser_1.clearProgramCache)();
|
||||
(0, getWatchProgramsForProjects_1.clearWatchCaches)();
|
||||
(0, createParseSettings_1.clearTSConfigMatchCache)();
|
||||
|
|
2
node_modules/@typescript-eslint/typescript-estree/dist/clear-caches.js.map
сгенерированный
поставляемый
2
node_modules/@typescript-eslint/typescript-estree/dist/clear-caches.js.map
сгенерированный
поставляемый
|
@ -1 +1 @@
|
|||
{"version":3,"file":"clear-caches.js","sourceRoot":"","sources":["../src/clear-caches.ts"],"names":[],"mappings":";;;AAAA,8FAAgF;AAChF,qCAA0E;AAC1E,6EAG6C;AAC7C,2EAAoE;AAEpE;;;;;;GAMG;AACH,SAAgB,WAAW;IACzB,IAAA,0BAAyB,GAAE,CAAC;IAC5B,IAAA,8CAAgB,GAAE,CAAC;IACnB,IAAA,6CAAuB,GAAE,CAAC;IAC1B,IAAA,iDAA2B,GAAE,CAAC;IAC9B,IAAA,mCAAc,GAAE,CAAC;AACnB,CAAC;AAND,kCAMC;AAED,mCAAmC;AACtB,QAAA,iBAAiB,GAAG,WAAW,CAAC"}
|
||||
{"version":3,"file":"clear-caches.js","sourceRoot":"","sources":["../src/clear-caches.ts"],"names":[],"mappings":";;;AAAA,8FAAgF;AAChF,qCAGkB;AAClB,6EAG6C;AAC7C,2EAAoE;AAEpE;;;;;;GAMG;AACH,SAAgB,WAAW;IACzB,IAAA,wCAA+B,GAAE,CAAC;IAClC,IAAA,0BAAyB,GAAE,CAAC;IAC5B,IAAA,8CAAgB,GAAE,CAAC;IACnB,IAAA,6CAAuB,GAAE,CAAC;IAC1B,IAAA,iDAA2B,GAAE,CAAC;IAC9B,IAAA,mCAAc,GAAE,CAAC;AACnB,CAAC;AAPD,kCAOC;AAED,mCAAmC;AACtB,QAAA,iBAAiB,GAAG,WAAW,CAAC"}
|
3
node_modules/@typescript-eslint/typescript-estree/dist/create-program/createProjectService.d.ts
сгенерированный
поставляемый
3
node_modules/@typescript-eslint/typescript-estree/dist/create-program/createProjectService.d.ts
сгенерированный
поставляемый
|
@ -3,7 +3,8 @@ import type { ProjectServiceOptions } from '../parser-options';
|
|||
export type TypeScriptProjectService = ts.server.ProjectService;
|
||||
export interface ProjectServiceSettings {
|
||||
allowDefaultProjectForFiles: string[] | undefined;
|
||||
maximumDefaultProjectFileMatchCount: number;
|
||||
service: TypeScriptProjectService;
|
||||
}
|
||||
export declare function createProjectService(options: boolean | ProjectServiceOptions | undefined, jsDocParsingMode: ts.JSDocParsingMode | undefined): ProjectServiceSettings;
|
||||
export declare function createProjectService(optionsRaw: boolean | ProjectServiceOptions | undefined, jsDocParsingMode: ts.JSDocParsingMode | undefined): ProjectServiceSettings;
|
||||
//# sourceMappingURL=createProjectService.d.ts.map
|
2
node_modules/@typescript-eslint/typescript-estree/dist/create-program/createProjectService.d.ts.map
сгенерированный
поставляемый
2
node_modules/@typescript-eslint/typescript-estree/dist/create-program/createProjectService.d.ts.map
сгенерированный
поставляемый
|
@ -1 +1 @@
|
|||
{"version":3,"file":"createProjectService.d.ts","sourceRoot":"","sources":["../../src/create-program/createProjectService.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,KAAK,EAAE,MAAM,gCAAgC,CAAC;AAE1D,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,mBAAmB,CAAC;AAQ/D,MAAM,MAAM,wBAAwB,GAAG,EAAE,CAAC,MAAM,CAAC,cAAc,CAAC;AAEhE,MAAM,WAAW,sBAAsB;IACrC,2BAA2B,EAAE,MAAM,EAAE,GAAG,SAAS,CAAC;IAClD,OAAO,EAAE,wBAAwB,CAAC;CACnC;AAED,wBAAgB,oBAAoB,CAClC,OAAO,EAAE,OAAO,GAAG,qBAAqB,GAAG,SAAS,EACpD,gBAAgB,EAAE,EAAE,CAAC,gBAAgB,GAAG,SAAS,GAChD,sBAAsB,CAkFxB"}
|
||||
{"version":3,"file":"createProjectService.d.ts","sourceRoot":"","sources":["../../src/create-program/createProjectService.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,KAAK,EAAE,MAAM,gCAAgC,CAAC;AAE1D,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,mBAAmB,CAAC;AAW/D,MAAM,MAAM,wBAAwB,GAAG,EAAE,CAAC,MAAM,CAAC,cAAc,CAAC;AAEhE,MAAM,WAAW,sBAAsB;IACrC,2BAA2B,EAAE,MAAM,EAAE,GAAG,SAAS,CAAC;IAClD,mCAAmC,EAAE,MAAM,CAAC;IAC5C,OAAO,EAAE,wBAAwB,CAAC;CACnC;AAED,wBAAgB,oBAAoB,CAClC,UAAU,EAAE,OAAO,GAAG,qBAAqB,GAAG,SAAS,EACvD,gBAAgB,EAAE,EAAE,CAAC,gBAAgB,GAAG,SAAS,GAChD,sBAAsB,CAqFxB"}
|
14
node_modules/@typescript-eslint/typescript-estree/dist/create-program/createProjectService.js
сгенерированный
поставляемый
14
node_modules/@typescript-eslint/typescript-estree/dist/create-program/createProjectService.js
сгенерированный
поставляемый
|
@ -6,11 +6,15 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|||
exports.createProjectService = void 0;
|
||||
/* eslint-disable @typescript-eslint/no-empty-function -- for TypeScript APIs*/
|
||||
const node_os_1 = __importDefault(require("node:os"));
|
||||
const validateDefaultProjectForFilesGlob_1 = require("./validateDefaultProjectForFilesGlob");
|
||||
const DEFAULT_PROJECT_MATCHED_FILES_THRESHOLD = 8;
|
||||
const doNothing = () => { };
|
||||
const createStubFileWatcher = () => ({
|
||||
close: doNothing,
|
||||
});
|
||||
function createProjectService(options, jsDocParsingMode) {
|
||||
function createProjectService(optionsRaw, jsDocParsingMode) {
|
||||
const options = typeof optionsRaw === 'object' ? optionsRaw : {};
|
||||
(0, validateDefaultProjectForFilesGlob_1.validateDefaultProjectForFilesGlob)(options);
|
||||
// We import this lazily to avoid its cost for users who don't use the service
|
||||
// TODO: Once we drop support for TS<5.3 we can import from "typescript" directly
|
||||
const tsserver = require('typescript/lib/tsserverlibrary');
|
||||
|
@ -46,7 +50,7 @@ function createProjectService(options, jsDocParsingMode) {
|
|||
session: undefined,
|
||||
jsDocParsingMode,
|
||||
});
|
||||
if (typeof options === 'object' && options.defaultProject) {
|
||||
if (options.defaultProject) {
|
||||
let configRead;
|
||||
try {
|
||||
configRead = tsserver.readConfigFile(options.defaultProject, system.readFile);
|
||||
|
@ -64,9 +68,9 @@ function createProjectService(options, jsDocParsingMode) {
|
|||
service.setCompilerOptionsForInferredProjects(configRead.config.compilerOptions);
|
||||
}
|
||||
return {
|
||||
allowDefaultProjectForFiles: typeof options === 'object'
|
||||
? options.allowDefaultProjectForFiles
|
||||
: undefined,
|
||||
allowDefaultProjectForFiles: options.allowDefaultProjectForFiles,
|
||||
maximumDefaultProjectFileMatchCount: options.maximumDefaultProjectFileMatchCount_THIS_WILL_SLOW_DOWN_LINTING ??
|
||||
DEFAULT_PROJECT_MATCHED_FILES_THRESHOLD,
|
||||
service,
|
||||
};
|
||||
}
|
||||
|
|
2
node_modules/@typescript-eslint/typescript-estree/dist/create-program/createProjectService.js.map
сгенерированный
поставляемый
2
node_modules/@typescript-eslint/typescript-estree/dist/create-program/createProjectService.js.map
сгенерированный
поставляемый
|
@ -1 +1 @@
|
|||
{"version":3,"file":"createProjectService.js","sourceRoot":"","sources":["../../src/create-program/createProjectService.ts"],"names":[],"mappings":";;;;;;AAAA,+EAA+E;AAC/E,sDAAyB;AAMzB,MAAM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,CAAC,cAAc,EACtB,MAAM,CAAC,QAAQ,CAChB,CAAC;QACJ,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,MAAM,IAAI,KAAK,CACb,oCAAoC,OAAO,CAAC,cAAc,MAAO,KAAe,CAAC,OAAO,EAAE,CAC3F,CAAC;QACJ,CAAC;QAED,IAAI,UAAU,CAAC,KAAK,EAAE,CAAC;YACrB,MAAM,IAAI,KAAK,CACb,mCAAmC,OAAO,CAAC,cAAc,MAAM,QAAQ,CAAC,gBAAgB,CACtF,UAAU,CAAC,KAAK,EAChB;gBACE,mBAAmB,EAAE,MAAM,CAAC,mBAAmB;gBAC/C,oBAAoB,EAAE,QAAQ,CAAC,EAAE,CAAC,QAAQ;gBAC1C,UAAU,EAAE,GAAG,EAAE,CAAC,iBAAE,CAAC,GAAG;aACzB,CACF,EAAE,CACJ,CAAC;QACJ,CAAC;QAED,OAAO,CAAC,qCAAqC,CAEzC,UAAU,CAAC,MAGZ,CAAC,eAAe,CAClB,CAAC;IACJ,CAAC;IAED,OAAO;QACL,2BAA2B,EACzB,OAAO,OAAO,KAAK,QAAQ;YACzB,CAAC,CAAC,OAAO,CAAC,2BAA2B;YACrC,CAAC,CAAC,SAAS;QACf,OAAO;KACR,CAAC;AACJ,CAAC;AArFD,oDAqFC"}
|
||||
{"version":3,"file":"createProjectService.js","sourceRoot":"","sources":["../../src/create-program/createProjectService.ts"],"names":[],"mappings":";;;;;;AAAA,+EAA+E;AAC/E,sDAAyB;AAKzB,6FAA0F;AAE1F,MAAM,uCAAuC,GAAG,CAAC,CAAC;AAElD,MAAM,SAAS,GAAG,GAAS,EAAE,GAAE,CAAC,CAAC;AAEjC,MAAM,qBAAqB,GAAG,GAAmB,EAAE,CAAC,CAAC;IACnD,KAAK,EAAE,SAAS;CACjB,CAAC,CAAC;AAUH,SAAgB,oBAAoB,CAClC,UAAuD,EACvD,gBAAiD;IAEjD,MAAM,OAAO,GAAG,OAAO,UAAU,KAAK,QAAQ,CAAC,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oC,OAAO,CAAC,cAAc,MAAO,KAAe,CAAC,OAAO,EAAE,CAC3F,CAAC;QACJ,CAAC;QAED,IAAI,UAAU,CAAC,KAAK,EAAE,CAAC;YACrB,MAAM,IAAI,KAAK,CACb,mCAAmC,OAAO,CAAC,cAAc,MAAM,QAAQ,CAAC,gBAAgB,CACtF,UAAU,CAAC,KAAK,EAChB;gBACE,mBAAmB,EAAE,MAAM,CAAC,mBAAmB;gBAC/C,oBAAoB,EAAE,QAAQ,CAAC,EAAE,CAAC,QAAQ;gBAC1C,UAAU,EAAE,GAAG,EAAE,CAAC,iBAAE,CAAC,GAAG;aACzB,CACF,EAAE,CACJ,CAAC;QACJ,CAAC;QAED,OAAO,CAAC,qCAAqC,CAEzC,UAAU,CAAC,MAGZ,CAAC,eAAe,CAClB,CAAC;IACJ,CAAC;IAED,OAAO;QACL,2BAA2B,EAAE,OAAO,CAAC,2BAA2B;QAChE,mCAAmC,EACjC,OAAO,CAAC,+DAA+D;YACvE,uCAAuC;QACzC,OAAO;KACR,CAAC;AACJ,CAAC;AAxFD,oDAwFC"}
|
4
node_modules/@typescript-eslint/typescript-estree/dist/create-program/validateDefaultProjectForFilesGlob.d.ts
сгенерированный
поставляемый
Normal file
4
node_modules/@typescript-eslint/typescript-estree/dist/create-program/validateDefaultProjectForFilesGlob.d.ts
сгенерированный
поставляемый
Normal file
|
@ -0,0 +1,4 @@
|
|||
import type { ProjectServiceOptions } from '../parser-options';
|
||||
export declare const DEFAULT_PROJECT_FILES_ERROR_EXPLANATION = "\n\nHaving many files run with the default project is known to cause performance issues and slow down linting.\n\nSee https://typescript-eslint.io/troubleshooting/#allowdefaultprojectforfiles-glob-too-wide\n";
|
||||
export declare function validateDefaultProjectForFilesGlob(options: ProjectServiceOptions): void;
|
||||
//# sourceMappingURL=validateDefaultProjectForFilesGlob.d.ts.map
|
1
node_modules/@typescript-eslint/typescript-estree/dist/create-program/validateDefaultProjectForFilesGlob.d.ts.map
сгенерированный
поставляемый
Normal file
1
node_modules/@typescript-eslint/typescript-estree/dist/create-program/validateDefaultProjectForFilesGlob.d.ts.map
сгенерированный
поставляемый
Normal file
|
@ -0,0 +1 @@
|
|||
{"version":3,"file":"validateDefaultProjectForFilesGlob.d.ts","sourceRoot":"","sources":["../../src/create-program/validateDefaultProjectForFilesGlob.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,mBAAmB,CAAC;AAE/D,eAAO,MAAM,uCAAuC,oNAKnD,CAAC;AAEF,wBAAgB,kCAAkC,CAChD,OAAO,EAAE,qBAAqB,GAC7B,IAAI,CAiBN"}
|
24
node_modules/@typescript-eslint/typescript-estree/dist/create-program/validateDefaultProjectForFilesGlob.js
сгенерированный
поставляемый
Normal file
24
node_modules/@typescript-eslint/typescript-estree/dist/create-program/validateDefaultProjectForFilesGlob.js
сгенерированный
поставляемый
Normal file
|
@ -0,0 +1,24 @@
|
|||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.validateDefaultProjectForFilesGlob = exports.DEFAULT_PROJECT_FILES_ERROR_EXPLANATION = void 0;
|
||||
exports.DEFAULT_PROJECT_FILES_ERROR_EXPLANATION = `
|
||||
|
||||
Having many files run with the default project is known to cause performance issues and slow down linting.
|
||||
|
||||
See https://typescript-eslint.io/troubleshooting/#allowdefaultprojectforfiles-glob-too-wide
|
||||
`;
|
||||
function validateDefaultProjectForFilesGlob(options) {
|
||||
if (!options.allowDefaultProjectForFiles?.length) {
|
||||
return;
|
||||
}
|
||||
for (const glob of options.allowDefaultProjectForFiles) {
|
||||
if (glob === '*') {
|
||||
throw new Error(`allowDefaultProjectForFiles contains the overly wide '*'.${exports.DEFAULT_PROJECT_FILES_ERROR_EXPLANATION}`);
|
||||
}
|
||||
if (glob.includes('**')) {
|
||||
throw new Error(`allowDefaultProjectForFiles glob '${glob}' contains a disallowed '**'.${exports.DEFAULT_PROJECT_FILES_ERROR_EXPLANATION}`);
|
||||
}
|
||||
}
|
||||
}
|
||||
exports.validateDefaultProjectForFilesGlob = validateDefaultProjectForFilesGlob;
|
||||
//# sourceMappingURL=validateDefaultProjectForFilesGlob.js.map
|
1
node_modules/@typescript-eslint/typescript-estree/dist/create-program/validateDefaultProjectForFilesGlob.js.map
сгенерированный
поставляемый
Normal file
1
node_modules/@typescript-eslint/typescript-estree/dist/create-program/validateDefaultProjectForFilesGlob.js.map
сгенерированный
поставляемый
Normal file
|
@ -0,0 +1 @@
|
|||
{"version":3,"file":"validateDefaultProjectForFilesGlob.js","sourceRoot":"","sources":["../../src/create-program/validateDefaultProjectForFilesGlob.ts"],"names":[],"mappings":";;;AAEa,QAAA,uCAAuC,GAAG;;;;;CAKtD,CAAC;AAEF,SAAgB,kCAAkC,CAChD,OAA8B;IAE9B,IAAI,CAAC,OAAO,CAAC,2BAA2B,EAAE,MAAM,EAAE,CAAC;QACjD,OAAO;IACT,CAAC;IAED,KAAK,MAAM,IAAI,IAAI,OAAO,CAAC,2BAA2B,EAAE,CAAC;QACvD,IAAI,IAAI,KAAK,GAAG,EAAE,CAAC;YACjB,MAAM,IAAI,KAAK,CACb,4DAA4D,+CAAuC,EAAE,CACtG,CAAC;QACJ,CAAC;QACD,IAAI,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC;YACxB,MAAM,IAAI,KAAK,CACb,qCAAqC,IAAI,gCAAgC,+CAAuC,EAAE,CACnH,CAAC;QACJ,CAAC;IACH,CAAC;AACH,CAAC;AAnBD,gFAmBC"}
|
8
node_modules/@typescript-eslint/typescript-estree/dist/parser-options.d.ts
сгенерированный
поставляемый
8
node_modules/@typescript-eslint/typescript-estree/dist/parser-options.d.ts
сгенерированный
поставляемый
|
@ -86,6 +86,14 @@ export interface ProjectServiceOptions {
|
|||
* Path to a TSConfig to use instead of TypeScript's default project configuration.
|
||||
*/
|
||||
defaultProject?: string;
|
||||
/**
|
||||
* The maximum number of files {@link allowDefaultProjectForFiles} may match.
|
||||
* Each file match slows down linting, so if you do need to use this, please
|
||||
* file an informative issue on typescript-eslint explaining why - so we can
|
||||
* help you avoid using it!
|
||||
* @default 8
|
||||
*/
|
||||
maximumDefaultProjectFileMatchCount_THIS_WILL_SLOW_DOWN_LINTING?: number;
|
||||
}
|
||||
interface ParseAndGenerateServicesOptions extends ParseOptions {
|
||||
/**
|
||||
|
|
2
node_modules/@typescript-eslint/typescript-estree/dist/parser-options.d.ts.map
сгенерированный
поставляемый
2
node_modules/@typescript-eslint/typescript-estree/dist/parser-options.d.ts.map
сгенерированный
поставляемый
|
@ -1 +1 @@
|
|||
{"version":3,"file":"parser-options.d.ts","sourceRoot":"","sources":["../src/parser-options.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,oBAAoB,EACpB,UAAU,EACV,gBAAgB,EACjB,MAAM,0BAA0B,CAAC;AAClC,OAAO,KAAK,KAAK,EAAE,MAAM,YAAY,CAAC;AAEtC,OAAO,KAAK,EAAE,QAAQ,EAAE,gBAAgB,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AAM/E,UAAU,YAAY;IACpB;;;OAGG;IACH,eAAe,CAAC,EAAE,OAAO,CAAC;IAE1B;;OAEG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAElB;;;;;;;;;OASG;IACH,UAAU,CAAC,EAAE,UAAU,CAAC;IAExB;;;OAGG;IACH,qBAAqB,CAAC,EAAE,OAAO,CAAC;IAEhC;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAElB;;;;;;;;;OASG;IACH,gBAAgB,CAAC,EAAE,gBAAgB,CAAC;IAEpC;;;;;;;;OAQG;IACH,GAAG,CAAC,EAAE,OAAO,CAAC;IAEd;;;;OAIG;IACH,GAAG,CAAC,EAAE,OAAO,CAAC;IAOd,QAAQ,CAAC,EAAE,KAAK,GAAG,CAAC,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC,CAAC;IAE/C;;;;OAIG;IACH,KAAK,CAAC,EAAE,OAAO,CAA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,GAAG,OAAO,CAAC;CAC5B;AAED,MAAM,WAAW,kBAAkB;IACjC,qBAAqB,EAAE,OAAO,GAAG,SAAS,CAAC;IAC3C,sBAAsB,EAAE,OAAO,GAAG,SAAS,CAAC;CAC7C;AACD,MAAM,WAAW,sBAAsB;IACrC,qBAAqB,EAAE,2BAA2B,CAAC;IACnD,qBAAqB,EAAE,aAAa,CAAC,MAAM,GAAG,OAAO,EAAE,QAAQ,CAAC,IAAI,CAAC,CAAC;CACvE;AACD,MAAM,WAAW,iCACf,SAAQ,sBAAsB,EAC5B,kBAAkB;IACpB,OAAO,EAAE,EAAE,CAAC,OAAO,CAAC;IACpB,mBAAmB,EAAE,CAAC,IAAI,EAAE,QAAQ,CAAC,IAAI,KAAK,EAAE,CAAC,MAAM,GAAG,SAAS,CAAC;IACpE,iBAAiB,EAAE,CAAC,IAAI,EAAE,QAAQ,CAAC,IAAI,KAAK,EAAE,CAAC,IAAI,CAAC;CACrD;AACD,MAAM,WAAW,oCACf,SAAQ,sBAAsB,EAC5B,kBAAkB;IACpB,OAAO,EAAE,IAAI,CAAC;CACf;AACD,MAAM,MAAM,cAAc,GACtB,oCAAoC,GACpC,iCAAiC,CAAC"}
|
|
@ -2,6 +2,7 @@ import type * as ts from 'typescript';
|
|||
import type { ParserServices, TSESTreeOptions } from './parser-options';
|
||||
import type { TSESTree } from './ts-estree';
|
||||
declare function clearProgramCache(): void;
|
||||
declare function clearDefaultProjectMatchedFiles(): void;
|
||||
interface EmptyObject {
|
||||
}
|
||||
type AST<T extends TSESTreeOptions> = TSESTree.Program & (T['comment'] extends true ? {
|
||||
|
@ -16,5 +17,5 @@ interface ParseAndGenerateServicesResult<T extends TSESTreeOptions> {
|
|||
declare function parse<T extends TSESTreeOptions = TSESTreeOptions>(code: string, options?: T): AST<T>;
|
||||
declare function clearParseAndGenerateServicesCalls(): void;
|
||||
declare function parseAndGenerateServices<T extends TSESTreeOptions = TSESTreeOptions>(code: ts.SourceFile | string, options: T): ParseAndGenerateServicesResult<T>;
|
||||
export { AST, parse, parseAndGenerateServices, ParseAndGenerateServicesResult, clearProgramCache, clearParseAndGenerateServicesCalls, };
|
||||
export { AST, parse, parseAndGenerateServices, ParseAndGenerateServicesResult, clearDefaultProjectMatchedFiles, clearProgramCache, clearParseAndGenerateServicesCalls, };
|
||||
//# sourceMappingURL=parser.d.ts.map
|
2
node_modules/@typescript-eslint/typescript-estree/dist/parser.d.ts.map
сгенерированный
поставляемый
2
node_modules/@typescript-eslint/typescript-estree/dist/parser.d.ts.map
сгенерированный
поставляемый
|
@ -1 +1 @@
|
|||
{"version":3,"file":"parser.d.ts","sourceRoot":"","sources":["../src/parser.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,KAAK,EAAE,MAAM,YAAY,CAAC;AAkBtC,OAAO,KAAK,EACV,cAAc,EAEd,eAAe,EAChB,MAAM,kBAAkB,CAAC;AAI1B,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAW5C,iBAAS,iBAAiB,IAAI,IAAI,CAEjC;AA2DD,UAAU,WAAW;CAAG;AACxB,KAAK,GAAG,CAAC,CAAC,SAAS,eAAe,IAAI,QAAQ,CAAC,OAAO,GACpD,CAAC,CAAC,CAAC,SAAS,CAAC,SAAS,IAAI,GAAG;IAAE,QAAQ,EAAE,QAAQ,CAAC,OAAO,EAAE,CAAA;CAAE,GAAG,WAAW,CAAC,GAC5E,CAAC,CAAC,CAAC,QAAQ,CAAC,SAAS,IAAI,GAAG;IAAE,MAAM,EAAE,QAAQ,CAAC,KAAK,EAAE,CAAA;CAAE,GAAG,WAAW,CAAC,CAAC;AAE1E,UAAU,8BAA8B,CAAC,CAAC,SAAS,eAAe;IAChE,GAAG,EAAE,GAAG,CAAC,CAAC,CAAC,CAAC;IACZ,QAAQ,EAAE,cAAc,CAAC;CAC1B;AAMD,iBAAS,KAAK,CAAC,CAAC,SAAS,eAAe,GAAG,eAAe,EACxD,IAAI,EAAE,MAAM,EACZ,OAAO,CAAC,E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EACxD,IAAI,EAAE,MAAM,EACZ,OAAO,CAAC,EAAE,CAAC,GACV,GAAG,CAAC,CAAC,CAAC,CAGR;AA4CD,iBAAS,kCAAkC,IAAI,IAAI,CAElD;AAED,iBAAS,wBAAwB,CAAC,CAAC,SAAS,eAAe,GAAG,eAAe,EAC3E,IAAI,EAAE,EAAE,CAAC,UAAU,GAAG,MAAM,EAC5B,OAAO,EAAE,CAAC,GACT,8BAA8B,CAAC,CAAC,CAAC,CA+GnC;AAED,OAAO,EACL,GAAG,EACH,KAAK,EACL,wBAAwB,EACxB,8BAA8B,EAC9B,+BAA+B,EAC/B,iBAAiB,EACjB,kCAAkC,GACnC,CAAC"}
|
|
@ -3,7 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|||
return (mod && mod.__esModule) ? mod : { "default": mod };
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.clearParseAndGenerateServicesCalls = exports.clearProgramCache = exports.parseAndGenerateServices = exports.parse = void 0;
|
||||
exports.clearParseAndGenerateServicesCalls = exports.clearProgramCache = exports.clearDefaultProjectMatchedFiles = exports.parseAndGenerateServices = exports.parse = void 0;
|
||||
const debug_1 = __importDefault(require("debug"));
|
||||
const ast_converter_1 = require("./ast-converter");
|
||||
const convert_1 = require("./convert");
|
||||
|
@ -28,6 +28,11 @@ function clearProgramCache() {
|
|||
existingPrograms.clear();
|
||||
}
|
||||
exports.clearProgramCache = clearProgramCache;
|
||||
const defaultProjectMatchedFiles = new Set();
|
||||
function clearDefaultProjectMatchedFiles() {
|
||||
defaultProjectMatchedFiles.clear();
|
||||
}
|
||||
exports.clearDefaultProjectMatchedFiles = clearDefaultProjectMatchedFiles;
|
||||
/**
|
||||
* @param parseSettings Internal settings for parsing the file
|
||||
* @param hasFullTypeInformation True if the program should be attempted to be calculated from provided tsconfig files
|
||||
|
@ -35,7 +40,7 @@ exports.clearProgramCache = clearProgramCache;
|
|||
*/
|
||||
function getProgramAndAST(parseSettings, hasFullTypeInformation) {
|
||||
if (parseSettings.EXPERIMENTAL_projectService) {
|
||||
const fromProjectService = (0, useProgramFromProjectService_1.useProgramFromProjectService)(parseSettings.EXPERIMENTAL_projectService, parseSettings, hasFullTypeInformation);
|
||||
const fromProjectService = (0, useProgramFromProjectService_1.useProgramFromProjectService)(parseSettings.EXPERIMENTAL_projectService, parseSettings, hasFullTypeInformation, defaultProjectMatchedFiles);
|
||||
if (fromProjectService) {
|
||||
return fromProjectService;
|
||||
}
|
||||
|
|
|
@ -1 +1 @@
|
|||
{"version":3,"file":"parser.js","sourceRoot":"","sources":["../src/parser.ts"],"names":[],"mappings":";;;;;;AAAA,kDAA0B;AAG1B,mDAA+C;AAC/C,uCAAyC;AACzC,gFAA6E;AAC7E,kFAA+E;AAC/E,gFAA6E;AAC7E,wEAG2C;AAC3C,8FAA2F;AAE3F,8EAG8C;AAC9C,iEAA8D;AAO9D,6EAA0E;AAC1E,iFAAkF;AAElF,iFAA8E;AAE9E,MAAM,GAAG,GAAG,IAAA,eAAK,EAAC,4CAA4C,CAAC,CAAC;AAEhE;;;;GAIG;AACH,MAAM,gBAAgB,GAAG,IAAI,GAAG,EAA6B,CAAC;AAC9D,SAAS,iBAAiB;IACxB,gBAAgB,CAAC,KAAK,EAAE,CAAC;AAC3B,CAAC;AAwPC,8CAAiB;AAtPnB;;;;GAIG;AACH,SAAS,gBAAgB,CACvB,aAA4B,EAC5B,sBAA+B;IAE/B,IAAI,aAAa,CAAC,2BAA2B,EAAE,CAAC;QAC9C,MAAM,kBAAkB,GAAG,IAAA,2DAA4B,EACrD,aAAa,CAAC,2BAA2B,EACzC,aAAa,EACb,sBAAsB,CACvB,CAAC;QACF,IAAI,kBAAkB,EAAE,CAAC;YACvB,OAAO,kBAAkB,CAAC;QAC5B,CAAC;IACH,CAAC;IAED,IAAI,aAAa,CAAC,QAAQ,EAAE,CAAC;QAC3B,MAAM,oBAAoB,GAAG,IAAA,yCAAmB,EAC9C,aAAa,CAAC,QAAQ,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BAAsB,CACvB,CAAC;IAEF;;;OAGG;IACH,IAAI,OAAO,IAAI,aAAa,CAAC,2CAA2C,EAAE,CAAC;QACzE,MAAM,KAAK,GAAG,IAAA,+DAAgC,EAAC,OAAO,EAAE,GAAG,CAAC,CAAC;QAC7D,IAAI,KAAK,EAAE,CAAC;YACV,MAAM,IAAA,sBAAY,EAAC,KAAK,CAAC,CAAC;QAC5B,CAAC;IACH,CAAC;IAED;;OAEG;IACH,OAAO;QACL,GAAG,EAAE,MAAgB;QACrB,QAAQ,EAAE,IAAA,2CAAoB,EAAC,OAAO,EAAE,OAAO,CAAC;KACjD,CAAC;AACJ,CAAC;AAKC,4DAAwB"}
|
2
node_modules/@typescript-eslint/typescript-estree/dist/useProgramFromProjectService.d.ts
сгенерированный
поставляемый
2
node_modules/@typescript-eslint/typescript-estree/dist/useProgramFromProjectService.d.ts
сгенерированный
поставляемый
|
@ -1,5 +1,5 @@
|
|||
import type { ProjectServiceSettings } from './create-program/createProjectService';
|
||||
import type { ASTAndDefiniteProgram } from './create-program/shared';
|
||||
import type { MutableParseSettings } from './parseSettings';
|
||||
export declare function useProgramFromProjectService({ allowDefaultProjectForFiles, service }: ProjectServiceSettings, parseSettings: Readonly<MutableParseSettings>, hasFullTypeInformation: boolean): ASTAndDefiniteProgram | undefined;
|
||||
export declare function useProgramFromProjectService({ allowDefaultProjectForFiles, maximumDefaultProjectFileMatchCount, service, }: ProjectServiceSettings, parseSettings: Readonly<MutableParseSettings>, hasFullTypeInformation: boolean, defaultProjectMatchedFiles: Set<string>): ASTAndDefiniteProgram | undefined;
|
||||
//# sourceMappingURL=useProgramFromProjectService.d.ts.map
|
2
node_modules/@typescript-eslint/typescript-estree/dist/useProgramFromProjectService.d.ts.map
сгенерированный
поставляемый
2
node_modules/@typescript-eslint/typescript-estree/dist/useProgramFromProjectService.d.ts.map
сгенерированный
поставляемый
|
@ -1 +1 @@
|
|||
{"version":3,"file":"useProgramFromProjectService.d.ts","sourceRoot":"","sources":["../src/useProgramFromProjectService.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,uCAAuC,CAAC;AACpF,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AACrE,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,iBAAiB,CAAC;AAM5D,wBAAgB,4BAA4B,CAC1C,EAAE,2BAA2B,EAAE,OAAO,EAAE,EAAE,sBAAsB,EAChE,aAAa,EAAE,QAAQ,CAAC,oBAAoB,CAAC,EAC7C,sBAAsB,EAAE,OAAO,GAC9B,qBAAqB,GAAG,SAAS,CAuEnC"}
|
||||
{"version":3,"file":"useProgramFromProjectService.d.ts","sourceRoot":"","sources":["../src/useProgramFromProjectService.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,uCAAuC,CAAC;AACpF,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAErE,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,iBAAiB,CAAC;AAM5D,wBAAgB,4BAA4B,CAC1C,EACE,2BAA2B,EAC3B,mCAAmC,EACnC,OAAO,GACR,EAAE,sBAAsB,EACzB,aAAa,EAAE,QAAQ,CAAC,oBAAoB,CAAC,EAC7C,sBAAsB,EAAE,OAAO,EAC/B,0BAA0B,EAAE,GAAG,CAAC,MAAM,CAAC,GACtC,qBAAqB,GAAG,SAAS,CAqFnC"}
|
14
node_modules/@typescript-eslint/typescript-estree/dist/useProgramFromProjectService.js
сгенерированный
поставляемый
14
node_modules/@typescript-eslint/typescript-estree/dist/useProgramFromProjectService.js
сгенерированный
поставляемый
|
@ -8,8 +8,9 @@ const debug_1 = __importDefault(require("debug"));
|
|||
const minimatch_1 = require("minimatch");
|
||||
const path_1 = __importDefault(require("path"));
|
||||
const createProjectProgram_1 = require("./create-program/createProjectProgram");
|
||||
const validateDefaultProjectForFilesGlob_1 = require("./create-program/validateDefaultProjectForFilesGlob");
|
||||
const log = (0, debug_1.default)('typescript-eslint:typescript-estree:useProgramFromProjectService');
|
||||
function useProgramFromProjectService({ allowDefaultProjectForFiles, service }, parseSettings, hasFullTypeInformation) {
|
||||
function useProgramFromProjectService({ allowDefaultProjectForFiles, maximumDefaultProjectFileMatchCount, service, }, parseSettings, hasFullTypeInformation, defaultProjectMatchedFiles) {
|
||||
// We don't canonicalize the filename because it caused a performance regression.
|
||||
// See https://github.com/typescript-eslint/typescript-eslint/issues/8519
|
||||
const filePathAbsolute = absolutify(parseSettings.filePath);
|
||||
|
@ -42,6 +43,17 @@ function useProgramFromProjectService({ allowDefaultProjectForFiles, service },
|
|||
log('Could not find project service program for: %s', filePathAbsolute);
|
||||
return undefined;
|
||||
}
|
||||
defaultProjectMatchedFiles.add(filePathAbsolute);
|
||||
if (defaultProjectMatchedFiles.size > maximumDefaultProjectFileMatchCount) {
|
||||
throw new Error(`Too many files (>${maximumDefaultProjectFileMatchCount}) have matched the default project.${validateDefaultProjectForFilesGlob_1.DEFAULT_PROJECT_FILES_ERROR_EXPLANATION}
|
||||
Matching files:
|
||||
${Array.from(defaultProjectMatchedFiles)
|
||||
.map(file => `- ${file}`)
|
||||
.join('\n')}
|
||||
|
||||
If you absolutely need more files included, set parserOptions.EXPERIMENTAL_useProjectService.maximumDefaultProjectFileMatchCount_THIS_WILL_SLOW_DOWN_LINTING to a larger value.
|
||||
`);
|
||||
}
|
||||
log('Found project service program for: %s', filePathAbsolute);
|
||||
return (0, createProjectProgram_1.createProjectProgram)(parseSettings, [program]);
|
||||
function absolutify(filePath) {
|
||||
|
|
2
node_modules/@typescript-eslint/typescript-estree/dist/useProgramFromProjectService.js.map
сгенерированный
поставляемый
2
node_modules/@typescript-eslint/typescript-estree/dist/useProgramFromProjectService.js.map
сгенерированный
поставляемый
|
@ -1 +1 @@
|
|||
{"version":3,"file":"useProgramFromProjectService.js","sourceRoot":"","sources":["../src/useProgramFromProjectService.ts"],"names":[],"mappings":";;;;;;AAAA,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A parser that converts TypeScript source code into an ESTree compatible form",
|
||||
"files": [
|
||||
"dist",
|
||||
|
@ -54,8 +54,8 @@
|
|||
"typecheck": "tsc -p tsconfig.json --noEmit"
|
||||
},
|
||||
"dependencies": {
|
||||
"@typescript-eslint/types": "7.7.1",
|
||||
"@typescript-eslint/visitor-keys": "7.7.1",
|
||||
"@typescript-eslint/types": "7.8.0",
|
||||
"@typescript-eslint/visitor-keys": "7.8.0",
|
||||
"debug": "^4.3.4",
|
||||
"globby": "^11.1.0",
|
||||
"is-glob": "^4.0.3",
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
export * from './applyDefault';
|
||||
export * from './context';
|
||||
export * from './getParserServices';
|
||||
export * from './InferTypesFromRule';
|
||||
export * from './RuleCreator';
|
||||
|
|
2
node_modules/@typescript-eslint/utils/dist/eslint-utils/index.d.ts.map
сгенерированный
поставляемый
2
node_modules/@typescript-eslint/utils/dist/eslint-utils/index.d.ts.map
сгенерированный
поставляемый
|
@ -1 +1 @@
|
|||
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/eslint-utils/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAC;AAC/B,cAAc,qBAAqB,CAAC;AACpC,cAAc,sBAAsB,CAAC;AACrC,cAAc,eAAe,CAAC;AAC9B,cAAc,aAAa,CAAC;AAC5B,cAAc,cAAc,CAAC"}
|
||||
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/eslint-utils/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAC;AAC/B,cAAc,WAAW,CAAC;AAC1B,cAAc,qBAAqB,CAAC;AACpC,cAAc,sBAAsB,CAAC;AACrC,cAAc,eAAe,CAAC;AAC9B,cAAc,aAAa,CAAC;AAC5B,cAAc,cAAc,CAAC"}
|
|
@ -15,6 +15,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
__exportStar(require("./applyDefault"), exports);
|
||||
__exportStar(require("./context"), exports);
|
||||
__exportStar(require("./getParserServices"), exports);
|
||||
__exportStar(require("./InferTypesFromRule"), exports);
|
||||
__exportStar(require("./RuleCreator"), exports);
|
||||
|
|
|
@ -1 +1 @@
|
|||
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/eslint-utils/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,iDAA+B;AAC/B,sDAAoC;AACpC,uDAAqC;AACrC,gDAA8B;AAC9B,8CAA4B;AAC5B,+CAA6B"}
|
||||
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/eslint-utils/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,iDAA+B;AAC/B,4CAA0B;AAC1B,sDAAoC;AACpC,uDAAqC;AACrC,gDAA8B;AAC9B,8CAA4B;AAC5B,+CAA6B"}
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "@typescript-eslint/utils",
|
||||
"version": "7.7.1",
|
||||
"version": "7.8.0",
|
||||
"description": "Utilities for working with TypeScript + ESLint together",
|
||||
"files": [
|
||||
"dist",
|
||||
|
@ -70,16 +70,16 @@
|
|||
"@eslint-community/eslint-utils": "^4.4.0",
|
||||
"@types/json-schema": "^7.0.15",
|
||||
"@types/semver": "^7.5.8",
|
||||
"@typescript-eslint/scope-manager": "7.7.1",
|
||||
"@typescript-eslint/types": "7.7.1",
|
||||
"@typescript-eslint/typescript-estree": "7.7.1",
|
||||
"@typescript-eslint/scope-manager": "7.8.0",
|
||||
"@typescript-eslint/types": "7.8.0",
|
||||
"@typescript-eslint/typescript-estree": "7.8.0",
|
||||
"semver": "^7.6.0"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"eslint": "^8.56.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@typescript-eslint/parser": "7.7.1",
|
||||
"@typescript-eslint/parser": "7.8.0",
|
||||
"downlevel-dts": "*",
|
||||
"jest": "29.7.0",
|
||||
"prettier": "^3.2.5",
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "@typescript-eslint/visitor-keys",
|
||||
"version": "7.7.1",
|
||||
"version": "7.8.0",
|
||||
"description": "Visitor keys used to help traverse the TypeScript-ESTree AST",
|
||||
"files": [
|
||||
"dist",
|
||||
|
@ -47,7 +47,7 @@
|
|||
"typecheck": "tsc -p tsconfig.json --noEmit"
|
||||
},
|
||||
"dependencies": {
|
||||
"@typescript-eslint/types": "7.7.1",
|
||||
"@typescript-eslint/types": "7.8.0",
|
||||
"eslint-visitor-keys": "^3.4.3"
|
||||
},
|
||||
"devDependencies": {
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
{
|
||||
"name": "codeql",
|
||||
"version": "3.25.3",
|
||||
"version": "3.25.4",
|
||||
"lockfileVersion": 3,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "codeql",
|
||||
"version": "3.25.3",
|
||||
"version": "3.25.4",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@actions/artifact": "^1.1.2",
|
||||
|
@ -45,8 +45,8 @@
|
|||
"@types/node": "20.9.0",
|
||||
"@types/semver": "^7.5.8",
|
||||
"@types/sinon": "^17.0.3",
|
||||
"@typescript-eslint/eslint-plugin": "^7.7.1",
|
||||
"@typescript-eslint/parser": "^7.7.1",
|
||||
"@typescript-eslint/eslint-plugin": "^7.8.0",
|
||||
"@typescript-eslint/parser": "^7.8.0",
|
||||
"ava": "^5.3.1",
|
||||
"eslint": "^8.57.0",
|
||||
"eslint-import-resolver-typescript": "^3.6.1",
|
||||
|
@ -1017,16 +1017,16 @@
|
|||
"integrity": "sha512-jg+97EGIcY9AGHJJRaaPVgetKDsrTgbRjQ5Msgjh/DQKEFl0DtyRr/VCOyD1T2R1MNeWPK/u7JoGhlDZnKBAfA=="
|
||||
},
|
||||
"node_modules/@typescript-eslint/eslint-plugin": {
|
||||
"version": "7.7.1",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-7.7.1.tgz",
|
||||
"integrity": "sha512-KwfdWXJBOviaBVhxO3p5TJiLpNuh2iyXyjmWN0f1nU87pwyvfS0EmjC6ukQVYVFJd/K1+0NWGPDXiyEyQorn0Q==",
|
||||
"version": "7.8.0",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-7.8.0.tgz",
|
||||
"integrity": "sha512-gFTT+ezJmkwutUPmB0skOj3GZJtlEGnlssems4AjkVweUPGj7jRwwqg0Hhg7++kPGJqKtTYx+R05Ftww372aIg==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"@eslint-community/regexpp": "^4.10.0",
|
||||
"@typescript-eslint/scope-manager": "7.7.1",
|
||||
"@typescript-eslint/type-utils": "7.7.1",
|
||||
"@typescript-eslint/utils": "7.7.1",
|
||||
"@typescript-eslint/visitor-keys": "7.7.1",
|
||||
"@typescript-eslint/scope-manager": "7.8.0",
|
||||
"@typescript-eslint/type-utils": "7.8.0",
|
||||
"@typescript-eslint/utils": "7.8.0",
|
||||
"@typescript-eslint/visitor-keys": "7.8.0",
|
||||
"debug": "^4.3.4",
|
||||
"graphemer": "^1.4.0",
|
||||
"ignore": "^5.3.1",
|
||||
|
@ -1052,15 +1052,15 @@
|
|||
}
|
||||
},
|
||||
"node_modules/@typescript-eslint/parser": {
|
||||
"version": "7.7.1",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-7.7.1.tgz",
|
||||
"integrity": "sha512-vmPzBOOtz48F6JAGVS/kZYk4EkXao6iGrD838sp1w3NQQC0W8ry/q641KU4PrG7AKNAf56NOcR8GOpH8l9FPCw==",
|
||||
"version": "7.8.0",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-7.8.0.tgz",
|
||||
"integrity": "sha512-KgKQly1pv0l4ltcftP59uQZCi4HUYswCLbTqVZEJu7uLX8CTLyswqMLqLN+2QFz4jCptqWVV4SB7vdxcH2+0kQ==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"@typescript-eslint/scope-manager": "7.7.1",
|
||||
"@typescript-eslint/types": "7.7.1",
|
||||
"@typescript-eslint/typescript-estree": "7.7.1",
|
||||
"@typescript-eslint/visitor-keys": "7.7.1",
|
||||
"@typescript-eslint/scope-manager": "7.8.0",
|
||||
"@typescript-eslint/types": "7.8.0",
|
||||
"@typescript-eslint/typescript-estree": "7.8.0",
|
||||
"@typescript-eslint/visitor-keys": "7.8.0",
|
||||
"debug": "^4.3.4"
|
||||
},
|
||||
"engines": {
|
||||
|
@ -1080,13 +1080,13 @@
|
|||
}
|
||||
},
|
||||
"node_modules/@typescript-eslint/scope-manager": {
|
||||
"version": "7.7.1",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-7.7.1.tgz",
|
||||
"integrity": "sha512-PytBif2SF+9SpEUKynYn5g1RHFddJUcyynGpztX3l/ik7KmZEv19WCMhUBkHXPU9es/VWGD3/zg3wg90+Dh2rA==",
|
||||
"version": "7.8.0",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-7.8.0.tgz",
|
||||
"integrity": "sha512-viEmZ1LmwsGcnr85gIq+FCYI7nO90DVbE37/ll51hjv9aG+YZMb4WDE2fyWpUR4O/UrhGRpYXK/XajcGTk2B8g==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"@typescript-eslint/types": "7.7.1",
|
||||
"@typescript-eslint/visitor-keys": "7.7.1"
|
||||
"@typescript-eslint/types": "7.8.0",
|
||||
"@typescript-eslint/visitor-keys": "7.8.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": "^18.18.0 || >=20.0.0"
|
||||
|
@ -1097,13 +1097,13 @@
|
|||
}
|
||||
},
|
||||
"node_modules/@typescript-eslint/type-utils": {
|
||||
"version": "7.7.1",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-7.7.1.tgz",
|
||||
"integrity": "sha512-ZksJLW3WF7o75zaBPScdW1Gbkwhd/lyeXGf1kQCxJaOeITscoSl0MjynVvCzuV5boUz/3fOI06Lz8La55mu29Q==",
|
||||
"version": "7.8.0",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-7.8.0.tgz",
|
||||
"integrity": "sha512-H70R3AefQDQpz9mGv13Uhi121FNMh+WEaRqcXTX09YEDky21km4dV1ZXJIp8QjXc4ZaVkXVdohvWDzbnbHDS+A==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"@typescript-eslint/typescript-estree": "7.7.1",
|
||||
"@typescript-eslint/utils": "7.7.1",
|
||||
"@typescript-eslint/typescript-estree": "7.8.0",
|
||||
"@typescript-eslint/utils": "7.8.0",
|
||||
"debug": "^4.3.4",
|
||||
"ts-api-utils": "^1.3.0"
|
||||
},
|
||||
|
@ -1124,9 +1124,9 @@
|
|||
}
|
||||
},
|
||||
"node_modules/@typescript-eslint/types": {
|
||||
"version": "7.7.1",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-7.7.1.tgz",
|
||||
"integrity": "sha512-AmPmnGW1ZLTpWa+/2omPrPfR7BcbUU4oha5VIbSbS1a1Tv966bklvLNXxp3mrbc+P2j4MNOTfDffNsk4o0c6/w==",
|
||||
"version": "7.8.0",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-7.8.0.tgz",
|
||||
"integrity": "sha512-wf0peJ+ZGlcH+2ZS23aJbOv+ztjeeP8uQ9GgwMJGVLx/Nj9CJt17GWgWWoSmoRVKAX2X+7fzEnAjxdvK2gqCLw==",
|
||||
"dev": true,
|
||||
"engines": {
|
||||
"node": "^18.18.0 || >=20.0.0"
|
||||
|
@ -1137,13 +1137,13 @@
|
|||
}
|
||||
},
|
||||
"node_modules/@typescript-eslint/typescript-estree": {
|
||||
"version": "7.7.1",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-7.7.1.tgz",
|
||||
"integrity": "sha512-CXe0JHCXru8Fa36dteXqmH2YxngKJjkQLjxzoj6LYwzZ7qZvgsLSc+eqItCrqIop8Vl2UKoAi0StVWu97FQZIQ==",
|
||||
"version": "7.8.0",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-7.8.0.tgz",
|
||||
"integrity": "sha512-5pfUCOwK5yjPaJQNy44prjCwtr981dO8Qo9J9PwYXZ0MosgAbfEMB008dJ5sNo3+/BN6ytBPuSvXUg9SAqB0dg==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"@typescript-eslint/types": "7.7.1",
|
||||
"@typescript-eslint/visitor-keys": "7.7.1",
|
||||
"@typescript-eslint/types": "7.8.0",
|
||||
"@typescript-eslint/visitor-keys": "7.8.0",
|
||||
"debug": "^4.3.4",
|
||||
"globby": "^11.1.0",
|
||||
"is-glob": "^4.0.3",
|
||||
|
@ -1189,17 +1189,17 @@
|
|||
}
|
||||
},
|
||||
"node_modules/@typescript-eslint/utils": {
|
||||
"version": "7.7.1",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-7.7.1.tgz",
|
||||
"integrity": "sha512-QUvBxPEaBXf41ZBbaidKICgVL8Hin0p6prQDu6bbetWo39BKbWJxRsErOzMNT1rXvTll+J7ChrbmMCXM9rsvOQ==",
|
||||
"version": "7.8.0",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-7.8.0.tgz",
|
||||
"integrity": "sha512-L0yFqOCflVqXxiZyXrDr80lnahQfSOfc9ELAAZ75sqicqp2i36kEZZGuUymHNFoYOqxRT05up760b4iGsl02nQ==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"@eslint-community/eslint-utils": "^4.4.0",
|
||||
"@types/json-schema": "^7.0.15",
|
||||
"@types/semver": "^7.5.8",
|
||||
"@typescript-eslint/scope-manager": "7.7.1",
|
||||
"@typescript-eslint/types": "7.7.1",
|
||||
"@typescript-eslint/typescript-estree": "7.7.1",
|
||||
"@typescript-eslint/scope-manager": "7.8.0",
|
||||
"@typescript-eslint/types": "7.8.0",
|
||||
"@typescript-eslint/typescript-estree": "7.8.0",
|
||||
"semver": "^7.6.0"
|
||||
},
|
||||
"engines": {
|
||||
|
@ -1214,12 +1214,12 @@
|
|||
}
|
||||
},
|
||||
"node_modules/@typescript-eslint/visitor-keys": {
|
||||
"version": "7.7.1",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-7.7.1.tgz",
|
||||
"integrity": "sha512-gBL3Eq25uADw1LQ9kVpf3hRM+DWzs0uZknHYK3hq4jcTPqVCClHGDnB6UUUV2SFeBeA4KWHWbbLqmbGcZ4FYbw==",
|
||||
"version": "7.8.0",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-7.8.0.tgz",
|
||||
"integrity": "sha512-q4/gibTNBQNA0lGyYQCmWRS5D15n8rXh4QjK3KV+MBPlTYHpfBUT3D3PaPR/HeNiI9W6R7FvlkcGhNyAoP+caA==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"@typescript-eslint/types": "7.7.1",
|
||||
"@typescript-eslint/types": "7.8.0",
|
||||
"eslint-visitor-keys": "^3.4.3"
|
||||
},
|
||||
"engines": {
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "codeql",
|
||||
"version": "3.25.3",
|
||||
"version": "3.25.4",
|
||||
"private": true,
|
||||
"description": "CodeQL action",
|
||||
"scripts": {
|
||||
|
@ -60,8 +60,8 @@
|
|||
"@types/node": "20.9.0",
|
||||
"@types/semver": "^7.5.8",
|
||||
"@types/sinon": "^17.0.3",
|
||||
"@typescript-eslint/eslint-plugin": "^7.7.1",
|
||||
"@typescript-eslint/parser": "^7.7.1",
|
||||
"@typescript-eslint/eslint-plugin": "^7.8.0",
|
||||
"@typescript-eslint/parser": "^7.8.0",
|
||||
"ava": "^5.3.1",
|
||||
"eslint": "^8.57.0",
|
||||
"eslint-import-resolver-typescript": "^3.6.1",
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"bundleVersion": "codeql-bundle-v2.17.1",
|
||||
"cliVersion": "2.17.1",
|
||||
"priorBundleVersion": "codeql-bundle-v2.17.0",
|
||||
"priorCliVersion": "2.17.0"
|
||||
"bundleVersion": "codeql-bundle-v2.17.2",
|
||||
"cliVersion": "2.17.2",
|
||||
"priorBundleVersion": "codeql-bundle-v2.17.1",
|
||||
"priorCliVersion": "2.17.1"
|
||||
}
|
||||
|
|
|
@ -46,7 +46,7 @@ export interface FeatureEnablement {
|
|||
*/
|
||||
export enum Feature {
|
||||
AutobuildDirectTracingEnabled = "autobuild_direct_tracing_enabled",
|
||||
CliSarifMerge = "cli_sarif_merge_enabled",
|
||||
CombineSarifFilesDeprecationWarning = "combine_sarif_files_deprecation_warning_enabled",
|
||||
CppDependencyInstallation = "cpp_dependency_installation_enabled",
|
||||
CppTrapCachingEnabled = "cpp_trap_caching_enabled",
|
||||
DisableJavaBuildlessEnabled = "disable_java_buildless_enabled",
|
||||
|
@ -85,9 +85,9 @@ export const featureConfig: Record<
|
|||
toolsFeature: ToolsFeature.TraceCommandUseBuildMode,
|
||||
defaultValue: false,
|
||||
},
|
||||
[Feature.CliSarifMerge]: {
|
||||
envVar: "CODEQL_ACTION_CLI_SARIF_MERGE",
|
||||
// This is guarded by a `supportsFeature` check rather than by a version check.
|
||||
[Feature.CombineSarifFilesDeprecationWarning]: {
|
||||
envVar: "CODEQL_ACTION_COMBINE_SARIF_FILES_DEPRECATION_WARNING",
|
||||
// Independent of the CLI version.
|
||||
minimumVersion: undefined,
|
||||
defaultValue: false,
|
||||
},
|
||||
|
|
|
@ -3,10 +3,11 @@ import * as path from "path";
|
|||
|
||||
import test from "ava";
|
||||
|
||||
import { Feature } from "./feature-flags";
|
||||
import { getRunnerLogger, Logger } from "./logging";
|
||||
import { setupTests } from "./testing-utils";
|
||||
import { createFeatures, setupTests } from "./testing-utils";
|
||||
import * as uploadLib from "./upload-lib";
|
||||
import { initializeEnvironment, withTmpDir } from "./util";
|
||||
import { GitHubVariant, initializeEnvironment, withTmpDir } from "./util";
|
||||
|
||||
setupTests(test);
|
||||
|
||||
|
@ -324,6 +325,106 @@ test("accept results with invalid artifactLocation.uri value", (t) => {
|
|||
);
|
||||
});
|
||||
|
||||
test("shouldShowCombineSarifFilesDeprecationWarning when on dotcom with feature flag", async (t) => {
|
||||
t.true(
|
||||
await uploadLib.shouldShowCombineSarifFilesDeprecationWarning(
|
||||
[createMockSarif("abc", "def"), createMockSarif("abc", "def")],
|
||||
createFeatures([Feature.CombineSarifFilesDeprecationWarning]),
|
||||
{
|
||||
type: GitHubVariant.DOTCOM,
|
||||
},
|
||||
),
|
||||
);
|
||||
});
|
||||
|
||||
test("shouldShowCombineSarifFilesDeprecationWarning without feature flag", async (t) => {
|
||||
t.false(
|
||||
await uploadLib.shouldShowCombineSarifFilesDeprecationWarning(
|
||||
[createMockSarif("abc", "def"), createMockSarif("abc", "def")],
|
||||
createFeatures([]),
|
||||
{
|
||||
type: GitHubVariant.DOTCOM,
|
||||
},
|
||||
),
|
||||
);
|
||||
});
|
||||
|
||||
test("shouldShowCombineSarifFilesDeprecationWarning when on GHES 3.13", async (t) => {
|
||||
t.false(
|
||||
await uploadLib.shouldShowCombineSarifFilesDeprecationWarning(
|
||||
[createMockSarif("abc", "def"), createMockSarif("abc", "def")],
|
||||
createFeatures([Feature.CombineSarifFilesDeprecationWarning]),
|
||||
{
|
||||
type: GitHubVariant.GHES,
|
||||
version: "3.13.2",
|
||||
},
|
||||
),
|
||||
);
|
||||
});
|
||||
|
||||
test("shouldShowCombineSarifFilesDeprecationWarning when on GHES 3.14", async (t) => {
|
||||
t.true(
|
||||
await uploadLib.shouldShowCombineSarifFilesDeprecationWarning(
|
||||
[createMockSarif("abc", "def"), createMockSarif("abc", "def")],
|
||||
createFeatures([Feature.CombineSarifFilesDeprecationWarning]),
|
||||
{
|
||||
type: GitHubVariant.GHES,
|
||||
version: "3.14.0",
|
||||
},
|
||||
),
|
||||
);
|
||||
});
|
||||
|
||||
test("shouldShowCombineSarifFilesDeprecationWarning with only 1 run", async (t) => {
|
||||
t.false(
|
||||
await uploadLib.shouldShowCombineSarifFilesDeprecationWarning(
|
||||
[createMockSarif("abc", "def")],
|
||||
createFeatures([Feature.CombineSarifFilesDeprecationWarning]),
|
||||
{
|
||||
type: GitHubVariant.DOTCOM,
|
||||
},
|
||||
),
|
||||
);
|
||||
});
|
||||
|
||||
test("shouldShowCombineSarifFilesDeprecationWarning with distinct categories", async (t) => {
|
||||
t.false(
|
||||
await uploadLib.shouldShowCombineSarifFilesDeprecationWarning(
|
||||
[createMockSarif("abc", "def"), createMockSarif("def", "def")],
|
||||
createFeatures([Feature.CombineSarifFilesDeprecationWarning]),
|
||||
{
|
||||
type: GitHubVariant.DOTCOM,
|
||||
},
|
||||
),
|
||||
);
|
||||
});
|
||||
|
||||
test("shouldShowCombineSarifFilesDeprecationWarning with distinct tools", async (t) => {
|
||||
t.false(
|
||||
await uploadLib.shouldShowCombineSarifFilesDeprecationWarning(
|
||||
[createMockSarif("abc", "abc"), createMockSarif("abc", "def")],
|
||||
createFeatures([Feature.CombineSarifFilesDeprecationWarning]),
|
||||
{
|
||||
type: GitHubVariant.DOTCOM,
|
||||
},
|
||||
),
|
||||
);
|
||||
});
|
||||
|
||||
test("shouldShowCombineSarifFilesDeprecationWarning when environment variable is already set", async (t) => {
|
||||
process.env["CODEQL_MERGE_SARIF_DEPRECATION_WARNING"] = "true";
|
||||
|
||||
t.false(
|
||||
await uploadLib.shouldShowCombineSarifFilesDeprecationWarning(
|
||||
[createMockSarif("abc", "def"), createMockSarif("abc", "def")],
|
||||
createFeatures([Feature.CombineSarifFilesDeprecationWarning]),
|
||||
{
|
||||
type: GitHubVariant.DOTCOM,
|
||||
},
|
||||
),
|
||||
);
|
||||
});
|
||||
|
||||
function createMockSarif(id?: string, tool?: string) {
|
||||
return {
|
||||
runs: [
|
||||
|
|
|
@ -6,6 +6,7 @@ import * as core from "@actions/core";
|
|||
import { OctokitResponse } from "@octokit/types";
|
||||
import fileUrl from "file-url";
|
||||
import * as jsonschema from "jsonschema";
|
||||
import * as semver from "semver";
|
||||
|
||||
import * as actionsUtil from "./actions-util";
|
||||
import { getOptionalInput, getRequiredInput } from "./actions-util";
|
||||
|
@ -14,7 +15,7 @@ import { getGitHubVersion, wrapApiConfigurationError } from "./api-client";
|
|||
import { CodeQL, getCodeQL } from "./codeql";
|
||||
import { getConfig } from "./config-utils";
|
||||
import { EnvVar } from "./environment";
|
||||
import { Feature, Features } from "./feature-flags";
|
||||
import { Feature, FeatureEnablement, Features } from "./feature-flags";
|
||||
import * as fingerprints from "./fingerprints";
|
||||
import { initCodeQL } from "./init";
|
||||
import { Logger } from "./logging";
|
||||
|
@ -24,8 +25,10 @@ import * as util from "./util";
|
|||
import {
|
||||
ConfigurationError,
|
||||
getRequiredEnvParam,
|
||||
GitHubVariant,
|
||||
GitHubVersion,
|
||||
SarifFile,
|
||||
SarifRun,
|
||||
wrapError,
|
||||
} from "./util";
|
||||
|
||||
|
@ -65,20 +68,86 @@ function combineSarifFiles(sarifFiles: string[], logger: Logger): SarifFile {
|
|||
|
||||
/**
|
||||
* Checks whether all the runs in the given SARIF files were produced by CodeQL.
|
||||
* @param sarifFiles The list of SARIF files to check.
|
||||
* @param sarifObjects The list of SARIF objects to check.
|
||||
*/
|
||||
function areAllRunsProducedByCodeQL(sarifFiles: string[]): boolean {
|
||||
return sarifFiles.every((sarifFile) => {
|
||||
const sarifObject = JSON.parse(
|
||||
fs.readFileSync(sarifFile, "utf8"),
|
||||
) as SarifFile;
|
||||
|
||||
function areAllRunsProducedByCodeQL(sarifObjects: SarifFile[]): boolean {
|
||||
return sarifObjects.every((sarifObject) => {
|
||||
return sarifObject.runs?.every(
|
||||
(run) => run.tool?.driver?.name === "CodeQL",
|
||||
);
|
||||
});
|
||||
}
|
||||
|
||||
type SarifRunKey = {
|
||||
name: string | undefined;
|
||||
fullName: string | undefined;
|
||||
version: string | undefined;
|
||||
semanticVersion: string | undefined;
|
||||
guid: string | undefined;
|
||||
automationId: string | undefined;
|
||||
};
|
||||
|
||||
function createRunKey(run: SarifRun): SarifRunKey {
|
||||
return {
|
||||
name: run.tool?.driver?.name,
|
||||
fullName: run.tool?.driver?.fullName,
|
||||
version: run.tool?.driver?.version,
|
||||
semanticVersion: run.tool?.driver?.semanticVersion,
|
||||
guid: run.tool?.driver?.guid,
|
||||
automationId: run.automationDetails?.id,
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks whether all runs in the given SARIF files are unique (based on the
|
||||
* criteria used by Code Scanning to determine analysis categories).
|
||||
* @param sarifObjects The list of SARIF objects to check.
|
||||
*/
|
||||
function areAllRunsUnique(sarifObjects: SarifFile[]): boolean {
|
||||
const keys = new Set<string>();
|
||||
|
||||
for (const sarifObject of sarifObjects) {
|
||||
for (const run of sarifObject.runs) {
|
||||
const key = JSON.stringify(createRunKey(run));
|
||||
|
||||
// If the key already exists, the runs are not unique.
|
||||
if (keys.has(key)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
keys.add(key);
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
// Checks whether the deprecation warning for combining SARIF files should be shown.
|
||||
export async function shouldShowCombineSarifFilesDeprecationWarning(
|
||||
sarifObjects: util.SarifFile[],
|
||||
features: FeatureEnablement,
|
||||
githubVersion: GitHubVersion,
|
||||
) {
|
||||
if (!(await features.getValue(Feature.CombineSarifFilesDeprecationWarning))) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// Do not show this warning on GHES versions before 3.14.0
|
||||
if (
|
||||
githubVersion.type === GitHubVariant.GHES &&
|
||||
semver.lt(githubVersion.version, "3.14.0")
|
||||
) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// Only give a deprecation warning when not all runs are unique and
|
||||
// we haven't already shown the warning.
|
||||
return (
|
||||
!areAllRunsUnique(sarifObjects) &&
|
||||
!process.env.CODEQL_MERGE_SARIF_DEPRECATION_WARNING
|
||||
);
|
||||
}
|
||||
|
||||
// Takes a list of paths to sarif files and combines them together using the
|
||||
// CLI `github merge-results` command when all SARIF files are produced by
|
||||
// CodeQL. Otherwise, it will fall back to combining the files in the action.
|
||||
|
@ -86,7 +155,7 @@ function areAllRunsProducedByCodeQL(sarifFiles: string[]): boolean {
|
|||
async function combineSarifFilesUsingCLI(
|
||||
sarifFiles: string[],
|
||||
gitHubVersion: GitHubVersion,
|
||||
features: Features,
|
||||
features: FeatureEnablement,
|
||||
logger: Logger,
|
||||
): Promise<SarifFile> {
|
||||
logger.info("Combining SARIF files using the CodeQL CLI");
|
||||
|
@ -94,11 +163,35 @@ async function combineSarifFilesUsingCLI(
|
|||
return JSON.parse(fs.readFileSync(sarifFiles[0], "utf8")) as SarifFile;
|
||||
}
|
||||
|
||||
if (!areAllRunsProducedByCodeQL(sarifFiles)) {
|
||||
const sarifObjects = sarifFiles.map((sarifFile): SarifFile => {
|
||||
return JSON.parse(fs.readFileSync(sarifFile, "utf8")) as SarifFile;
|
||||
});
|
||||
|
||||
const deprecationWarningMessage =
|
||||
gitHubVersion.type === GitHubVariant.GHES
|
||||
? "and will be removed in GitHub Enterprise Server 3.18"
|
||||
: "and will be removed on June 4, 2025";
|
||||
const deprecationMoreInformationMessage =
|
||||
"For more information, see https://github.blog/changelog/2024-05-06-code-scanning-will-stop-combining-runs-from-a-single-upload";
|
||||
|
||||
if (!areAllRunsProducedByCodeQL(sarifObjects)) {
|
||||
logger.debug(
|
||||
"Not all SARIF files were produced by CodeQL. Merging files in the action.",
|
||||
);
|
||||
|
||||
if (
|
||||
await shouldShowCombineSarifFilesDeprecationWarning(
|
||||
sarifObjects,
|
||||
features,
|
||||
gitHubVersion,
|
||||
)
|
||||
) {
|
||||
logger.warning(
|
||||
`Uploading multiple SARIF runs with the same category is deprecated ${deprecationWarningMessage}. Please update your workflow to upload a single run per category. ${deprecationMoreInformationMessage}`,
|
||||
);
|
||||
core.exportVariable("CODEQL_MERGE_SARIF_DEPRECATION_WARNING", "true");
|
||||
}
|
||||
|
||||
// If not, use the naive method of combining the files.
|
||||
return combineSarifFiles(sarifFiles, logger);
|
||||
}
|
||||
|
@ -149,6 +242,19 @@ async function combineSarifFilesUsingCLI(
|
|||
"The CodeQL CLI does not support merging SARIF files. Merging files in the action.",
|
||||
);
|
||||
|
||||
if (
|
||||
await shouldShowCombineSarifFilesDeprecationWarning(
|
||||
sarifObjects,
|
||||
features,
|
||||
gitHubVersion,
|
||||
)
|
||||
) {
|
||||
logger.warning(
|
||||
`Uploading multiple CodeQL runs with the same category is deprecated ${deprecationWarningMessage} for CodeQL CLI 2.16.6 and earlier. Please update your CodeQL CLI version or update your workflow to set a distinct category for each CodeQL run. ${deprecationMoreInformationMessage}`,
|
||||
);
|
||||
core.exportVariable("CODEQL_MERGE_SARIF_DEPRECATION_WARNING", "true");
|
||||
}
|
||||
|
||||
return combineSarifFiles(sarifFiles, logger);
|
||||
}
|
||||
|
||||
|
@ -496,14 +602,12 @@ async function uploadFiles(
|
|||
validateSarifFileSchema(file, logger);
|
||||
}
|
||||
|
||||
let sarif = (await features.getValue(Feature.CliSarifMerge))
|
||||
? await combineSarifFilesUsingCLI(
|
||||
sarifFiles,
|
||||
gitHubVersion,
|
||||
features,
|
||||
logger,
|
||||
)
|
||||
: combineSarifFiles(sarifFiles, logger);
|
||||
let sarif = await combineSarifFilesUsingCLI(
|
||||
sarifFiles,
|
||||
gitHubVersion,
|
||||
features,
|
||||
logger,
|
||||
);
|
||||
sarif = await fingerprints.addFingerprints(sarif, sourceRoot, logger);
|
||||
|
||||
sarif = populateRunAutomationDetails(
|
||||
|
|
|
@ -56,8 +56,11 @@ export interface SarifFile {
|
|||
export interface SarifRun {
|
||||
tool?: {
|
||||
driver?: {
|
||||
guid?: string;
|
||||
name?: string;
|
||||
fullName?: string;
|
||||
semanticVersion?: string;
|
||||
version?: string;
|
||||
};
|
||||
};
|
||||
automationDetails?: {
|
||||
|
|
Загрузка…
Ссылка в новой задаче