Merge pull request #3122 from github/koesie10/npm-upgrade
Run `npm upgrade`
This commit is contained in:
42882
extensions/ql-vscode/package-lock.json
generated
42882
extensions/ql-vscode/package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@@ -195,9 +195,8 @@ export class DistributionManager implements DistributionProvider {
|
||||
|
||||
if (process.env.PATH) {
|
||||
for (const searchDirectory of process.env.PATH.split(delimiter)) {
|
||||
const expectedLauncherPath = await getExecutableFromDirectory(
|
||||
searchDirectory,
|
||||
);
|
||||
const expectedLauncherPath =
|
||||
await getExecutableFromDirectory(searchDirectory);
|
||||
if (expectedLauncherPath) {
|
||||
return {
|
||||
codeQlPath: expectedLauncherPath,
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
export type DeepReadonly<T> = T extends Array<infer R>
|
||||
? DeepReadonlyArray<R>
|
||||
: // eslint-disable-next-line @typescript-eslint/ban-types
|
||||
T extends Function
|
||||
? T
|
||||
: T extends object
|
||||
? DeepReadonlyObject<T>
|
||||
: T;
|
||||
T extends Function
|
||||
? T
|
||||
: T extends object
|
||||
? DeepReadonlyObject<T>
|
||||
: T;
|
||||
|
||||
interface DeepReadonlyArray<T> extends ReadonlyArray<DeepReadonly<T>> {}
|
||||
|
||||
|
||||
@@ -234,14 +234,14 @@ export function parseHighlightedLine(
|
||||
const highlightStartColumn = isSingleLineHighlight
|
||||
? highlightedRegion.startColumn
|
||||
: isFirstHighlightedLine
|
||||
? highlightedRegion.startColumn
|
||||
: 0;
|
||||
? highlightedRegion.startColumn
|
||||
: 0;
|
||||
|
||||
const highlightEndColumn = isSingleLineHighlight
|
||||
? highlightedRegion.endColumn
|
||||
: isLastHighlightedLine
|
||||
? highlightedRegion.endColumn
|
||||
: line.length + 1;
|
||||
? highlightedRegion.endColumn
|
||||
: line.length + 1;
|
||||
|
||||
const plainSection1 = line.substring(0, highlightStartColumn - 1);
|
||||
const highlightedSection = line.substring(
|
||||
|
||||
@@ -162,8 +162,8 @@ export class ExtensionTelemetryListener
|
||||
const status = !error
|
||||
? CommandCompletion.Success
|
||||
: error instanceof UserCancellationException
|
||||
? CommandCompletion.Cancelled
|
||||
: CommandCompletion.Failed;
|
||||
? CommandCompletion.Cancelled
|
||||
: CommandCompletion.Failed;
|
||||
|
||||
this.reporter.sendTelemetryEvent(
|
||||
"command-usage",
|
||||
|
||||
@@ -424,9 +424,8 @@ export class DatabaseManager extends DisposableObject {
|
||||
step: ++step,
|
||||
});
|
||||
|
||||
const databaseItem = await this.createDatabaseItemFromPersistedState(
|
||||
database,
|
||||
);
|
||||
const databaseItem =
|
||||
await this.createDatabaseItemFromPersistedState(database);
|
||||
try {
|
||||
await this.refreshDatabase(databaseItem);
|
||||
await this.registerDatabase(databaseItem);
|
||||
|
||||
@@ -542,8 +542,8 @@ async function installOrUpdateDistribution(
|
||||
const messageText = willUpdateCodeQl
|
||||
? "Updating CodeQL CLI"
|
||||
: codeQlInstalled
|
||||
? "Checking for updates to CodeQL CLI"
|
||||
: "Installing CodeQL CLI";
|
||||
? "Checking for updates to CodeQL CLI"
|
||||
: "Installing CodeQL CLI";
|
||||
|
||||
try {
|
||||
await installOrUpdateDistributionWithProgressTitle(
|
||||
@@ -564,8 +564,8 @@ async function installOrUpdateDistribution(
|
||||
willUpdateCodeQl
|
||||
? "update"
|
||||
: codeQlInstalled
|
||||
? "check for updates to"
|
||||
: "install"
|
||||
? "check for updates to"
|
||||
: "install"
|
||||
} CodeQL CLI`;
|
||||
|
||||
if (e instanceof GithubRateLimitedError) {
|
||||
|
||||
@@ -104,9 +104,9 @@ function sortInterpretedResults(
|
||||
a.message.text === undefined
|
||||
? 0
|
||||
: b.message.text === undefined
|
||||
? 0
|
||||
: multiplier *
|
||||
a.message.text?.localeCompare(b.message.text, env.language),
|
||||
? 0
|
||||
: multiplier *
|
||||
a.message.text?.localeCompare(b.message.text, env.language),
|
||||
);
|
||||
break;
|
||||
default:
|
||||
|
||||
@@ -507,9 +507,8 @@ export class SkeletonQueryWizard {
|
||||
): Promise<DatabaseItem | undefined> {
|
||||
const defaultDatabaseNwo = QUERY_LANGUAGE_TO_DATABASE_REPO[language];
|
||||
|
||||
const dbItems = await SkeletonQueryWizard.sortDatabaseItemsByDateAdded(
|
||||
databaseItems,
|
||||
);
|
||||
const dbItems =
|
||||
await SkeletonQueryWizard.sortDatabaseItemsByDateAdded(databaseItems);
|
||||
|
||||
const defaultDatabaseItem = await SkeletonQueryWizard.findDatabaseItemByNwo(
|
||||
language,
|
||||
|
||||
@@ -85,9 +85,8 @@ export async function runAutoModelQueries({
|
||||
// CodeQL needs to have access to the database to be able to retrieve the
|
||||
// snippets from it. The source location prefix is used to determine the
|
||||
// base path of the database.
|
||||
const sourceLocationPrefix = await databaseItem.getSourceLocationPrefix(
|
||||
cliServer,
|
||||
);
|
||||
const sourceLocationPrefix =
|
||||
await databaseItem.getSourceLocationPrefix(cliServer);
|
||||
const sourceArchiveUri = databaseItem.sourceArchive;
|
||||
const sourceInfo =
|
||||
sourceArchiveUri === undefined
|
||||
|
||||
@@ -481,9 +481,8 @@ export class ModelEditorView extends AbstractWebview<
|
||||
// In application mode, we need the database of a specific library to generate
|
||||
// the modeled methods. In framework mode, we'll use the current database.
|
||||
if (mode === Mode.Application) {
|
||||
addedDatabase = await this.promptChooseNewOrExistingDatabase(
|
||||
progress,
|
||||
);
|
||||
addedDatabase =
|
||||
await this.promptChooseNewOrExistingDatabase(progress);
|
||||
if (!addedDatabase) {
|
||||
return;
|
||||
}
|
||||
@@ -561,9 +560,8 @@ export class ModelEditorView extends AbstractWebview<
|
||||
|
||||
private async modelDependency(): Promise<void> {
|
||||
return withProgress(async (progress, token) => {
|
||||
const addedDatabase = await this.promptChooseNewOrExistingDatabase(
|
||||
progress,
|
||||
);
|
||||
const addedDatabase =
|
||||
await this.promptChooseNewOrExistingDatabase(progress);
|
||||
if (!addedDatabase || token.isCancellationRequested) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -239,8 +239,8 @@ export class QLTestAdapter extends DisposableObject implements TestAdapter {
|
||||
const state = event.pass
|
||||
? "passed"
|
||||
: event.messages?.length
|
||||
? "errored"
|
||||
: "failed";
|
||||
? "errored"
|
||||
: "failed";
|
||||
let message: string | undefined;
|
||||
if (event.failureDescription || event.diff?.length) {
|
||||
message =
|
||||
|
||||
@@ -45,9 +45,8 @@ export async function exportVariantAnalysisResults(
|
||||
): Promise<void> {
|
||||
await withProgress(
|
||||
async (progress: ProgressCallback, token: CancellationToken) => {
|
||||
const variantAnalysis = await variantAnalysisManager.getVariantAnalysis(
|
||||
variantAnalysisId,
|
||||
);
|
||||
const variantAnalysis =
|
||||
await variantAnalysisManager.getVariantAnalysis(variantAnalysisId);
|
||||
if (!variantAnalysis) {
|
||||
void extLogger.log(
|
||||
`Could not find variant analysis with id ${variantAnalysisId}`,
|
||||
@@ -61,9 +60,8 @@ export async function exportVariantAnalysisResults(
|
||||
throw new UserCancellationException("Cancelled");
|
||||
}
|
||||
|
||||
const repoStates = await variantAnalysisManager.getRepoStates(
|
||||
variantAnalysisId,
|
||||
);
|
||||
const repoStates =
|
||||
await variantAnalysisManager.getRepoStates(variantAnalysisId);
|
||||
|
||||
void extLogger.log(
|
||||
`Exporting variant analysis results for variant analysis with id ${variantAnalysis.id}`,
|
||||
|
||||
@@ -183,9 +183,8 @@ async function copyExistingQueryPack(
|
||||
if (
|
||||
await cliServer.cliConstraints.supportsGenerateExtensiblePredicateMetadata()
|
||||
) {
|
||||
const metadata = await cliServer.generateExtensiblePredicateMetadata(
|
||||
originalPackRoot,
|
||||
);
|
||||
const metadata =
|
||||
await cliServer.generateExtensiblePredicateMetadata(originalPackRoot);
|
||||
metadata.extensible_predicates.forEach((predicate) => {
|
||||
if (predicate.path.endsWith(".ql")) {
|
||||
toCopy.push(join(originalPackRoot, predicate.path));
|
||||
|
||||
@@ -21,9 +21,8 @@ export const createVariantAnalysisContentProvider = (
|
||||
}
|
||||
const variantAnalysisId = parseInt(variantAnalysisIdString);
|
||||
|
||||
const variantAnalysis = await variantAnalysisManager.getVariantAnalysis(
|
||||
variantAnalysisId,
|
||||
);
|
||||
const variantAnalysis =
|
||||
await variantAnalysisManager.getVariantAnalysis(variantAnalysisId);
|
||||
if (!variantAnalysis) {
|
||||
void showAndLogWarningMessage(
|
||||
extLogger,
|
||||
|
||||
@@ -180,9 +180,8 @@ export class VariantAnalysisResultsManager extends DisposableObject {
|
||||
repositoryFullName,
|
||||
);
|
||||
|
||||
const repoTask: VariantAnalysisRepositoryTask = await readRepoTask(
|
||||
storageDirectory,
|
||||
);
|
||||
const repoTask: VariantAnalysisRepositoryTask =
|
||||
await readRepoTask(storageDirectory);
|
||||
|
||||
if (!repoTask.databaseCommitSha || !repoTask.sourceLocationPrefix) {
|
||||
throw new Error("Missing database commit SHA");
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import * as React from "react";
|
||||
import { render as reactRender, screen } from "@testing-library/react";
|
||||
import userEvent from "@testing-library/user-event";
|
||||
import { userEvent } from "@testing-library/user-event";
|
||||
import { CodePaths, CodePathsProps } from "../CodePaths";
|
||||
|
||||
import { createMockCodeFlows } from "../../../../../test/factories/variant-analysis/shared/CodeFlow";
|
||||
|
||||
@@ -39,7 +39,7 @@ export const DeterminateProgressRing = ({ percent }: Props) => (
|
||||
aria-valuemax={100}
|
||||
aria-valuenow={percent}
|
||||
>
|
||||
<svg className="progress" viewBox="0 0 16 16">
|
||||
<svg className="progress" viewBox="0 0 16 16" role="presentation">
|
||||
<Background cx="8px" cy="8px" r="7px" />
|
||||
<Determinate
|
||||
style={{
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import * as React from "react";
|
||||
import { styled } from "styled-components";
|
||||
import classNames from "classnames";
|
||||
import * as classNames from "classnames";
|
||||
|
||||
type Props = {
|
||||
name: string;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import * as React from "react";
|
||||
import { Codicon } from "./Codicon";
|
||||
import classNames from "classnames";
|
||||
import * as classNames from "classnames";
|
||||
|
||||
type Props = {
|
||||
label?: string;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import * as React from "react";
|
||||
import { render as reactRender, screen } from "@testing-library/react";
|
||||
import userEvent from "@testing-library/user-event";
|
||||
import { userEvent } from "@testing-library/user-event";
|
||||
import {
|
||||
MethodModelingInputs,
|
||||
MethodModelingInputsProps,
|
||||
|
||||
@@ -10,7 +10,7 @@ import {
|
||||
MultipleModeledMethodsPanel,
|
||||
MultipleModeledMethodsPanelProps,
|
||||
} from "../MultipleModeledMethodsPanel";
|
||||
import userEvent from "@testing-library/user-event";
|
||||
import { userEvent } from "@testing-library/user-event";
|
||||
import { ModeledMethod } from "../../../model-editor/modeled-method";
|
||||
import { QueryLanguage } from "../../../common/query-language";
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@ import * as React from "react";
|
||||
import { render as reactRender, screen } from "@testing-library/react";
|
||||
import { createMethod } from "../../../../test/factories/model-editor/method-factories";
|
||||
import { LibraryRow, LibraryRowProps } from "../LibraryRow";
|
||||
import userEvent from "@testing-library/user-event";
|
||||
import { userEvent } from "@testing-library/user-event";
|
||||
import { createMockModelEditorViewState } from "../../../../test/factories/model-editor/view-state";
|
||||
|
||||
describe(LibraryRow.name, () => {
|
||||
|
||||
@@ -7,7 +7,7 @@ import {
|
||||
import { createMethod } from "../../../../test/factories/model-editor/method-factories";
|
||||
import { MethodRow, MethodRowProps } from "../MethodRow";
|
||||
import { ModeledMethod } from "../../../model-editor/modeled-method";
|
||||
import userEvent from "@testing-library/user-event";
|
||||
import { userEvent } from "@testing-library/user-event";
|
||||
import { createMockModelEditorViewState } from "../../../../test/factories/model-editor/view-state";
|
||||
|
||||
describe(MethodRow.name, () => {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import * as React from "react";
|
||||
import { render, screen } from "@testing-library/react";
|
||||
import { ModelKindDropdown } from "../ModelKindDropdown";
|
||||
import userEvent from "@testing-library/user-event";
|
||||
import { userEvent } from "@testing-library/user-event";
|
||||
import {
|
||||
createNoneModeledMethod,
|
||||
createSinkModeledMethod,
|
||||
|
||||
@@ -13,5 +13,6 @@ export function NonClickableLocation({ msg, locationHint }: Props) {
|
||||
if (msg === undefined) {
|
||||
return null;
|
||||
}
|
||||
// eslint-disable-next-line github/a11y-no-title-attribute
|
||||
return <span title={locationHint}>{msg}</span>;
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import * as React from "react";
|
||||
import { render as reactRender, screen } from "@testing-library/react";
|
||||
import userEvent from "@testing-library/user-event";
|
||||
import { userEvent } from "@testing-library/user-event";
|
||||
import { QueryDetails, QueryDetailsProps } from "../QueryDetails";
|
||||
|
||||
describe(QueryDetails.name, () => {
|
||||
|
||||
@@ -9,7 +9,7 @@ import {
|
||||
VariantAnalysisRepoStatus,
|
||||
VariantAnalysisScannedRepositoryDownloadStatus,
|
||||
} from "../../../variant-analysis/shared/variant-analysis";
|
||||
import userEvent from "@testing-library/user-event";
|
||||
import { userEvent } from "@testing-library/user-event";
|
||||
import { RepoRow, RepoRowProps } from "../RepoRow";
|
||||
import { createMockRepositoryWithMetadata } from "../../../../test/factories/variant-analysis/shared/repository";
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import * as React from "react";
|
||||
import { render as reactRender, screen } from "@testing-library/react";
|
||||
import userEvent from "@testing-library/user-event";
|
||||
import { userEvent } from "@testing-library/user-event";
|
||||
import { VariantAnalysisStatus } from "../../../variant-analysis/shared/variant-analysis";
|
||||
import {
|
||||
VariantAnalysisActions,
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import * as React from "react";
|
||||
import { act, render as reactRender, screen } from "@testing-library/react";
|
||||
import userEvent from "@testing-library/user-event";
|
||||
import { userEvent } from "@testing-library/user-event";
|
||||
import {
|
||||
VariantAnalysisRepoStatus,
|
||||
VariantAnalysisScannedRepositoryDownloadStatus,
|
||||
|
||||
@@ -5,7 +5,7 @@ import {
|
||||
VariantAnalysisStats,
|
||||
VariantAnalysisStatsProps,
|
||||
} from "../VariantAnalysisStats";
|
||||
import userEvent from "@testing-library/user-event";
|
||||
import { userEvent } from "@testing-library/user-event";
|
||||
|
||||
describe(VariantAnalysisStats.name, () => {
|
||||
const onViewLogsClick = jest.fn();
|
||||
|
||||
@@ -1,11 +1,10 @@
|
||||
{
|
||||
"extends": "../tsconfig.json",
|
||||
"include": ["**/*.ts", "../src/**/*.ts", "**/.eslintrc.js", "**/*.config.js"],
|
||||
"exclude": [],
|
||||
"exclude": ["../src/view/**/*.ts"],
|
||||
"compilerOptions": {
|
||||
"noEmit": true,
|
||||
"resolveJsonModule": true,
|
||||
"rootDir": "..",
|
||||
"jsx": "react"
|
||||
"rootDir": ".."
|
||||
}
|
||||
}
|
||||
|
||||
@@ -136,6 +136,7 @@ function mockRequestError(status: number, body: any): RequestError {
|
||||
"Content-Type": "application/json",
|
||||
},
|
||||
data: body,
|
||||
retryCount: 0,
|
||||
},
|
||||
},
|
||||
);
|
||||
|
||||
@@ -322,6 +322,7 @@ describe("Variant Analysis Monitor", () => {
|
||||
headers: {},
|
||||
url: "",
|
||||
data: {},
|
||||
retryCount: 0,
|
||||
},
|
||||
}),
|
||||
);
|
||||
|
||||
@@ -114,6 +114,7 @@ describe("listDatabases", () => {
|
||||
headers: {},
|
||||
url: "",
|
||||
data: {},
|
||||
retryCount: 0,
|
||||
},
|
||||
}),
|
||||
);
|
||||
@@ -140,6 +141,7 @@ describe("listDatabases", () => {
|
||||
headers: {},
|
||||
url: "",
|
||||
data: {},
|
||||
retryCount: 0,
|
||||
},
|
||||
}),
|
||||
);
|
||||
@@ -188,6 +190,7 @@ describe("listDatabases", () => {
|
||||
headers: {},
|
||||
url: "",
|
||||
data: {},
|
||||
retryCount: 0,
|
||||
},
|
||||
}),
|
||||
);
|
||||
@@ -221,6 +224,7 @@ describe("listDatabases", () => {
|
||||
headers: {},
|
||||
url: "",
|
||||
data: {},
|
||||
retryCount: 0,
|
||||
},
|
||||
}),
|
||||
);
|
||||
@@ -257,6 +261,7 @@ describe("listDatabases", () => {
|
||||
headers: {},
|
||||
url: "",
|
||||
data: {},
|
||||
retryCount: 0,
|
||||
},
|
||||
}),
|
||||
);
|
||||
@@ -283,6 +288,7 @@ describe("listDatabases", () => {
|
||||
headers: {},
|
||||
url: "",
|
||||
data: {},
|
||||
retryCount: 0,
|
||||
},
|
||||
}),
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user