Skip to content

Commit d861772

Browse files
author
Dave Bartolomeo
authored
Merge pull request #2323 from github/dbartol/update-vscode-types
Update `@types/vscode` and fix naming conflicts
2 parents 8e40d7d + 3eaa996 commit d861772

File tree

5 files changed

+25
-18
lines changed

5 files changed

+25
-18
lines changed

extensions/ql-vscode/package-lock.json

Lines changed: 7 additions & 7 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

extensions/ql-vscode/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1531,7 +1531,7 @@
15311531
"@types/through2": "^2.0.36",
15321532
"@types/tmp": "^0.1.0",
15331533
"@types/unzipper": "~0.10.1",
1534-
"@types/vscode": "^1.59.0",
1534+
"@types/vscode": "^1.67.0",
15351535
"@types/webpack": "^5.28.0",
15361536
"@types/webpack-env": "^1.18.0",
15371537
"@types/xml2js": "~0.4.4",

extensions/ql-vscode/src/databases/ui/db-panel.ts

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -34,11 +34,11 @@ import { DatabasePanelCommands } from "../../common/commands";
3434
import { App } from "../../common/app";
3535

3636
export interface RemoteDatabaseQuickPickItem extends QuickPickItem {
37-
kind: string;
37+
remoteDatabaseKind: string;
3838
}
3939

4040
export interface AddListQuickPickItem extends QuickPickItem {
41-
kind: DbListKind;
41+
databaseKind: DbListKind;
4242
}
4343

4444
export class DbPanel extends DisposableObject {
@@ -113,19 +113,19 @@ export class DbPanel extends DisposableObject {
113113
) {
114114
await this.addNewRemoteRepo(highlightedItem.parentListName);
115115
} else {
116-
const quickPickItems = [
116+
const quickPickItems: RemoteDatabaseQuickPickItem[] = [
117117
{
118118
label: "$(repo) From a GitHub repository",
119119
detail: "Add a variant analysis repository from GitHub",
120120
alwaysShow: true,
121-
kind: "repo",
121+
remoteDatabaseKind: "repo",
122122
},
123123
{
124124
label: "$(organization) All repositories of a GitHub org or owner",
125125
detail:
126126
"Add a variant analysis list of repositories from a GitHub organization/owner",
127127
alwaysShow: true,
128-
kind: "owner",
128+
remoteDatabaseKind: "owner",
129129
},
130130
];
131131
const databaseKind =
@@ -142,9 +142,9 @@ export class DbPanel extends DisposableObject {
142142
// We set 'true' to make this a silent exception.
143143
throw new UserCancellationException("No repository selected", true);
144144
}
145-
if (databaseKind.kind === "repo") {
145+
if (databaseKind.remoteDatabaseKind === "repo") {
146146
await this.addNewRemoteRepo();
147-
} else if (databaseKind.kind === "owner") {
147+
} else if (databaseKind.remoteDatabaseKind === "owner") {
148148
await this.addNewRemoteOwner();
149149
}
150150
}

extensions/ql-vscode/test/vscode-tests/activated-extension/databases/db-panel.test.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ describe("Db panel UI commands", () => {
5353
it.skip("should add new local db list", async () => {
5454
// Add db list
5555
jest.spyOn(window, "showQuickPick").mockResolvedValue({
56-
kind: DbListKind.Local,
56+
databaseKind: DbListKind.Local,
5757
} as AddListQuickPickItem);
5858
jest.spyOn(window, "showInputBox").mockResolvedValue("my-list-1");
5959
await commandManager.execute(
@@ -73,7 +73,7 @@ describe("Db panel UI commands", () => {
7373
it("should add new remote repository", async () => {
7474
// Add db
7575
jest.spyOn(window, "showQuickPick").mockResolvedValue({
76-
kind: "repo",
76+
remoteDatabaseKind: "repo",
7777
} as RemoteDatabaseQuickPickItem);
7878

7979
jest.spyOn(window, "showInputBox").mockResolvedValue("owner1/repo1");
@@ -96,7 +96,7 @@ describe("Db panel UI commands", () => {
9696
it("should add new remote owner", async () => {
9797
// Add owner
9898
jest.spyOn(window, "showQuickPick").mockResolvedValue({
99-
kind: "owner",
99+
remoteDatabaseKind: "owner",
100100
} as RemoteDatabaseQuickPickItem);
101101

102102
jest.spyOn(window, "showInputBox").mockResolvedValue("owner1");

extensions/ql-vscode/test/vscode-tests/no-workspace/helpers.test.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -272,6 +272,13 @@ describe("helpers", () => {
272272
class MockEnvironmentVariableCollection
273273
implements EnvironmentVariableCollection
274274
{
275+
[Symbol.iterator](): Iterator<
276+
[variable: string, mutator: EnvironmentVariableMutator],
277+
any,
278+
undefined
279+
> {
280+
throw new Error("Method not implemented.");
281+
}
275282
persistent = false;
276283
replace(_variable: string, _value: string): void {
277284
throw new Error("Method not implemented.");

0 commit comments

Comments
 (0)