Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions extensions/ql-vscode/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion extensions/ql-vscode/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2182,7 +2182,7 @@
"markdownlint-cli2-formatter-pretty": "^0.0.9",
"npm-run-all": "^4.1.5",
"patch-package": "^8.0.1",
"prettier": "^3.8.4",
"prettier": "^3.9.3",
"storybook": "^10.4.6",
"tar-stream": "^3.2.0",
"through2": "^4.0.2",
Expand Down
12 changes: 2 additions & 10 deletions extensions/ql-vscode/src/common/bqrs-cli-types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -69,20 +69,12 @@ export interface BqrsWholeFileLocation {
}

export type BqrsUrlValue =
| BqrsWholeFileLocation
| BqrsLineColumnLocation
| string;
BqrsWholeFileLocation | BqrsLineColumnLocation | string;

export type BqrsCellValue = BqrsEntityValue | number | string | boolean;

export type BqrsKind =
| "String"
| "Float"
| "Integer"
| "Boolean"
| "Date"
| "Entity"
| "BigInt";
"String" | "Float" | "Integer" | "Boolean" | "Date" | "Entity" | "BigInt";

interface BqrsColumn {
name?: string;
Expand Down
4 changes: 2 additions & 2 deletions extensions/ql-vscode/src/common/bqrs-raw-results-mapper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ export function bqrsToResultSet(
name: schema.name,
totalRowCount: schema.rows,
columns: schema.columns.map(mapColumn),
rows: chunk.tuples.map(
(tuple): Row => tuple.map((cell): CellValue => mapCellValue(cell)),
rows: chunk.tuples.map((tuple): Row =>
tuple.map((cell): CellValue => mapCellValue(cell)),
),
};

Expand Down
10 changes: 3 additions & 7 deletions extensions/ql-vscode/src/common/interface-types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,7 @@ type InterpretedResultSet<T> = {
};

export type ResultSet =
| RawTableResultSet
| InterpretedResultSet<InterpretationData>;
RawTableResultSet | InterpretedResultSet<InterpretationData>;

/**
* Only ever show this many rows in a raw result table.
Expand Down Expand Up @@ -365,9 +364,7 @@ interface UnhandledErrorMessage {
}

type CommonFromViewMessages =
| ViewLoadedMsg
| TelemetryMessage
| UnhandledErrorMessage;
ViewLoadedMsg | TelemetryMessage | UnhandledErrorMessage;

/**
* Message from the results view to signal a request to change the
Expand Down Expand Up @@ -497,8 +494,7 @@ export interface SetPerformanceComparisonQueries {
export type FromComparePerformanceViewMessage = CommonFromViewMessages;

export type QueryCompareResult =
| RawQueryCompareResult
| InterpretedQueryCompareResult;
RawQueryCompareResult | InterpretedQueryCompareResult;

/**
* from is the set of rows that have changes in the "from" query.
Expand Down
3 changes: 1 addition & 2 deletions extensions/ql-vscode/src/common/logging/vscode/loggers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,7 @@ export const queryServerLogger = new OutputChannelLogger("CodeQL Query Server");

// Logger for messages from the query server for warming overlay-base cache.
let queryServerForWarmingOverlayBaseCacheLogger:
| OutputChannelLogger
| undefined;
OutputChannelLogger | undefined;

// construct queryServerForWarmingOverlayBaseCacheLogger lazily, as most users don't need it
export function getQueryServerForWarmingOverlayBaseCacheLogger(): OutputChannelLogger {
Expand Down
3 changes: 1 addition & 2 deletions extensions/ql-vscode/src/common/raw-result-types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,7 @@ export type UrlValueLineColumnLocation = {
};

export type UrlValueResolvable =
| UrlValueWholeFileLocation
| UrlValueLineColumnLocation;
UrlValueWholeFileLocation | UrlValueLineColumnLocation;

export function isUrlValueResolvable(
value: UrlValue,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -138,8 +138,7 @@ export abstract class AbstractWebview<
}

protected abstract getPanelConfig():
| WebviewPanelConfig
| Promise<WebviewPanelConfig>;
WebviewPanelConfig | Promise<WebviewPanelConfig>;

protected abstract onPanelDispose(): void;

Expand Down
3 changes: 1 addition & 2 deletions extensions/ql-vscode/src/databases/db-item-expansion.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@ import type { DbItem } from "./db-item";
import { DbItemKind, flattenDbItems } from "./db-item";

export type ExpandedDbItem =
| RootRemoteExpandedDbItem
| RemoteUserDefinedListExpandedDbItem;
RootRemoteExpandedDbItem | RemoteUserDefinedListExpandedDbItem;

export enum ExpandedDbItemKind {
RootRemote = "rootRemote",
Expand Down
6 changes: 1 addition & 5 deletions extensions/ql-vscode/src/debugger/debug-session.ts
Original file line number Diff line number Diff line change
Expand Up @@ -118,11 +118,7 @@ class EvaluationCompletedEvent
* Possible states of the debug session. Used primarily to guard against unexpected requests.
*/
type State =
| "uninitialized"
| "initialized"
| "running"
| "stopped"
| "terminated";
"uninitialized" | "initialized" | "running" | "stopped" | "terminated";

// IDs for error messages generated by the debug adapter itself.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -256,12 +256,9 @@ async function readExtensionPack(
}

const dataExtensionValue = qlpack.dataExtensions;
if (
!(
Array.isArray(dataExtensionValue) ||
typeof dataExtensionValue === "string"
)
) {
if (!(
Array.isArray(dataExtensionValue) || typeof dataExtensionValue === "string"
)) {
throw new Error(
`Expected 'dataExtensions' to be a string or an array in ${qlpackPath}`,
);
Expand Down
7 changes: 1 addition & 6 deletions extensions/ql-vscode/src/model-editor/modeled-method.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,7 @@ import { assertNever } from "../common/helpers-pure";
import type { MethodSignature } from "./method";

export type ModeledMethodType =
| "none"
| "source"
| "sink"
| "summary"
| "type"
| "neutral";
"none" | "source" | "sink" | "summary" | "type" | "neutral";

export type Provenance =
// Generated by the dataflow model
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,7 @@ export interface QueryHistoryDto {
}

export type QueryHistoryItemDto =
| QueryHistoryLocalQueryDto
| QueryHistoryVariantAnalysisDto;
QueryHistoryLocalQueryDto | QueryHistoryVariantAnalysisDto;

export enum QueryLanguageDto {
Actions = "actions",
Expand Down
4 changes: 1 addition & 3 deletions extensions/ql-vscode/src/run-queries-shared.ts
Original file line number Diff line number Diff line change
Expand Up @@ -440,9 +440,7 @@ async function getSelectedPosition(
}

type SaveBeforeStartMode =
| "nonUntitledEditorsInActiveGroup"
| "allEditorsInActiveGroup"
| "none";
"nonUntitledEditorsInActiveGroup" | "allEditorsInActiveGroup" | "none";

/**
* Saves dirty files before running queries, based on the user's settings.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,23 +26,13 @@ export interface VariantAnalysis {
}

export type VariantAnalysisStatus =
| "in_progress"
| "succeeded"
| "failed"
| "cancelled";
"in_progress" | "succeeded" | "failed" | "cancelled";

export type VariantAnalysisFailureReason =
| "no_repos_queried"
| "actions_workflow_run_failed"
| "internal_error";
"no_repos_queried" | "actions_workflow_run_failed" | "internal_error";

export type VariantAnalysisRepoStatus =
| "pending"
| "in_progress"
| "succeeded"
| "failed"
| "canceled"
| "timed_out";
"pending" | "in_progress" | "succeeded" | "failed" | "canceled" | "timed_out";

export interface VariantAnalysisScannedRepository {
repository: RepositoryWithMetadata;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,7 @@ export interface AnalysisMessage {
}

export type AnalysisMessageToken =
| AnalysisMessageTextToken
| AnalysisMessageLocationToken;
AnalysisMessageTextToken | AnalysisMessageLocationToken;

interface AnalysisMessageTextToken {
t: "text";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,7 @@ export function AlertTableHeader({
}, [sortState]);

const getNextSortState = useCallback(():
| InterpretedResultsSortState
| undefined => {
InterpretedResultsSortState | undefined => {
const prevDirection =
sortState?.sortBy === "alert-message"
? sortState.sortDirection
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,7 @@ class Tracker implements DebugAdapterTracker {
private started: CodeQLProtocol.EvaluationStartedEvent["body"] | undefined =
undefined;
private completed:
| CodeQLProtocol.EvaluationCompletedEvent["body"]
| undefined = undefined;
CodeQLProtocol.EvaluationCompletedEvent["body"] | undefined = undefined;

public constructor(
private readonly session: DebugSession,
Expand Down