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
2 changes: 1 addition & 1 deletion cursorless.nvim/node/command-server/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"@typescript-eslint/parser": "^8.32.1",
"esbuild": "^0.27.4",
"eslint": "^10.0.0",
"glob": "^13.0.0",
"fast-glob": "^3.3.3",
"mocha": "^8.1.3",
"neovim": "^5.0.1",
"typescript": "^5.8.3",
Expand Down
2 changes: 1 addition & 1 deletion packages/app-neovim/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"main": "./out/index.cjs",
"scripts": {
"typecheck": "tsc",
"clean": "rm -rf ./out tsconfig.tsbuildinfo ./dist ./build",
"clean": "rm -rf ./out ./tsconfig.tsbuildinfo ./dist ./build",
"dev": "pnpm run compile:dev && pnpm run populate-dist",
"build": "pnpm run compile:prod && pnpm run populate-dist",
"compile:prod": "pnpm run compile:base --minify",
Expand Down
2 changes: 1 addition & 1 deletion packages/app-talonjs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"type": "module",
"scripts": {
"typecheck": "tsc",
"clean": "rm -rf ./out tsconfig.tsbuildinfo ./dist ./build",
"clean": "rm -rf ./out ./tsconfig.tsbuildinfo ./dist ./build",
"dev": "pnpm run compile:watch",
"build": "pnpm run compile:prod",
"compile:prod": "pnpm run compile:base --minify src/mainProduction.ts",
Expand Down
4 changes: 2 additions & 2 deletions packages/app-vscode/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -1282,7 +1282,7 @@
},
"scripts": {
"typecheck": "tsc",
"clean": "rm -rf ./out tsconfig.tsbuildinfo ./dist ./build",
"clean": "rm -rf ./out ./tsconfig.tsbuildinfo ./dist ./build",
"test": "pnpm ensure-grammar-up-to-date",
"dev": "pnpm generate-grammar && pnpm run compile:dev && pnpm run bundle:dev && pnpm run populate-dist",
"build": "pnpm generate-grammar && pnpm run compile:prod && pnpm run bundle:prod && pnpm run populate-dist",
Expand Down Expand Up @@ -1315,7 +1315,7 @@
"@cursorless/lib-test-case-recorder": "workspace:*",
"@cursorless/lib-tutorial": "workspace:*",
"@cursorless/lib-vscode-common": "workspace:*",
"glob": "^13.0.6",
"fast-glob": "^3.3.3",
"itertools": "^2.6.0",
"lodash-es": "^4.17.23",
"nearley": "^2.20.1",
Expand Down
11 changes: 8 additions & 3 deletions packages/app-vscode/src/InstallationDependencies.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { isWindows } from "@cursorless/lib-node-common";
import { COMMAND_SERVER_EXTENSION_ID } from "@cursorless/lib-vscode-common";
import { globSync } from "glob";
import glob from "fast-glob";
import * as fs from "node:fs";
import * as os from "node:os";
import * as path from "node:path";
Expand Down Expand Up @@ -130,9 +130,14 @@ function talonHomeExists() {

function cursorlessTalonExists() {
const talonUserPath = path.join(getTalonHomePath(), "user");
const files = globSync("**/*/src/cursorless.talon", {

if (!fs.existsSync(talonUserPath)) {
return false;
}

const files = glob.sync("**/*/src/cursorless.talon", {
cwd: talonUserPath,
maxDepth: 3,
deep: 3,
});
return files.length > 0;
}
Expand Down
2 changes: 1 addition & 1 deletion packages/app-web-docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
},
"scripts": {
"typecheck": "tsc",
"clean": "docusaurus clear && rm -rf ./out tsconfig.tsbuildinfo ./dist ./build",
"clean": "docusaurus clear && rm -rf ./out ./tsconfig.tsbuildinfo ./dist ./build",
"dev": "docusaurus start",
"build": "docusaurus build"
},
Expand Down
2 changes: 1 addition & 1 deletion packages/app-web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"type": "module",
"scripts": {
"typecheck": "tsc",
"clean": "rm -rf ./out tsconfig.tsbuildinfo ./dist ./build",
"clean": "rm -rf ./out ./tsconfig.tsbuildinfo ./dist ./build",
"dev": "env NODE_OPTIONS=--import=tsx vite serve",
"build": "env NODE_OPTIONS=--import=tsx vite build"
},
Expand Down
2 changes: 1 addition & 1 deletion packages/lib-cheatsheet-local/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"type": "module",
"scripts": {
"typecheck": "tsc",
"clean": "rm -rf ./out tsconfig.tsbuildinfo ./dist ./build",
"clean": "rm -rf ./out ./tsconfig.tsbuildinfo ./dist ./build",
"test": "jest",
"dev": "env NODE_OPTIONS=--import=tsx vite serve",
"bundle:prod": "env NODE_OPTIONS=--import=tsx vite build",
Expand Down
2 changes: 1 addition & 1 deletion packages/lib-cheatsheet/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
],
"scripts": {
"typecheck": "tsc",
"clean": "rm -rf ./out tsconfig.tsbuildinfo ./dist ./build",
"clean": "rm -rf ./out ./tsconfig.tsbuildinfo ./dist ./build",
"test": "jest"
},
"dependencies": {
Expand Down
2 changes: 1 addition & 1 deletion packages/lib-common/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
},
"scripts": {
"typecheck": "tsc",
"clean": "rm -rf ./out tsconfig.tsbuildinfo ./dist ./build"
"clean": "rm -rf ./out ./tsconfig.tsbuildinfo ./dist ./build"
},
"dependencies": {
"itertools": "^2.6.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/lib-engine/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
},
"scripts": {
"typecheck": "tsc",
"clean": "rm -rf ./out tsconfig.tsbuildinfo ./dist ./build",
"clean": "rm -rf ./out ./tsconfig.tsbuildinfo ./dist ./build",
"test": "pnpm ensure-grammar-up-to-date",
"generate-grammar:base": "nearleyc src/customCommandGrammar/grammar.ne",
"ensure-grammar-up-to-date": "pnpm -s generate-grammar:base | diff -u src/customCommandGrammar/generated/grammar.ts -",
Expand Down
2 changes: 1 addition & 1 deletion packages/lib-neovim-common/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
},
"scripts": {
"typecheck": "tsc",
"clean": "rm -rf ./out tsconfig.tsbuildinfo ./dist ./build"
"clean": "rm -rf ./out ./tsconfig.tsbuildinfo ./dist ./build"
},
"dependencies": {
"@cursorless/lib-common": "workspace:*",
Expand Down
2 changes: 1 addition & 1 deletion packages/lib-neovim-registry/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
},
"scripts": {
"typecheck": "tsc",
"clean": "rm -rf ./out tsconfig.tsbuildinfo ./dist ./build"
"clean": "rm -rf ./out ./tsconfig.tsbuildinfo ./dist ./build"
},
"devDependencies": {
"neovim": "^5.4.0"
Expand Down
4 changes: 2 additions & 2 deletions packages/lib-node-common/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@
},
"scripts": {
"typecheck": "tsc",
"clean": "rm -rf ./out tsconfig.tsbuildinfo ./dist ./build"
"clean": "rm -rf ./out ./tsconfig.tsbuildinfo ./dist ./build"
},
"dependencies": {
"@cursorless/lib-common": "workspace:*",
"glob": "^13.0.6",
"fast-glob": "^3.3.3",
"immer": "^11.1.4",
"lodash-es": "^4.17.23",
"node-html-parser": "^7.1.0"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import type {
CommandHistoryEntry,
CommandHistoryStorage,
} from "@cursorless/lib-common";
import { glob } from "glob";
import glob from "fast-glob";
import * as fs from "node:fs/promises";
import * as path from "node:path";

Expand All @@ -24,6 +24,8 @@ export class FileSystemCommandHistoryStorage implements CommandHistoryStorage {
cwd: this.dir,
});

files.sort();

const entries: CommandHistoryEntry[] = [];

for (const file of files) {
Expand Down
2 changes: 1 addition & 1 deletion packages/lib-sentence-parser/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
},
"scripts": {
"typecheck": "tsc",
"clean": "rm -rf ./out tsconfig.tsbuildinfo ./dist ./build"
"clean": "rm -rf ./out ./tsconfig.tsbuildinfo ./dist ./build"
},
"devDependencies": {
"@types/mocha": "^10.0.10",
Expand Down
2 changes: 1 addition & 1 deletion packages/lib-talonjs-core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
},
"scripts": {
"typecheck": "tsc",
"clean": "rm -rf ./out tsconfig.tsbuildinfo ./dist ./build"
"clean": "rm -rf ./out ./tsconfig.tsbuildinfo ./dist ./build"
},
"dependencies": {
"@cursorless/lib-common": "workspace:*",
Expand Down
4 changes: 2 additions & 2 deletions packages/lib-test-case-recorder/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@
},
"scripts": {
"typecheck": "tsc",
"clean": "rm -rf ./out tsconfig.tsbuildinfo ./dist ./build"
"clean": "rm -rf ./out ./tsconfig.tsbuildinfo ./dist ./build"
},
"dependencies": {
"@cursorless/lib-common": "workspace:*",
"@cursorless/lib-engine": "workspace:*",
"@cursorless/lib-node-common": "workspace:*",
"glob": "^13.0.6",
"fast-glob": "^3.3.3",
"immutability-helper": "^3.1.1",
"lodash-es": "^4.17.23"
},
Expand Down
2 changes: 1 addition & 1 deletion packages/lib-tutorial/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
},
"scripts": {
"typecheck": "tsc",
"clean": "rm -rf ./out tsconfig.tsbuildinfo ./dist ./build"
"clean": "rm -rf ./out ./tsconfig.tsbuildinfo ./dist ./build"
},
"dependencies": {
"@cursorless/lib-common": "workspace:*",
Expand Down
2 changes: 1 addition & 1 deletion packages/lib-vscode-common/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
},
"scripts": {
"typecheck": "tsc",
"clean": "rm -rf ./out tsconfig.tsbuildinfo ./dist ./build"
"clean": "rm -rf ./out ./tsconfig.tsbuildinfo ./dist ./build"
},
"dependencies": {
"@cursorless/lib-common": "workspace:*"
Expand Down
2 changes: 1 addition & 1 deletion packages/lib-vscode-tutorial-webview/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"type": "module",
"scripts": {
"typecheck": "tsc",
"clean": "rm -rf ./out tsconfig.tsbuildinfo ./dist ./build",
"clean": "rm -rf ./out ./tsconfig.tsbuildinfo ./dist ./build",
"dev": "env NODE_OPTIONS=--import=tsx vite serve",
"bundle:prod": "env NODE_OPTIONS=--import=tsx vite build",
"bundle:dev": "env NODE_OPTIONS=--import=tsx vite build --mode development",
Expand Down
2 changes: 1 addition & 1 deletion packages/test-neovim-e2e/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"type": "module",
"scripts": {
"typecheck": "tsc",
"clean": "rm -rf ./out tsconfig.tsbuildinfo ./dist ./build"
"clean": "rm -rf ./out ./tsconfig.tsbuildinfo ./dist ./build"
},
"dependencies": {
"@cursorless/lib-common": "workspace:*",
Expand Down
4 changes: 2 additions & 2 deletions packages/test-runner/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"main": "./out/extensionTestsNeovim.cjs",
"scripts": {
"typecheck": "tsc",
"clean": "rm -rf ./out tsconfig.tsbuildinfo ./dist ./build",
"clean": "rm -rf ./out ./tsconfig.tsbuildinfo ./dist ./build",
"test": "c-tsx ./src/scripts/runUnitTests.ts",
"test:subset": "c-tsx ./src/scripts/runUnitTests.ts --subset",
"test:update": "c-tsx ./src/scripts/runUnitTests.ts --update",
Expand All @@ -26,7 +26,7 @@
"@cursorless/lib-neovim-common": "workspace:*",
"@cursorless/lib-neovim-registry": "workspace:*",
"@cursorless/lib-node-common": "workspace:*",
"glob": "^13.0.6",
"fast-glob": "^3.3.3",
"neovim": "^5.4.0",
"tail": "^2.2.6"
},
Expand Down
9 changes: 5 additions & 4 deletions packages/test-runner/src/runAllTests.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { getCursorlessRepoRoot } from "@cursorless/lib-node-common";
import { glob } from "glob";
import glob from "fast-glob";
import Mocha from "mocha";
import * as path from "node:path";
import {
Expand Down Expand Up @@ -34,7 +34,7 @@ export function runAllTests(type: TestType): Promise<void> {
const testRoot = path.join(getCursorlessRepoRoot(), "packages");

let filePattern: string;
let ignore: string[] | undefined = undefined;
let ignore: string[] = [];

switch (type) {
case TestType.unit:
Expand Down Expand Up @@ -64,7 +64,7 @@ export function runAllTests(type: TestType): Promise<void> {
async function runTestsInDir(
testRoot: string,
filePattern: string,
ignore: string[] | undefined,
ignore: string[],
): Promise<void> {
// Create the mocha test
const mocha = new Mocha({
Expand All @@ -75,7 +75,8 @@ async function runTestsInDir(

const files = await glob(`**/*.${filePattern}`, {
cwd: testRoot,
ignore,
followSymbolicLinks: false,
ignore: ["**/node_modules/**", ...ignore],
});

if (files.length === 0) {
Expand Down
2 changes: 1 addition & 1 deletion packages/test-talon-e2e/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"type": "module",
"scripts": {
"typecheck": "tsc",
"clean": "rm -rf ./out tsconfig.tsbuildinfo ./dist ./build",
"clean": "rm -rf ./out ./tsconfig.tsbuildinfo ./dist ./build",
"test:quickjs": "bash ./scripts/test-quickjs.sh"
},
"dependencies": {
Expand Down
2 changes: 1 addition & 1 deletion packages/test-vscode-e2e/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"type": "module",
"scripts": {
"typecheck": "tsc",
"clean": "rm -rf ./out tsconfig.tsbuildinfo ./dist ./build"
"clean": "rm -rf ./out ./tsconfig.tsbuildinfo ./dist ./build"
},
"dependencies": {
"@cursorless/lib-common": "workspace:*",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,33 +1,38 @@
import { LATEST_VERSION } from "@cursorless/lib-common";
import { isLinux } from "@cursorless/lib-node-common";
import { LATEST_VERSION, splitKey } from "@cursorless/lib-common";
import {
getCellIndex,
getCursorlessApi,
openNewNotebookEditor,
runCursorlessCommand,
} from "@cursorless/lib-vscode-common";
import assert from "assert";
import { window } from "vscode";
import { endToEndTestSetup } from "../endToEndTestSetup";
import { isCI } from "../isCI";

// Check that setSelection is able to focus the correct cell
suite("Cross-cell set selection", async function () {
// FIXME: This test is flaky on Linux CI, so we skip it there for now
if (isCI() && isLinux()) {
this.ctx.skip();
}

endToEndTestSetup(this);

test("Cross-cell set selection", runTest);
});

async function runTest() {
const { hatTokenMap } = (await getCursorlessApi()).testHelpers!;
const { hatTokenMap, toVscodeEditor } = (await getCursorlessApi())
.testHelpers!;

await openNewNotebookEditor(['"hello"', '"world"']);
const notebook = await openNewNotebookEditor(['"hello"', '"world"']);

await hatTokenMap.allocateHats();
const hatMap = await hatTokenMap.getReadableMap(false);
const targetHat = hatMap.getEntries().find(([, token]) => {
const editor = toVscodeEditor(token.editor);
return (
getCellIndex(notebook, editor.document) === 1 && token.text === "world"
);
});

assert(targetHat != null, 'Expected a hat for "world" in the second cell');
const { hatStyle, character } = splitKey(targetHat[0]);

await runCursorlessCommand({
version: LATEST_VERSION,
Expand All @@ -38,8 +43,8 @@ async function runTest() {
type: "primitive",
mark: {
type: "decoratedSymbol",
symbolColor: "default",
character: "o",
symbolColor: hatStyle,
character,
},
},
},
Expand Down
Loading
Loading