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 .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ repos:
- id: ruff-format

- repo: https://github.com/cursorless-dev/talon-tools
rev: v0.8.0
rev: v0.9.0
hooks:
- id: talon-fmt
- id: tree-sitter-fmt
Expand Down
1 change: 1 addition & 0 deletions cursorless-talon-dev/src/cursorless_dev_vscode.talon
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
app: vscode
win.title: /cursorless/
-

^install local$:
user.run_rpc_command("workbench.action.tasks.runTask", "Install local")
^uninstall local$:
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,13 +40,13 @@
"eslint-plugin-mocha": "^11.2.0",
"oxfmt": "^0.41.0",
"oxlint": "^1.56.0",
"oxlint-tsgolint": "^0.17.2",
"oxlint-tsgolint": "^0.17.3",
"stylelint": "^17.5.0",
"stylelint-config-standard": "^40.0.0",
"stylelint-config-standard-scss": "^17.0.0",
"syncpack": "^14.2.1",
"tsx": "^4.21.0",
"typescript": "^5.9.3"
"typescript": "^6.0.2"
},
"pnpm": {
"patchedDependencies": {
Expand Down
3 changes: 3 additions & 0 deletions packages/app-talonjs/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
{
"extends": "../../tsconfig.base.json",
"compilerOptions": {
"types": ["node"]
},
"include": [
"src/**/*.ts",
"src/**/*.json",
Expand Down
3 changes: 2 additions & 1 deletion packages/app-vscode/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -1327,13 +1327,14 @@
"devDependencies": {
"@types/fs-extra": "^11.0.4",
"@types/lodash-es": "^4.17.12",
"@types/mocha": "^10.0.10",
"@types/nearley": "^2.11.5",
"@types/node": "^24.12.0",
"@types/semver": "^7.7.1",
"@types/sinon": "^21.0.0",
"@types/vscode": "1.98.0",
"esbuild": "^0.27.4",
"fast-xml-parser": "^5.5.8",
"fast-xml-parser": "^5.5.9",
"fs-extra": "^11.3.4",
"sinon": "^21.0.3",
"tsx": "^4.21.0"
Expand Down
3 changes: 3 additions & 0 deletions packages/app-vscode/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
{
"extends": "../../tsconfig.base.json",
"compilerOptions": {
"types": ["node", "mocha"]
},
"include": [
"src/**/*.ts",
"src/**/*.json",
Expand Down
4 changes: 3 additions & 1 deletion packages/app-web-docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,11 @@
"@docusaurus/module-type-aliases": "^3.9.2",
"@docusaurus/types": "^3.9.2",
"@types/mdast": "^4.0.4",
"@types/mocha": "^10.0.10",
"@types/node": "^24.12.0",
"@types/react": "^19.2.14",
"sass": "^1.98.0",
"typescript": "^5.9.3",
"typescript": "^6.0.2",
"unified": "^11.0.5"
}
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { BorderStyle, Range } from "@cursorless/lib-common";
import * as assert from "assert";
import * as assert from "node:assert";
import { flattenHighlights } from "./flattenHighlights";
import type { Highlight, Scope } from "./types";

Expand Down
7 changes: 6 additions & 1 deletion packages/app-web-docs/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,12 @@
"jsx": "react-jsx",
"jsxImportSource": "react",
"skipLibCheck": true,
"types": ["@docusaurus/theme-classic", "@docusaurus/module-type-aliases"]
"types": [
"node",
"mocha",
"@docusaurus/theme-classic",
"@docusaurus/module-type-aliases"
]
},
"include": [
"src/**/*.ts",
Expand Down
4 changes: 2 additions & 2 deletions packages/app-web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@
},
"devDependencies": {
"@types/node": "^24.12.0",
"typescript": "^5.9.3",
"vite": "^8.0.1",
"typescript": "^6.0.2",
"vite": "^8.0.2",
"vite-plugin-purgecss": "^0.2.13",
"vite-plugin-svgr": "^4.5.0"
}
Expand Down
3 changes: 3 additions & 0 deletions packages/lib-cheatsheet-local/jest.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ import { preactModuleNameMapper } from "@cursorless/lib-common/jest";
const config: Config = {
preset: "ts-jest",
testEnvironment: "jsdom",
transform: {
"^.+\\.tsx?$": ["ts-jest", { tsconfig: "<rootDir>/tsconfig.jest.json" }],
},
moduleNameMapper: {
...preactModuleNameMapper,
"\\.(css|scss)$": "<rootDir>/src/test/styleMock.ts",
Expand Down
4 changes: 2 additions & 2 deletions packages/lib-cheatsheet-local/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@
"@types/jest": "^30.0.0",
"@types/node": "^24.12.0",
"jest": "^30.3.0",
"typescript": "^5.9.3",
"vite": "^8.0.1",
"typescript": "^6.0.2",
"vite": "^8.0.2",
"vite-plugin-purgecss": "^0.2.13",
"vite-plugin-singlefile": "^2.3.2"
}
Expand Down
8 changes: 8 additions & 0 deletions packages/lib-cheatsheet-local/tsconfig.jest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"extends": "./tsconfig.json",
"compilerOptions": {
"ignoreDeprecations": "6.0",
"module": "commonjs",
"moduleResolution": "bundler"
}
}
3 changes: 3 additions & 0 deletions packages/lib-cheatsheet-local/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
{
"extends": "../../tsconfig.web.json",
"compilerOptions": {
"types": ["jest"]
},
"include": [
"src/**/*.ts",
"src/**/*.tsx",
Expand Down
3 changes: 3 additions & 0 deletions packages/lib-cheatsheet/jest.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ import { preactModuleNameMapper } from "@cursorless/lib-common/jest";
const config: Config = {
preset: "ts-jest",
testEnvironment: "jsdom",
transform: {
"^.+\\.tsx?$": ["ts-jest", { tsconfig: "<rootDir>/tsconfig.jest.json" }],
},
moduleNameMapper: {
...preactModuleNameMapper,
"\\.(css|scss)$": "<rootDir>/src/test/styleMock.ts",
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 @@ -26,6 +26,6 @@
"jest": "^30.3.0",
"jest-environment-jsdom": "^30.3.0",
"ts-jest": "^29.4.6",
"typescript": "^5.9.3"
"typescript": "^6.0.2"
}
}
8 changes: 8 additions & 0 deletions packages/lib-cheatsheet/tsconfig.jest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"extends": "./tsconfig.json",
"compilerOptions": {
"ignoreDeprecations": "6.0",
"module": "commonjs",
"moduleResolution": "bundler"
}
}
3 changes: 3 additions & 0 deletions packages/lib-cheatsheet/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
{
"extends": "../../tsconfig.web.json",
"compilerOptions": {
"types": ["jest"]
},
"include": [
"src/**/*.ts",
"src/**/*.tsx",
Expand Down
1 change: 0 additions & 1 deletion packages/lib-common/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@
"cross-spawn": "^7.0.6",
"fast-check": "^4.6.0",
"js-yaml": "^4.1.1",
"mocha": "^11.7.5",
"web-tree-sitter": "^0.26.7"
}
}
3 changes: 3 additions & 0 deletions packages/lib-common/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
{
"extends": "../../tsconfig.base.json",
"compilerOptions": {
"types": ["node", "mocha"]
},
"include": [
"src/**/*.ts",
"src/**/*.json",
Expand Down
3 changes: 1 addition & 2 deletions packages/lib-engine/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"@cursorless/lib-common": "workspace:*",
"@cursorless/lib-node-common": "workspace:*",
"@cursorless/lib-sentence-parser": "workspace:*",
"@cursorless/talon-tools": "^0.8.0",
"@cursorless/talon-tools": "^0.9.0",
"immer": "^11.1.4",
"immutability-helper": "^3.1.1",
"itertools": "^2.6.0",
Expand All @@ -39,7 +39,6 @@
"@types/nearley": "^2.11.5",
"chai": "^6.2.2",
"js-yaml": "^4.1.1",
"mocha": "^11.7.5",
"web-tree-sitter": "^0.26.7"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -208,8 +208,13 @@ class ShrinkToMatch extends QueryPredicateOperator<ShrinkToMatch> {
throw new Error(`No match for pattern '${pattern}'`);
}

const [startOffset, endOffset] =
match.indices?.groups?.keep ?? match.indices![0];
const offsets = match.indices?.groups?.keep ?? match.indices?.[0];

if (offsets == null) {
throw new Error(`No match indices for pattern '${pattern}'`);
}

const [startOffset, endOffset] = offsets;

const baseOffset = document.offsetAt(range.start);

Expand Down
3 changes: 3 additions & 0 deletions packages/lib-engine/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
{
"extends": "../../tsconfig.base.json",
"compilerOptions": {
"types": ["node", "mocha"]
},
"include": [
"src/**/*.ts",
"src/**/*.json",
Expand Down
6 changes: 3 additions & 3 deletions packages/lib-neovim-registry/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { NeovimRegistry } from "./NeovimRegistry";

export function getNeovimRegistry(): NeovimRegistry {
if ((global as any)._neovimRegistry == null) {
(global as any)._neovimRegistry = new NeovimRegistry();
if ((globalThis as any)._neovimRegistry == null) {
(globalThis as any)._neovimRegistry = new NeovimRegistry();
}
return (global as any)._neovimRegistry;
return (globalThis as any)._neovimRegistry;
}
3 changes: 3 additions & 0 deletions packages/lib-neovim-registry/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
{
"extends": "../../tsconfig.base.json",
"compilerOptions": {
"types": ["node"]
},
"include": [
"src/**/*.ts",
"src/**/*.json",
Expand Down
5 changes: 2 additions & 3 deletions packages/lib-sentence-parser/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@cursorless/lib-sentence-parser",
"version": "1.0.0",
"version": "0.1.0",
"description": "Parse text for sentence boundary detection",
"license": "MIT",
"type": "module",
Expand All @@ -12,7 +12,6 @@
"clean": "rm -rf ./out ./dist ./tsconfig.tsbuildinfo"
},
"devDependencies": {
"@types/mocha": "^10.0.10",
"mocha": "^11.7.5"
"@types/mocha": "^10.0.10"
}
}
3 changes: 3 additions & 0 deletions packages/lib-sentence-parser/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
{
"extends": "../../tsconfig.base.json",
"compilerOptions": {
"types": ["node", "mocha"]
},
"include": [
"src/**/*.ts",
"src/**/*.json",
Expand Down
3 changes: 3 additions & 0 deletions packages/lib-talonjs-core/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
{
"extends": "../../tsconfig.base.json",
"compilerOptions": {
"types": ["node"]
},
"include": [
"src/**/*.ts",
"src/**/*.json",
Expand Down
3 changes: 3 additions & 0 deletions packages/lib-tutorial/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
{
"extends": "../../tsconfig.base.json",
"compilerOptions": {
"types": ["node"]
},
"include": [
"src/**/*.ts",
"src/**/*.json",
Expand Down
3 changes: 3 additions & 0 deletions packages/lib-vscode-common/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
{
"extends": "../../tsconfig.base.json",
"compilerOptions": {
"types": ["node"]
},
"include": [
"src/**/*.ts",
"src/**/*.json",
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 @@ -20,7 +20,7 @@
},
"devDependencies": {
"@types/vscode-webview": "^1.57.5",
"vite": "^8.0.1",
"vite": "^8.0.2",
"vite-plugin-purgecss": "^0.2.13"
}
}
1 change: 1 addition & 0 deletions packages/test-neovim-e2e/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
},
"devDependencies": {
"@types/js-yaml": "^4.0.9",
"@types/mocha": "^10.0.10",
"@types/sinon": "^21.0.0",
"js-yaml": "^4.1.1",
"neovim": "^5.4.0",
Expand Down
3 changes: 3 additions & 0 deletions packages/test-neovim-e2e/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
{
"extends": "../../tsconfig.base.json",
"compilerOptions": {
"types": ["node", "mocha"]
},
"include": [
"src/**/*.ts",
"src/**/*.json",
Expand Down
3 changes: 1 addition & 2 deletions packages/test-talon-e2e/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
},
"devDependencies": {
"@types/mocha": "^10.0.10",
"esbuild": "^0.27.4",
"mocha": "^11.7.5"
"esbuild": "^0.27.4"
}
}
3 changes: 3 additions & 0 deletions packages/test-talon-e2e/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
{
"extends": "../../tsconfig.base.json",
"compilerOptions": {
"types": ["node", "mocha"]
},
"include": [
"src/**/*.ts",
"src/**/*.json",
Expand Down
1 change: 0 additions & 1 deletion packages/test-vscode-e2e/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
"@types/sinon": "^21.0.0",
"@types/vscode": "1.98.0",
"chai": "^6.2.2",
"mocha": "^11.7.5",
"semver": "^7.7.4",
"sinon": "^21.0.3"
}
Expand Down
3 changes: 3 additions & 0 deletions packages/test-vscode-e2e/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
{
"extends": "../../tsconfig.base.json",
"compilerOptions": {
"types": ["node", "mocha"]
},
"include": [
"src/**/*.ts",
"src/**/*.json",
Expand Down
3 changes: 3 additions & 0 deletions packages/tool-meta-updater/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
{
"extends": "../../tsconfig.base.json",
"compilerOptions": {
"types": ["node"]
},
"include": [
"src/**/*.ts",
"src/**/*.json",
Expand Down
Loading
Loading