Skip to content

Commit 31e44d6

Browse files
Run latest stable vscode version in CI tests (#2911)
Currently on version `1.99.3` and ci still crashes. Fixes #2878
1 parent 62be1ab commit 31e44d6

File tree

2 files changed

+10
-5
lines changed

2 files changed

+10
-5
lines changed

packages/cursorless-vscode/src/ide/vscode/VscodeCapabilities.ts

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,16 @@
11
import type { Capabilities, CommandCapabilityMap } from "@cursorless/common";
2+
import { nodeGetRunMode } from "@cursorless/node-common";
3+
import * as semver from "semver";
4+
import * as vscode from "vscode";
5+
6+
// FIXME: In newer versions of vscode the `editor.action.clipboardCopyAction`
7+
// command appears to be disabled / sandboxed in test mode.
8+
const supportsCopy =
9+
nodeGetRunMode() !== "test" || semver.lt(vscode.version, "1.98.0");
210

311
const COMMAND_CAPABILITIES: CommandCapabilityMap = {
12+
clipboardCopy: supportsCopy ? { acceptsLocation: false } : undefined,
413
clipboardPaste: true,
5-
clipboardCopy: { acceptsLocation: false },
614
toggleLineComment: { acceptsLocation: false },
715
indentLine: { acceptsLocation: false },
816
outdentLine: { acceptsLocation: false },

packages/test-harness/src/launchVscodeAndRunTests.ts

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,7 @@ export async function launchVscodeAndRunTests(extensionTestsPath: string) {
3535
// we don't have to update the branch protection rules every time we bump
3636
// the legacy VSCode version.
3737

38-
// NB: Because of a CI crashing issue the vscode version is pinned.
39-
// https://github.com/cursorless-dev/cursorless/issues/2878
40-
41-
const vscodeVersion = useLegacyVscode ? "1.82.0" : "1.97.2";
38+
const vscodeVersion = useLegacyVscode ? "1.82.0" : "stable";
4239
const vscodeExecutablePath = await downloadAndUnzipVSCode(vscodeVersion);
4340
const [cli, ...args] =
4441
resolveCliArgsFromVSCodeExecutablePath(vscodeExecutablePath);

0 commit comments

Comments
 (0)