Skip to content

Commit 2465f77

Browse files
committed
Move diff-informed utils to subfolder
1 parent 29ddace commit 2465f77

7 files changed

Lines changed: 27 additions & 29 deletions

File tree

‎lib/entry-points.js‎

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎src/analyze.ts‎

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,7 @@ import {
1818
getJavaTempDependencyDir,
1919
} from "./dependency-caching";
2020
import { addDiagnostic, makeDiagnostic } from "./diagnostics";
21-
import {
22-
DiffThunkRange,
23-
readDiffRangesJsonFile,
24-
} from "./diff-informed-analysis-utils";
21+
import { type DiffThunkRange, readDiffRangesJsonFile } from "./diff-informed";
2522
import { EnvVar } from "./environment";
2623
import { FeatureEnablement, Feature } from "./feature-flags";
2724
import { getGitRoot } from "./git-utils";

‎src/config-utils.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ import {
4848
addNoLanguageDiagnostic,
4949
makeTelemetryDiagnostic,
5050
} from "./diagnostics";
51-
import { prepareDiffInformedAnalysis } from "./diff-informed-analysis-utils";
51+
import { prepareDiffInformedAnalysis } from "./diff-informed";
5252
import { EnvVar, exportEnvVar, getEnv } from "./environment";
5353
import * as errorMessages from "./error-messages";
5454
import { Feature, FeatureEnablement, FeatureWithoutCLI } from "./feature-flags";
Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,11 @@
11
import test, { ExecutionContext } from "ava";
22
import * as sinon from "sinon";
33

4-
import * as actionsUtil from "./actions-util";
5-
import type { PullRequestBranches } from "./actions-util";
6-
import * as apiClient from "./api-client";
7-
import {
8-
getDiffInformedAnalysisBranches,
9-
prepareDiffInformedAnalysis,
10-
exportedForTesting,
11-
} from "./diff-informed-analysis-utils";
12-
import { Feature, FeatureEnablement, initFeatures } from "./feature-flags";
13-
import { parseRepositoryNwo } from "./repository";
4+
import * as actionsUtil from "../actions-util";
5+
import type { PullRequestBranches } from "../actions-util";
6+
import * as apiClient from "../api-client";
7+
import { Feature, FeatureEnablement, initFeatures } from "../feature-flags";
8+
import { parseRepositoryNwo } from "../repository";
149
import {
1510
setupTests,
1611
createFeatures,
@@ -19,9 +14,15 @@ import {
1914
setupActionsVars,
2015
makeMacro,
2116
RecordingLogger,
22-
} from "./testing-utils";
23-
import { GitHubVariant, withTmpDir } from "./util";
24-
import type { GitHubVersion } from "./util";
17+
} from "../testing-utils";
18+
import { GitHubVariant, withTmpDir } from "../util";
19+
import type { GitHubVersion } from "../util";
20+
21+
import {
22+
getDiffInformedAnalysisBranches,
23+
prepareDiffInformedAnalysis,
24+
exportedForTesting,
25+
} from ".";
2526

2627
setupTests(test);
2728

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
import * as fs from "fs";
22

3-
import * as actionsUtil from "./actions-util";
4-
import type { PullRequestBranches } from "./actions-util";
5-
import { getApiClient, getGitHubVersion } from "./api-client";
6-
import type { CodeQL } from "./codeql";
7-
import { Feature, FeatureEnablement } from "./feature-flags";
8-
import { Logger } from "./logging";
9-
import { getRepositoryNwoFromEnv } from "./repository";
10-
import { getErrorMessage, GitHubVariant, satisfiesGHESVersion } from "./util";
3+
import * as actionsUtil from "../actions-util";
4+
import type { PullRequestBranches } from "../actions-util";
5+
import { getApiClient, getGitHubVersion } from "../api-client";
6+
import type { CodeQL } from "../codeql";
7+
import { Feature, FeatureEnablement } from "../feature-flags";
8+
import { Logger } from "../logging";
9+
import { getRepositoryNwoFromEnv } from "../repository";
10+
import { getErrorMessage, GitHubVariant, satisfiesGHESVersion } from "../util";
1111

1212
/**
1313
* This interface is an abbreviated version of the file diff object returned by

‎src/upload-lib.test.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import * as sinon from "sinon";
99
import * as analyses from "./analyses";
1010
import { AnalysisKind, CodeQuality, CodeScanning } from "./analyses";
1111
import * as api from "./api-client";
12-
import * as diffUtils from "./diff-informed-analysis-utils";
12+
import * as diffUtils from "./diff-informed";
1313
import { getEnv } from "./environment";
1414
import { Logger } from "./logging";
1515
import * as sarif from "./sarif";

‎src/upload-lib.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import * as api from "./api-client";
1313
import { getGitHubVersion, wrapApiConfigurationError } from "./api-client";
1414
import { CodeQL, getCodeQL } from "./codeql";
1515
import type { ActionConfig } from "./config/action-config";
16-
import { readDiffRangesJsonFile } from "./diff-informed-analysis-utils";
16+
import { readDiffRangesJsonFile } from "./diff-informed";
1717
import { ActionsEnvVars, EnvVar, exportEnvVar } from "./environment";
1818
import { FeatureEnablement } from "./feature-flags";
1919
import * as fingerprints from "./fingerprints";

0 commit comments

Comments
 (0)