Skip to content

Commit 66f12bf

Browse files
authored
Make the "Create query" location workspace-specific (#2769)
1 parent 11ca60f commit 66f12bf

File tree

3 files changed

+7
-4
lines changed

3 files changed

+7
-4
lines changed

extensions/ql-vscode/src/config.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -670,7 +670,7 @@ export function getQlPackLocation(): string | undefined {
670670
}
671671

672672
export async function setQlPackLocation(folder: string | undefined) {
673-
await QL_PACK_LOCATION.updateValue(folder, ConfigurationTarget.Global);
673+
await QL_PACK_LOCATION.updateValue(folder, ConfigurationTarget.Workspace);
674674
}
675675

676676
/**
@@ -690,7 +690,10 @@ export function getAutogenerateQlPacks(): AutogenerateQLPacks {
690690
}
691691

692692
export async function setAutogenerateQlPacks(choice: AutogenerateQLPacks) {
693-
await AUTOGENERATE_QL_PACKS.updateValue(choice, ConfigurationTarget.Global);
693+
await AUTOGENERATE_QL_PACKS.updateValue(
694+
choice,
695+
ConfigurationTarget.Workspace,
696+
);
694697
}
695698

696699
/**

extensions/ql-vscode/test/vscode-tests/cli-integration/local-queries/skeleton-query-wizard.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -399,7 +399,7 @@ describe("SkeletonQueryWizard", () => {
399399

400400
await wizard.determineStoragePath();
401401

402-
expect(updateValueSpy).toHaveBeenCalledWith(storagePath, 1);
402+
expect(updateValueSpy).toHaveBeenCalledWith(storagePath, 2);
403403
});
404404

405405
describe("when the user is using the codespace template", () => {

extensions/ql-vscode/test/vscode-tests/minimal-workspace/local-queries/local-databases.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -628,7 +628,7 @@ describe("local databases", () => {
628628
await (databaseManager as any).createSkeletonPacks(mockDbItem);
629629

630630
expect(generateSpy).not.toBeCalled();
631-
expect(updateValueSpy).toHaveBeenCalledWith("never", 1);
631+
expect(updateValueSpy).toHaveBeenCalledWith("never", 2);
632632
});
633633

634634
it("should create the skeleton QL pack for the user", async () => {

0 commit comments

Comments
 (0)