Skip to content

Bump prettier from 2.7.1 to 3.0.0 in /extensions/ql-vscode #2586

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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
731 changes: 704 additions & 27 deletions extensions/ql-vscode/package-lock.json

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions extensions/ql-vscode/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -1845,7 +1845,7 @@
"eslint-plugin-etc": "^2.0.2",
"eslint-plugin-github": "^4.4.1",
"eslint-plugin-jest-dom": "^5.0.1",
"eslint-plugin-prettier": "^4.2.1",
"eslint-plugin-prettier": "^5.0.0",
"eslint-plugin-react": "^7.31.8",
"eslint-plugin-react-hooks": "^4.6.0",
"eslint-plugin-storybook": "^0.6.4",
Expand All @@ -1866,7 +1866,7 @@
"mini-css-extract-plugin": "^2.6.1",
"npm-run-all": "^4.1.5",
"patch-package": "^7.0.0",
"prettier": "^2.7.1",
"prettier": "^3.0.0",
"tar-stream": "^3.0.0",
"through2": "^4.0.2",
"ts-jest": "^29.0.1",
Expand Down
5 changes: 4 additions & 1 deletion extensions/ql-vscode/src/codeql-cli/distribution.ts
Original file line number Diff line number Diff line change
Expand Up @@ -954,7 +954,10 @@ export interface GithubReleaseAsset {
}

export class GithubApiError extends Error {
constructor(public status: number, public body: string) {
constructor(
public status: number,
public body: string,
) {
super(`API call failed with status code ${status}, body: ${body}`);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,10 @@ export class File implements vscode.FileStat {
mtime: number;
size: number;

constructor(public name: string, public data: Uint8Array) {
constructor(
public name: string,
public data: Uint8Array,
) {
this.type = vscode.FileType.File;
this.ctime = Date.now();
this.mtime = Date.now();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,10 @@ export abstract class FilePathDiscovery<T extends PathData> extends Discovery {
* @param name Name of the discovery operation, for logging purposes.
* @param fileWatchPattern Passed to `vscode.RelativePattern` to determine the files to watch for changes to.
*/
constructor(name: string, private readonly fileWatchPattern: string) {
constructor(
name: string,
private readonly fileWatchPattern: string,
) {
super(name, extLogger);

this.onDidChangePathDataEmitter = this.push(new EventEmitter<void>());
Expand Down
5 changes: 4 additions & 1 deletion extensions/ql-vscode/src/common/vscode/progress.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,10 @@ export class UserCancellationException extends Error {
* @param message The error message
* @param silent If silent is true, then this exception will avoid showing a warning message to the user.
*/
constructor(message?: string, public readonly silent = false) {
constructor(
message?: string,
public readonly silent = false,
) {
super(message);
}
}
Expand Down
8 changes: 4 additions & 4 deletions extensions/ql-vscode/src/common/vscode/webview-html.ts
Original file line number Diff line number Diff line change
Expand Up @@ -72,10 +72,10 @@ export function getHtmlForWebview(
<head>
<meta http-equiv="Content-Security-Policy"
content="default-src 'none'; script-src 'nonce-${nonce}'${
allowWasmEval ? " 'wasm-unsafe-eval'" : ""
}; font-src ${fontSrc}; style-src ${styleSrc}; connect-src ${
webview.cspSource
};">
allowWasmEval ? " 'wasm-unsafe-eval'" : ""
}; font-src ${fontSrc}; style-src ${styleSrc}; connect-src ${
webview.cspSource
};">
${stylesheetsHtmlLines.join(` ${EOL}`)}
</head>
<body>
Expand Down
2 changes: 1 addition & 1 deletion extensions/ql-vscode/src/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -693,7 +693,7 @@ const AUTOGENERATE_QL_PACKS = new Setting(
);

const AutogenerateQLPacksValues = ["ask", "never"] as const;
type AutogenerateQLPacks = typeof AutogenerateQLPacksValues[number];
type AutogenerateQLPacks = (typeof AutogenerateQLPacksValues)[number];

export function getAutogenerateQlPacks(): AutogenerateQLPacks {
const value = AUTOGENERATE_QL_PACKS.getValue<AutogenerateQLPacks>();
Expand Down
5 changes: 2 additions & 3 deletions extensions/ql-vscode/src/extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -216,9 +216,8 @@ function getCommands(
"codeQL.restartLegacyQueryServerOnConfigChange": restartQueryServer,
"codeQL.restartQueryServerOnExternalConfigChange": restartQueryServer,
"codeQL.copyVersion": async () => {
const text = `CodeQL extension version: ${
extension?.packageJSON.version
} \nCodeQL CLI version: ${await getCliVersion()} \nPlatform: ${platform()} ${arch()}`;
const text = `CodeQL extension version: ${extension?.packageJSON
.version} \nCodeQL CLI version: ${await getCliVersion()} \nPlatform: ${platform()} ${arch()}`;
await env.clipboard.writeText(text);
void showAndLogInformationMessage(extLogger, text);
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,10 @@ export class TemplatePrintAstProvider {
export class TemplatePrintCfgProvider {
private cache: CachedOperation<[Uri, Record<string, string>] | undefined>;

constructor(private cli: CodeQLCliServer, private dbm: DatabaseManager) {
constructor(
private cli: CodeQLCliServer,
private dbm: DatabaseManager,
) {
this.cache = new CachedOperation<[Uri, Record<string, string>] | undefined>(
this.getCfgUri.bind(this),
);
Expand Down
5 changes: 4 additions & 1 deletion extensions/ql-vscode/src/query-testing/test-ui.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,10 @@ class QLTestListener extends DisposableObject {
export class TestUIService extends TestManagerBase implements TestController {
private readonly listeners: Map<TestAdapter, QLTestListener> = new Map();

public constructor(app: App, private readonly testHub: TestHub) {
public constructor(
app: App,
private readonly testHub: TestHub,
) {
super(app);

testHub.registerTestController(this);
Expand Down
11 changes: 7 additions & 4 deletions extensions/ql-vscode/src/variant-analysis/export-results.ts
Original file line number Diff line number Diff line change
Expand Up @@ -289,10 +289,13 @@ export async function exportToGist(
}

// Convert markdownFiles to the appropriate format for uploading to gist
const gistFiles = markdownFiles.reduce((acc, cur) => {
acc[`${cur.fileName}.md`] = { content: cur.content.join("\n") };
return acc;
}, {} as { [key: string]: { content: string } });
const gistFiles = markdownFiles.reduce(
(acc, cur) => {
acc[`${cur.fileName}.md`] = { content: cur.content.join("\n") };
return acc;
},
{} as { [key: string]: { content: string } },
);

const gistUrl = await createGist(credentials, description, gistFiles);
if (gistUrl) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -158,8 +158,8 @@ export function filterAndSortRepositoriesWithResults<
filterSortState.repositoryIds.length > 0
) {
return repositories
.filter((repo) =>
filterSortState.repositoryIds?.includes(repo.repository.id),
.filter(
(repo) => filterSortState.repositoryIds?.includes(repo.repository.id),
)
.sort(compareWithResults(filterSortState));
}
Expand Down