diff --git a/.vscode/tasks.json b/.vscode/tasks.json index faeccc0af8..852c18cdb8 100644 --- a/.vscode/tasks.json +++ b/.vscode/tasks.json @@ -14,7 +14,7 @@ }, { "label": "Build extension and tests", - "dependsOn": ["Build extension", "Build test harness"], + "dependsOn": ["Build extension", "Build test runner"], "group": "build" }, { @@ -29,7 +29,7 @@ // Helper tasks { - "label": "Build test harness", + "label": "Build test runner", "type": "npm", "script": "build", "path": "packages/test-runner", diff --git a/cursorless.nvim/lua/cursorless/init.lua b/cursorless.nvim/lua/cursorless/init.lua index 6226399ed9..a7fc1edd56 100644 --- a/cursorless.nvim/lua/cursorless/init.lua +++ b/cursorless.nvim/lua/cursorless/init.lua @@ -39,7 +39,7 @@ local function register_functions() vim.fn["remote#host#RegisterPlugin"]("node", path .. "/node/test-runner/", { { type = "function", - name = "TestHarnessRun", + name = "TestRunnerRun", sync = false, opts = vim.empty_dict(), }, @@ -55,7 +55,7 @@ local function load_extensions() if os.getenv("CURSORLESS_MODE") == "test" then -- make sure cursorless is loaded before starting the tests vim.uv.sleep(1000) - vim.fn.TestHarnessRun() + vim.fn.TestRunnerRun() else vim.fn.CommandServerLoadExtension() end diff --git a/package.json b/package.json index 3e4b6b5881..2d9263e25c 100644 --- a/package.json +++ b/package.json @@ -12,17 +12,17 @@ "build": "pnpm -r build", "clean": "pnpm -r clean", "typecheck": "pnpm -r typecheck", - "fix:prettier": "prettier --write --list-different .", "lint:meta": "pnpm run meta-updater --test", "lint:syncpack": "syncpack lint", "lint:ts": "eslint packages", - "lint:prettier": "prettier --check .", "lint:style": "stylelint '**/*.{css,scss}' --ignore-path .gitignore", + "lint:fmt": "prettier --check .", "lint": "pnpm run typecheck && pnpm run lint:meta && pnpm run lint:syncpack && pnpm run lint:ts && pnpm run lint:style", "fix:meta": "pnpm run meta-updater && pnpm -r exec prettier --write tsconfig.json package.json", "fix:syncpack": "syncpack fix", "fix:eslint": "pnpm lint:ts --fix", "fix:style": "stylelint '**/*.{css,scss}' --ignore-path .gitignore --fix", + "fix:fmt": "prettier --write --list-different .", "init-vscode-sandbox": "pnpm -F @cursorless/app-vscode init-launch-sandbox", "meta-updater": "env NODE_OPTIONS=--import=tsx meta-updater", "preinstall": "npx only-allow pnpm", diff --git a/packages/app-neovim/scripts/populate-dist.sh b/packages/app-neovim/scripts/populate-dist.sh index cfa534483c..29c9339dcf 100755 --- a/packages/app-neovim/scripts/populate-dist.sh +++ b/packages/app-neovim/scripts/populate-dist.sh @@ -8,7 +8,7 @@ fi echo "CURSORLESS_REPO_ROOT: $CURSORLESS_REPO_ROOT" cursorless_nvim_dir="$CURSORLESS_REPO_ROOT/cursorless.nvim" cursorless_neovim_node_in_dir="$CURSORLESS_REPO_ROOT/packages/app-neovim" -test_harness_node_in_dir="$CURSORLESS_REPO_ROOT/packages/test-runner" +test_runner_node_in_dir="$CURSORLESS_REPO_ROOT/packages/test-runner" if [[ "${CI:-x}" == "true" ]]; then # If running in CI, only copy the necessary files for testing and release @@ -25,10 +25,10 @@ if [[ "${CI:-x}" == "true" ]]; then cp "$cursorless_neovim_node_in_dir/out/index.cjs" "$cursorless_neovim_node_out_dir/out" # Populate test-runner - test_harness_node_out_dir="$cursorless_nvim_dist_dir/node/test-runner" - mkdir -p "$test_harness_node_out_dir/out" - cp "$test_harness_node_in_dir/package.json" "$test_harness_node_out_dir" - cp "$test_harness_node_in_dir/out/extensionTestsNeovim.cjs" "$test_harness_node_out_dir/out" + test_runner_node_out_dir="$cursorless_nvim_dist_dir/node/test-runner" + mkdir -p "$test_runner_node_out_dir/out" + cp "$test_runner_node_in_dir/package.json" "$test_runner_node_out_dir" + cp "$test_runner_node_in_dir/out/extensionTestsNeovim.cjs" "$test_runner_node_out_dir/out" else # Symlink so we inherit the .map files as well, but only if uname doesn't # start with "MINGW" (Windows Git Bash) @@ -43,8 +43,8 @@ else rm -rf "$cursorless_neovim_node_out_dir" ln -s "$cursorless_neovim_node_in_dir" "$cursorless_neovim_node_out_dir" - test_harness_node_out_dir="$cursorless_nvim_dir/node/test-runner" - rm -rf "$test_harness_node_out_dir" - ln -s "$test_harness_node_in_dir" "$test_harness_node_out_dir" + test_runner_node_out_dir="$cursorless_nvim_dir/node/test-runner" + rm -rf "$test_runner_node_out_dir" + ln -s "$test_runner_node_in_dir" "$test_runner_node_out_dir" fi fi diff --git a/packages/app-talon/package.json b/packages/app-talonjs/package.json similarity index 89% rename from packages/app-talon/package.json rename to packages/app-talonjs/package.json index 2abdd88897..f74047c76b 100644 --- a/packages/app-talon/package.json +++ b/packages/app-talonjs/package.json @@ -1,5 +1,5 @@ { - "name": "@cursorless/app-talon", + "name": "@cursorless/app-talonjs", "version": "1.0.0", "description": "cursorless in talon js", "license": "MIT", @@ -18,6 +18,6 @@ }, "dependencies": { "@cursorless/lib-common": "workspace:*", - "@cursorless/lib-talon-core": "workspace:*" + "@cursorless/lib-talonjs-core": "workspace:*" } } diff --git a/packages/app-talon/scripts/esbuild.sh b/packages/app-talonjs/scripts/esbuild.sh similarity index 100% rename from packages/app-talon/scripts/esbuild.sh rename to packages/app-talonjs/scripts/esbuild.sh diff --git a/packages/app-talon/src/extension.ts b/packages/app-talonjs/src/extension.ts similarity index 72% rename from packages/app-talon/src/extension.ts rename to packages/app-talonjs/src/extension.ts index ecccd83e26..0ff6bc359e 100644 --- a/packages/app-talon/src/extension.ts +++ b/packages/app-talonjs/src/extension.ts @@ -1,5 +1,5 @@ import type { RunMode } from "@cursorless/lib-common"; -import { activate as activateCore } from "@cursorless/lib-talon-core"; +import { activate as activateCore } from "@cursorless/lib-talonjs-core"; import * as talon from "talon"; export async function activate(runMode: RunMode): Promise { diff --git a/packages/app-talon/src/mainDevelopment.ts b/packages/app-talonjs/src/mainDevelopment.ts similarity index 100% rename from packages/app-talon/src/mainDevelopment.ts rename to packages/app-talonjs/src/mainDevelopment.ts diff --git a/packages/app-talon/src/mainProduction.ts b/packages/app-talonjs/src/mainProduction.ts similarity index 100% rename from packages/app-talon/src/mainProduction.ts rename to packages/app-talonjs/src/mainProduction.ts diff --git a/packages/app-talon/src/types/talon.d.ts b/packages/app-talonjs/src/types/talon.d.ts similarity index 85% rename from packages/app-talon/src/types/talon.d.ts rename to packages/app-talonjs/src/types/talon.d.ts index 2b53448f87..c4427ec646 100644 --- a/packages/app-talon/src/types/talon.d.ts +++ b/packages/app-talonjs/src/types/talon.d.ts @@ -3,7 +3,7 @@ declare module "talon" { TalonActions, TalonContextConstructor, TalonSettings, - } from "@cursorless/lib-talon-core"; + } from "@cursorless/lib-talonjs-core"; export const actions: TalonActions; export const settings: TalonSettings; diff --git a/packages/app-talon/tsconfig.json b/packages/app-talonjs/tsconfig.json similarity index 100% rename from packages/app-talon/tsconfig.json rename to packages/app-talonjs/tsconfig.json diff --git a/packages/app-vscode/src/createVscodeIde.ts b/packages/app-vscode/src/createVscodeIde.ts index 5870f53235..4bac4e9718 100644 --- a/packages/app-vscode/src/createVscodeIde.ts +++ b/packages/app-vscode/src/createVscodeIde.ts @@ -23,7 +23,7 @@ export async function createVscodeIde(context: ExtensionContext) { await hats.init(); - // FIXME: Inject this from test harness. Would need to arrange to delay + // FIXME: Inject this from test runner. Would need to arrange to delay // extension initialization, probably by returning a function from extension // init that has parameters consisting of test configuration, and have that // function do the actual initialization. diff --git a/packages/app-vscode/src/keyboard/KeyboardCommandsModal.ts b/packages/app-vscode/src/keyboard/KeyboardCommandsModal.ts index abfdb2c843..8979bf059e 100644 --- a/packages/app-vscode/src/keyboard/KeyboardCommandsModal.ts +++ b/packages/app-vscode/src/keyboard/KeyboardCommandsModal.ts @@ -1,7 +1,7 @@ import { CompositeKeyMap } from "@cursorless/lib-common"; import type { VscodeApi } from "@cursorless/lib-vscode-common"; import { pick, sortedUniq, toPairs } from "lodash-es"; -import { Grammar, Parser } from "nearley"; +import nearley from "nearley"; import * as vscode from "vscode"; import { KeyboardCommandHandler } from "./KeyboardCommandHandler"; import { KeyboardCommandsModalLayer } from "./KeyboardCommandsModalLayer"; @@ -33,10 +33,10 @@ export default class KeyboardCommandsModal { string[], KeyboardCommandsModalLayer >((keys) => keys); - private parser!: Parser; + private parser!: nearley.Parser; private sections!: TokenTypeKeyMapMap; private keyboardCommandHandler: KeyboardCommandHandler; - private compiledGrammar = Grammar.fromCompiled(grammar); + private compiledGrammar = nearley.Grammar.fromCompiled(grammar); private keyboardConfig: KeyboardConfig; constructor( @@ -78,7 +78,7 @@ export default class KeyboardCommandsModal { } private resetParser() { - this.parser = new Parser(this.compiledGrammar); + this.parser = new nearley.Parser(this.compiledGrammar); this.computeLayer(); } diff --git a/packages/app-vscode/src/keyboard/grammar/getAcceptableTokenTypes.test.ts b/packages/app-vscode/src/keyboard/grammar/getAcceptableTokenTypes.test.ts index 8e5a0f9d5f..b0639fcf7a 100644 --- a/packages/app-vscode/src/keyboard/grammar/getAcceptableTokenTypes.test.ts +++ b/packages/app-vscode/src/keyboard/grammar/getAcceptableTokenTypes.test.ts @@ -1,5 +1,5 @@ import assert from "assert"; -import { Grammar, Parser } from "nearley"; +import nearley from "nearley"; import type { KeyDescriptor } from "../TokenTypeHelpers"; import grammar from "./generated/grammar"; import type { AcceptableTokenType } from "./getAcceptableTokenTypes"; @@ -132,9 +132,9 @@ const testCases: TestCase[] = [ ]; suite("keyboard.getAcceptableTokenTypes", () => { - let parser: Parser; + let parser: nearley.Parser; setup(() => { - parser = new Parser(Grammar.fromCompiled(grammar)); + parser = new nearley.Parser(nearley.Grammar.fromCompiled(grammar)); }); testCases.forEach(({ tokens, expected }) => { diff --git a/packages/app-vscode/src/keyboard/grammar/getAcceptableTokenTypes.ts b/packages/app-vscode/src/keyboard/grammar/getAcceptableTokenTypes.ts index f878492aab..8680319918 100644 --- a/packages/app-vscode/src/keyboard/grammar/getAcceptableTokenTypes.ts +++ b/packages/app-vscode/src/keyboard/grammar/getAcceptableTokenTypes.ts @@ -1,4 +1,3 @@ -import type { State } from "nearley"; import type nearley from "nearley"; import { isEqual, times } from "lodash-es"; import type { CommandRulePostProcessor } from "./CommandRulePostProcessor"; @@ -95,8 +94,8 @@ export const NEXT = Symbol("next"); function computeRootStatePartialArgs( state: nearley.State, lastSymbol: any = NEXT, - visitCounts = new DefaultMap(() => 0), - roots: { state: State; partialArg: any }[] = [], + visitCounts = new DefaultMap(() => 0), + roots: { state: nearley.State; partialArg: any }[] = [], ) { const visitCount = visitCounts.get(state); if (visitCount > MAX_VISITS) { diff --git a/packages/app-vscode/src/keyboard/grammar/grammar.test.ts b/packages/app-vscode/src/keyboard/grammar/grammar.test.ts index ef105a0b20..7400bab608 100644 --- a/packages/app-vscode/src/keyboard/grammar/grammar.test.ts +++ b/packages/app-vscode/src/keyboard/grammar/grammar.test.ts @@ -1,4 +1,4 @@ -import { Parser, Grammar } from "nearley"; +import nearley from "nearley"; import grammar from "./generated/grammar"; import assert from "assert"; import type { KeyDescriptor } from "../TokenTypeHelpers"; @@ -179,9 +179,9 @@ const testCases: TestCase[] = [ ]; suite("keyboard grammar", () => { - let parser: Parser; + let parser: nearley.Parser; setup(() => { - parser = new Parser(Grammar.fromCompiled(grammar)); + parser = new nearley.Parser(nearley.Grammar.fromCompiled(grammar)); }); testCases.forEach(({ tokens, expected }) => { diff --git a/packages/app-vscode/src/keyboard/grammar/keyboardLexer.ts b/packages/app-vscode/src/keyboard/grammar/keyboardLexer.ts index 6afef2c2bd..369103b117 100644 --- a/packages/app-vscode/src/keyboard/grammar/keyboardLexer.ts +++ b/packages/app-vscode/src/keyboard/grammar/keyboardLexer.ts @@ -1,4 +1,4 @@ -import type { Lexer } from "nearley"; +import type nearley from "nearley"; import type { TokenTypeKeyMapMap } from "../TokenTypeHelpers"; interface LexerState { @@ -17,7 +17,7 @@ interface Token { * method that the parser will then use to transform the token into the actual * value that will be used when constructing rule outputs. */ -class KeyboardLexer implements Lexer { +class KeyboardLexer implements nearley.Lexer { buffer: any[] = []; bufferIndex = 0; index = 0; diff --git a/packages/app-vscode/src/vscodeApi.ts b/packages/app-vscode/src/vscodeApi.ts index 17163dfa77..70ddc1abed 100644 --- a/packages/app-vscode/src/vscodeApi.ts +++ b/packages/app-vscode/src/vscodeApi.ts @@ -3,9 +3,9 @@ import { commands, env, window, workspace } from "vscode"; /** * A very thin wrapper around the VSCode API that allows us to mock it for - * testing. This is necessary because the test harness gets bundled separately + * testing. This is necessary because the test runner gets bundled separately * from the extension code, so if we just import the VSCode API directly from - * the extension code, and from the test harness, we'll end up with two copies + * the extension code, and from the test runner, we'll end up with two copies * of the VSCode API, so the mocks won't work. */ export const vscodeApi: VscodeApi = { diff --git a/packages/app-web-docs/src/docs/contributing/architecture/neovim-test-infrastructure.md b/packages/app-web-docs/src/docs/contributing/architecture/neovim-test-infrastructure.md index 33f0f7a107..777844a161 100644 --- a/packages/app-web-docs/src/docs/contributing/architecture/neovim-test-infrastructure.md +++ b/packages/app-web-docs/src/docs/contributing/architecture/neovim-test-infrastructure.md @@ -11,7 +11,7 @@ launch.json -> .vscode/tasks.json -> nvim -u init.lua init.lua -> CursorlessLoadExtension() - -> TestHarnessRun() -> run() -> runAllTests() -> Mocha -> packages/test-neovim-e2e/src/suite/recorded.neovim.test.ts + -> TestRunnerRun() -> run() -> runAllTests() -> Mocha -> packages/test-neovim-e2e/src/suite/recorded.neovim.test.ts ``` And here is the call path when running Neovim tests on CI: @@ -26,7 +26,7 @@ launchNeovimAndRunTests.ts packages/test-runner/src/config/init.lua -> CursorlessLoadExtension() - -> TestHarnessRun() -> run() -> runAllTests() -> Mocha + packages/test-neovim-e2e/src/suite/recorded.neovim.test.ts + -> TestRunnerRun() -> run() -> runAllTests() -> Mocha + packages/test-neovim-e2e/src/suite/recorded.neovim.test.ts ``` ### Running Neovim tests locally @@ -56,7 +56,7 @@ This effectively runs a series of dependency tasks from `.vscode/tasks.json`: "Neovim: ESBuild", "Neovim: Populate dist", "TSBuild", - "Build test harness", + "Build test runner", "Neovim: Show logs" ], "group": "build" @@ -118,7 +118,7 @@ local function setup(user_config) load_extensions() ``` -First, it calls `register_functions()` to expose the node functions `CursorlessLoadExtension()` and `TestHarnessRun()` into the vim namespace. A side effect is that the `nvim` process loads the `node` process: +First, it calls `register_functions()` to expose the node functions `CursorlessLoadExtension()` and `TestRunnerRun()` into the vim namespace. A side effect is that the `nvim` process loads the `node` process: ```lua local function register_functions() @@ -138,14 +138,14 @@ local function register_functions() vim.fn["remote#host#RegisterPlugin"]("node", path .. "/node/test-runner/", { { type = "function", - name = "TestHarnessRun", + name = "TestRunnerRun", sync = false, opts = vim.empty_dict(), }, }) ``` -Then, it calls `load_extensions()`. This calls the vim functions in order to load the Cursorless neovim plugin (`CursorlessLoadExtension()`) and start the tests (`TestHarnessRun()`) which ends up calling the previously registered node functions. +Then, it calls `load_extensions()`. This calls the vim functions in order to load the Cursorless neovim plugin (`CursorlessLoadExtension()`) and start the tests (`TestRunnerRun()`) which ends up calling the previously registered node functions. ```lua local function load_extensions() @@ -154,20 +154,20 @@ local function load_extensions() if os.getenv("CURSORLESS_MODE") == "test" then -- make sure cursorless is loaded before starting the tests vim.uv.sleep(1000) - vim.fn.TestHarnessRun() + vim.fn.TestRunnerRun() ``` However, because `nvim` was started with `"NVIM_NODE_HOST_DEBUG": "1"`, when `node` is spawned, `node` will hang and wait for a debugger to attach (`--inspect-brk`). Consequently, `nvim` won't finish loading yet (i.e. it won't finish loading `init.lua`). This is handy because it allows VSCode to finish all the tasks required for building the Cursorless neovim package (`app-neovim`, exposed to Neovim under `node/cursorless-neovim`) and the test runner package (`test-runner`, exposed under `node/test-runner`), which will finally trigger VSCode to attach to the `node` process. -When VSCode attaches to the `node` process, `CursorlessLoadExtension()` is called to load the Cursorless neovim plugin and `TestHarnessRun()` is called to start the tests. +When VSCode attaches to the `node` process, `CursorlessLoadExtension()` is called to load the Cursorless neovim plugin and `TestRunnerRun()` is called to start the tests. -This ends up calling `TestHarnessRun()` from `packages/test-runner/src/index.ts` which calls `run()`: +This ends up calling `TestRunnerRun()` from `packages/test-runner/src/index.ts` which calls `run()`: ```ts export default function entry(plugin: NvimPlugin) { - plugin.registerFunction("TestHarnessRun", () => run(plugin), { + plugin.registerFunction("TestRunnerRun", () => run(plugin), { sync: false, }); } @@ -267,7 +267,7 @@ vim.opt.runtimepath:append(repo_root .. "/dist/cursorless.nvim") require("cursorless").setup() ``` -This ends up calling `setup()` from `dist/cursorless.nvim/lua/cursorless/init.lua`, which ends up triggering `TestHarnessRun()` and finally the recorded tests from `recorded.neovim.test.ts` using the Mocha API. +This ends up calling `setup()` from `dist/cursorless.nvim/lua/cursorless/init.lua`, which ends up triggering `TestRunnerRun()` and finally the recorded tests from `recorded.neovim.test.ts` using the Mocha API. NOTE: Because `NVIM_NODE_HOST_DEBUG` is not set on CI, `nvim` loads entirely right away and tests are executed. diff --git a/packages/app-web-docs/src/docs/contributing/architecture/package-scripts.md b/packages/app-web-docs/src/docs/contributing/architecture/package-scripts.md index d0d9dc1213..379eb7bdcd 100644 --- a/packages/app-web-docs/src/docs/contributing/architecture/package-scripts.md +++ b/packages/app-web-docs/src/docs/contributing/architecture/package-scripts.md @@ -63,7 +63,7 @@ Examples include: - `@cursorless/app-neovim` - `@cursorless/app-web` - `@cursorless/app-web-docs` -- `@cursorless/app-talon` +- `@cursorless/app-talonjs` ## Script meanings diff --git a/packages/app-web-docs/src/docs/contributing/tests.md b/packages/app-web-docs/src/docs/contributing/tests.md index d695dbbf52..d9b48f3a2f 100644 --- a/packages/app-web-docs/src/docs/contributing/tests.md +++ b/packages/app-web-docs/src/docs/contributing/tests.md @@ -22,6 +22,6 @@ You can get an overview of the various test contexts that exist locally by looki - `pnpm test` runs the default `test` script for each workspace package. In practice, this is the fast unit-oriented test pass. - `pnpm test:update` runs the test suite in fixture-update mode across the workspace. - `pnpm test:update:subset` runs fixture updates only for the tests selected in `packages/test-runner/testSubsetGrep.properties`. -- `pnpm -F @cursorless/test-runner test:vscode` runs the VSCode test harness. -- `pnpm -F @cursorless/test-runner test:neovim` runs the Neovim test harness. -- `pnpm -F @cursorless/test-runner test:talonJs` runs the Talon-JS test harness. +- `pnpm -F @cursorless/test-runner test:vscode` runs the VSCode test runner. +- `pnpm -F @cursorless/test-runner test:neovim` runs the Neovim test runner. +- `pnpm -F @cursorless/test-runner test:talonJs` runs the Talon-JS test runner. diff --git a/packages/lib-common/scripts/c-tsx.js b/packages/lib-common/scripts/c-tsx.js index 93783e56b1..bfe7f4615b 100755 --- a/packages/lib-common/scripts/c-tsx.js +++ b/packages/lib-common/scripts/c-tsx.js @@ -1,15 +1,12 @@ #!/usr/bin/env node /* global process, console */ -// This script runs a TypeScript file using Node.js by first bundling it with -// esbuild. +// This script runs a TypeScript file using tsx after setting repo-specific +// environment variables. import { spawn } from "cross-spawn"; -import { build } from "esbuild"; -import { existsSync, mkdirSync, rmSync } from "node:fs"; import { fileURLToPath } from "node:url"; import { dirname, join } from "node:path"; -import { randomBytes } from "node:crypto"; /** * Run a command with arguments and return a child process @@ -27,33 +24,6 @@ function runCommand(command, args, extraEnv = {}) { }); } -/** - * Create a temporary directory and return its path - * @param {string} baseDir - */ -function createTempDirectory(baseDir) { - const tempDir = join( - baseDir, - "out", - "c-tsx-tmp", - randomBytes(16).toString("hex"), - ); - - mkdirSync(tempDir, { recursive: true }); - - return tempDir; -} - -/** - * Clean up the temporary directory - * @param {import("fs").PathLike} tempDir - */ -function cleanupTempDirectory(tempDir) { - if (existsSync(tempDir)) { - rmSync(tempDir, { recursive: true }); - } -} - // Main function to execute the script async function main() { const args = process.argv.slice(2); @@ -67,35 +37,12 @@ async function main() { const [fileToRun, ...childArgs] = args; - // Note that the temporary directory must be in the workspace root, otherwise - // VSCode will ignore the source maps, and breakpoints will not work. - const tempDir = createTempDirectory(process.cwd()); - const outFile = join(tempDir, "out.cjs"); - - // Set up cleanup for when the script exits - process.on("exit", () => cleanupTempDirectory(tempDir)); - process.on("SIGINT", () => cleanupTempDirectory(tempDir)); - process.on("SIGTERM", () => cleanupTempDirectory(tempDir)); - - // Run esbuild to bundle the TypeScript file - await build({ - entryPoints: [fileToRun], - sourcemap: true, - conditions: ["cursorless:bundler"], - logLevel: "warning", - platform: "node", - bundle: true, - format: "cjs", - outfile: outFile, - external: ["./reporters/parallel-buffered", "./worker.js"], - }); - const scriptDirectory = dirname(fileURLToPath(import.meta.url)); const repoRoot = join(scriptDirectory, "..", "..", ".."); const nodeProcess = runCommand( - process.execPath, - ["--enable-source-maps", outFile, ...childArgs], + "tsx", + ["--enable-source-maps", fileToRun, ...childArgs], { ["CURSORLESS_REPO_ROOT"]: repoRoot, }, diff --git a/packages/lib-engine/src/customCommandGrammar/parseCommand.ts b/packages/lib-engine/src/customCommandGrammar/parseCommand.ts index 8a9582cb62..22baa98c55 100644 --- a/packages/lib-engine/src/customCommandGrammar/parseCommand.ts +++ b/packages/lib-engine/src/customCommandGrammar/parseCommand.ts @@ -1,17 +1,17 @@ import type { ActionDescriptor, ScopeType } from "@cursorless/lib-common"; -import { Grammar, Parser } from "nearley"; +import nearley from "nearley"; import type { WithPlaceholders } from "./WithPlaceholders"; import grammar from "./generated/grammar"; -function getScopeTypeParser(): Parser { - return new Parser( +function getScopeTypeParser(): nearley.Parser { + return new nearley.Parser( // eslint-disable-next-line @typescript-eslint/naming-convention - Grammar.fromCompiled({ ...grammar, ParserStart: "scopeType" }), + nearley.Grammar.fromCompiled({ ...grammar, ParserStart: "scopeType" }), ); } -function getActionParser(): Parser { - return new Parser(Grammar.fromCompiled(grammar)); +function getActionParser(): nearley.Parser { + return new nearley.Parser(nearley.Grammar.fromCompiled(grammar)); } /** diff --git a/packages/lib-engine/src/test/fixtures/communitySnippets.fixture.ts b/packages/lib-engine/src/test/fixtures/communitySnippets.fixture.ts index 9e00d55945..68a6912e9a 100644 --- a/packages/lib-engine/src/test/fixtures/communitySnippets.fixture.ts +++ b/packages/lib-engine/src/test/fixtures/communitySnippets.fixture.ts @@ -17,18 +17,10 @@ const snippetAfterAction: ActionDescriptor = { }, snippetDescription: { type: "list", - // This will be the current active language - fallbackLanguage: "typescript", snippets: [ { type: "custom", - languages: [ - "javascript", - "typescript", - "javascriptreact", - "typescriptreact", - ], - body: 'import * as $0 from "$0";', + body: "```$0\n$1\n```", }, ], }, @@ -40,5 +32,5 @@ const snippetAfterAction: ActionDescriptor = { * Talon tests by relying on our recorded test fixtures alone. */ export const communitySnippetsSpokenFormsFixture = [ - spokenFormTest("snip import star after air", snippetAfterAction, undefined), + spokenFormTest("snip code after air", snippetAfterAction, undefined), ]; diff --git a/packages/lib-engine/src/testUtil/TestTreeSitter.ts b/packages/lib-engine/src/testUtil/TestTreeSitter.ts index 3aacb04b0d..30c17a765b 100644 --- a/packages/lib-engine/src/testUtil/TestTreeSitter.ts +++ b/packages/lib-engine/src/testUtil/TestTreeSitter.ts @@ -1,34 +1,15 @@ import type { TextDocument, TreeSitter } from "@cursorless/lib-common"; -import { createRequire } from "node:module"; import * as path from "node:path"; -import type { - Tree, - Language as TreeSitterLanguage, - Parser as TreeSitterParser, - Query as TreeSitterQuery, -} from "web-tree-sitter"; +import { getCursorlessRepoRoot } from "@cursorless/lib-node-common"; +import type { Tree } from "web-tree-sitter"; +import { Parser, Query, Language } from "web-tree-sitter"; -// Force the CommonJS entrypoint because the ESM one crashes in this test -// runtime before we get a chance to initialize tree-sitter. -const moduleRequire = createRequire(__filename); - -const { - Language, - Parser, - Query, -}: { - // eslint-disable-next-line @typescript-eslint/consistent-type-imports - Parser: typeof import("web-tree-sitter").Parser; - Language: typeof TreeSitterLanguage; - Query: typeof TreeSitterQuery; -} = moduleRequire("web-tree-sitter"); - -interface Language { - language: TreeSitterLanguage; - parser: TreeSitterParser; +interface LanguageConf { + language: Language; + parser: Parser; } -const languageCache = new Map(); +const languageCache = new Map(); let initPromise: Promise | undefined; function initTreeSitter() { @@ -73,7 +54,7 @@ export class TestTreeSitter implements TreeSitter { return true; } - createQuery(languageId: string, source: string): TreeSitterQuery | undefined { + createQuery(languageId: string, source: string): Query | undefined { const language = languageCache.get(languageId); if (language == null) { return undefined; @@ -83,11 +64,10 @@ export class TestTreeSitter implements TreeSitter { } function getWasmFilePath(parserName: string) { - const fileName = `${parserName}.wasm`; return path.join( - __dirname, - "../../../../node_modules/@cursorless/tree-sitter-wasms/out", - fileName, + getCursorlessRepoRoot(), + "packages/test-runner/node_modules/@cursorless/tree-sitter-wasms/out", + `${parserName}.wasm`, ); } diff --git a/packages/lib-talon-core/package.json b/packages/lib-talonjs-core/package.json similarity index 92% rename from packages/lib-talon-core/package.json rename to packages/lib-talonjs-core/package.json index 36a5826225..31ec4d1476 100644 --- a/packages/lib-talon-core/package.json +++ b/packages/lib-talonjs-core/package.json @@ -1,5 +1,5 @@ { - "name": "@cursorless/lib-talon-core", + "name": "@cursorless/lib-talonjs-core", "version": "1.0.0", "description": "cursorless in talon js core packagee", "license": "MIT", diff --git a/packages/lib-talon-core/src/README.md b/packages/lib-talonjs-core/src/README.md similarity index 100% rename from packages/lib-talon-core/src/README.md rename to packages/lib-talonjs-core/src/README.md diff --git a/packages/lib-talon-core/src/constructTestHelpers.ts b/packages/lib-talonjs-core/src/constructTestHelpers.ts similarity index 100% rename from packages/lib-talon-core/src/constructTestHelpers.ts rename to packages/lib-talonjs-core/src/constructTestHelpers.ts diff --git a/packages/lib-talon-core/src/extension.ts b/packages/lib-talonjs-core/src/extension.ts similarity index 100% rename from packages/lib-talon-core/src/extension.ts rename to packages/lib-talonjs-core/src/extension.ts diff --git a/packages/lib-talon-core/src/ide/TalonJsCapabilities.ts b/packages/lib-talonjs-core/src/ide/TalonJsCapabilities.ts similarity index 100% rename from packages/lib-talon-core/src/ide/TalonJsCapabilities.ts rename to packages/lib-talonjs-core/src/ide/TalonJsCapabilities.ts diff --git a/packages/lib-talon-core/src/ide/TalonJsClipboard.ts b/packages/lib-talonjs-core/src/ide/TalonJsClipboard.ts similarity index 100% rename from packages/lib-talon-core/src/ide/TalonJsClipboard.ts rename to packages/lib-talonjs-core/src/ide/TalonJsClipboard.ts diff --git a/packages/lib-talon-core/src/ide/TalonJsConfiguration.ts b/packages/lib-talonjs-core/src/ide/TalonJsConfiguration.ts similarity index 100% rename from packages/lib-talon-core/src/ide/TalonJsConfiguration.ts rename to packages/lib-talonjs-core/src/ide/TalonJsConfiguration.ts diff --git a/packages/lib-talon-core/src/ide/TalonJsIDE.ts b/packages/lib-talonjs-core/src/ide/TalonJsIDE.ts similarity index 100% rename from packages/lib-talon-core/src/ide/TalonJsIDE.ts rename to packages/lib-talonjs-core/src/ide/TalonJsIDE.ts diff --git a/packages/lib-talon-core/src/ide/TalonJsKeyValueStore.ts b/packages/lib-talonjs-core/src/ide/TalonJsKeyValueStore.ts similarity index 100% rename from packages/lib-talon-core/src/ide/TalonJsKeyValueStore.ts rename to packages/lib-talonjs-core/src/ide/TalonJsKeyValueStore.ts diff --git a/packages/lib-talon-core/src/ide/TalonJsMessages.ts b/packages/lib-talonjs-core/src/ide/TalonJsMessages.ts similarity index 100% rename from packages/lib-talon-core/src/ide/TalonJsMessages.ts rename to packages/lib-talonjs-core/src/ide/TalonJsMessages.ts diff --git a/packages/lib-talon-core/src/ide/TalonJsTestHats.ts b/packages/lib-talonjs-core/src/ide/TalonJsTestHats.ts similarity index 100% rename from packages/lib-talon-core/src/ide/TalonJsTestHats.ts rename to packages/lib-talonjs-core/src/ide/TalonJsTestHats.ts diff --git a/packages/lib-talon-core/src/ide/flashRanges.ts b/packages/lib-talonjs-core/src/ide/flashRanges.ts similarity index 100% rename from packages/lib-talon-core/src/ide/flashRanges.ts rename to packages/lib-talonjs-core/src/ide/flashRanges.ts diff --git a/packages/lib-talon-core/src/ide/toCharacterRangeOffsets.ts b/packages/lib-talonjs-core/src/ide/toCharacterRangeOffsets.ts similarity index 100% rename from packages/lib-talon-core/src/ide/toCharacterRangeOffsets.ts rename to packages/lib-talonjs-core/src/ide/toCharacterRangeOffsets.ts diff --git a/packages/lib-talon-core/src/index.ts b/packages/lib-talonjs-core/src/index.ts similarity index 100% rename from packages/lib-talon-core/src/index.ts rename to packages/lib-talonjs-core/src/index.ts diff --git a/packages/lib-talon-core/src/polyfill.ts b/packages/lib-talonjs-core/src/polyfill.ts similarity index 100% rename from packages/lib-talon-core/src/polyfill.ts rename to packages/lib-talonjs-core/src/polyfill.ts diff --git a/packages/lib-talon-core/src/registerCommands.ts b/packages/lib-talonjs-core/src/registerCommands.ts similarity index 100% rename from packages/lib-talon-core/src/registerCommands.ts rename to packages/lib-talonjs-core/src/registerCommands.ts diff --git a/packages/lib-talon-core/src/types/talon.ts b/packages/lib-talonjs-core/src/types/talon.ts similarity index 100% rename from packages/lib-talon-core/src/types/talon.ts rename to packages/lib-talonjs-core/src/types/talon.ts diff --git a/packages/lib-talon-core/src/types/types.ts b/packages/lib-talonjs-core/src/types/types.ts similarity index 100% rename from packages/lib-talon-core/src/types/types.ts rename to packages/lib-talonjs-core/src/types/types.ts diff --git a/packages/lib-talon-core/tsconfig.json b/packages/lib-talonjs-core/tsconfig.json similarity index 100% rename from packages/lib-talon-core/tsconfig.json rename to packages/lib-talonjs-core/tsconfig.json diff --git a/packages/test-runner/README.md b/packages/test-runner/README.md index 5ed7beb20f..4c41a3ca2d 100644 --- a/packages/test-runner/README.md +++ b/packages/test-runner/README.md @@ -1,7 +1,7 @@ -# Test harness +# Test runner This package contains the machinery used to test Cursorless, both in CI and locally, across various contexts (eg VSCode, Talon, Neovim, unit tests). Note that it does not actually contain any tests itself; those are either embedded in `.test.ts` files either next to the code they're testing or in standalone `*-e2e` packages. This package bundles tests into `.mjs` files and includes scripts used to run tests. -Note that we currently have a hack where the `package.json` here appears as if it is only used for Neovim. That is because none of our other test runners require a `package.json`, so they are happy to ignore fields such as `main` that are required for Neovim to be able to import the test harness. See [#2564](https://github.com/cursorless-dev/cursorless/issues/2564) to track progress on a more elegant solution. +Note that we currently have a hack where the `package.json` here appears as if it is only used for Neovim. That is because none of our other test runners require a `package.json`, so they are happy to ignore fields such as `main` that are required for Neovim to be able to import the test runner. See [#2564](https://github.com/cursorless-dev/cursorless/issues/2564) to track progress on a more elegant solution. diff --git a/packages/test-runner/scripts/compile-esbuild.sh b/packages/test-runner/scripts/compile-esbuild.sh index 926026df28..9e4977107a 100755 --- a/packages/test-runner/scripts/compile-esbuild.sh +++ b/packages/test-runner/scripts/compile-esbuild.sh @@ -12,5 +12,5 @@ set -euo pipefail --outfile=out/extensionTestsNeovim.cjs # Compile test cases -find .. -name '*.test.ts' -print0 | +find .. \( -name '*.vscode.test.ts' -o -name '*.neovim.test.ts' \) -print0 | xargs -0 -n 50 ./scripts/run-esbuild.sh --outdir=out --out-extension:.js=.cjs diff --git a/packages/test-runner/src/runAllTests.ts b/packages/test-runner/src/runAllTests.ts index 4225119ee5..0d3fce74eb 100644 --- a/packages/test-runner/src/runAllTests.ts +++ b/packages/test-runner/src/runAllTests.ts @@ -4,7 +4,6 @@ import Mocha from "mocha"; import * as path from "node:path"; import { logFailedTests, - runTestSubset, shouldLogFailedTests, testSubsetGrepString, } from "./testSubset"; @@ -14,61 +13,70 @@ import { */ export enum TestType { /** Unit tests can be run without VSCode or Talon or Neovim */ - unit, + unit = "test", /** VSCode tests must be run from VSCode context */ - vscode, + vscode = "vscode.test", /** Talon tests require a running Talon instance */ - talon, + talon = "talon.test", - /** Talon everywhere/JS tests can be run without VSCode or Talon */ - talonJs, + /** Talon-JS tests can be run without VSCode or Talon */ + talonJs = "talonjs.test", /** Neovim tests must be run from Neovim context */ - neovim, + neovim = "neovim.test", } export function runAllTests(type: TestType): Promise { parseArgumentsAndUpdateEnv(); - return runTestsInDir( - path.join(getCursorlessRepoRoot(), "packages"), - (files) => - files.filter((f) => { - if (f.endsWith("neovim.test.cjs")) { - return type === TestType.neovim; - } - - if (f.endsWith("vscode.test.cjs")) { - return type === TestType.vscode; - } - - if (f.endsWith("talon.test.cjs")) { - return type === TestType.talon; - } - - if (f.endsWith("talonjs.test.cjs")) { - return type === TestType.talonJs; - } + const testRoot = path.join(getCursorlessRepoRoot(), "packages"); + + let filePattern: string; + let ignore: string[] | undefined = undefined; + + switch (type) { + case TestType.unit: + filePattern = "test.ts"; + ignore = [ + TestType.vscode, + TestType.talon, + TestType.talonJs, + TestType.neovim, + ].map((t) => `**/*.${t}.ts`); + break; + + case TestType.talon: + case TestType.talonJs: + filePattern = `${type}.ts`; + break; + + // These tests have to be .cjs files because they import vscode and neovim modules which don't work with ts files + case TestType.vscode: + case TestType.neovim: + filePattern = `${type}.cjs`; + } - return type === TestType.unit; - }), - ); + return runTestsInDir(testRoot, filePattern, ignore); } async function runTestsInDir( testRoot: string, - filterFiles: (files: string[]) => string[], + filePattern: string, + ignore: string[] | undefined, ): Promise { // Create the mocha test const mocha = new Mocha({ ui: "tdd", color: true, - grep: runTestSubset() ? testSubsetGrepString() : undefined, // Only run a subset of tests + grep: testSubsetGrepString(), // Only run a subset of tests }); - const files = filterFiles(await glob("**/**.test.cjs", { cwd: testRoot })); + const files = await glob(`**/*.${filePattern}`, { + cwd: testRoot, + ignore, + }); if (files.length === 0) { throw new Error( diff --git a/packages/test-runner/src/runners/extensionTestsNeovim.ts b/packages/test-runner/src/runners/extensionTestsNeovim.ts index 58c95a5698..d863216397 100644 --- a/packages/test-runner/src/runners/extensionTestsNeovim.ts +++ b/packages/test-runner/src/runners/extensionTestsNeovim.ts @@ -37,7 +37,7 @@ export async function run(plugin: NvimPlugin): Promise { * Note that these function need to start with a capital letter to be callable from Neovim. */ export default function entry(plugin: NvimPlugin) { - plugin.registerFunction("TestHarnessRun", () => run(plugin), { + plugin.registerFunction("TestRunnerRun", () => run(plugin), { sync: false, }); } diff --git a/packages/test-runner/src/testSubset.ts b/packages/test-runner/src/testSubset.ts index a7dad16e1e..a48c53b975 100644 --- a/packages/test-runner/src/testSubset.ts +++ b/packages/test-runner/src/testSubset.ts @@ -4,12 +4,15 @@ import { getCursorlessRepoRoot } from "@cursorless/lib-node-common"; /** * Returns the grep string to pass to Mocha when running a subset of tests. - * @returns the grep string to pass to Mocha: + * @returns the grep string to pass to Mocha when running a subset of tests, + * or `undefined` if we are not running a subset of tests. */ -export function testSubsetGrepString(): string { - const inFile = testSubsetFilePath(); +export function testSubsetGrepString(): string | undefined { + if (!runTestSubset()) { + return undefined; + } return fs - .readFileSync(inFile, "utf-8") + .readFileSync(testSubsetFilePath(), "utf-8") .split(/\r?\n/) .map((line) => line.trim()) .filter((line) => line.length > 0 && !line.startsWith("#")) @@ -48,7 +51,7 @@ export function logFailedTests(testNames: string[]) { * {@link TEST_SUBSET_GREP_STRING}. * @returns `true` if we are using the run test subset launch config */ -export function runTestSubset() { +function runTestSubset() { return process.env.CURSORLESS_RUN_TEST_SUBSET === "true"; } diff --git a/packages/test-talon-e2e/package.json b/packages/test-talon-e2e/package.json index 7bc4837340..d266bb320a 100644 --- a/packages/test-talon-e2e/package.json +++ b/packages/test-talon-e2e/package.json @@ -13,7 +13,7 @@ "dependencies": { "@cursorless/lib-common": "workspace:*", "@cursorless/lib-node-common": "workspace:*", - "@cursorless/lib-talon-core": "workspace:*", + "@cursorless/lib-talonjs-core": "workspace:*", "@cursorless/lib-test-case-recorder": "workspace:*" }, "devDependencies": { diff --git a/packages/test-talon-e2e/src/constructTestHelpers.ts b/packages/test-talon-e2e/src/constructTestHelpers.ts index fc86ab343f..5c0a17371d 100644 --- a/packages/test-talon-e2e/src/constructTestHelpers.ts +++ b/packages/test-talon-e2e/src/constructTestHelpers.ts @@ -7,7 +7,7 @@ import type { TestHelpers, TextEditor, } from "@cursorless/lib-common"; -import type { TalonJsTestHelpers } from "@cursorless/lib-talon-core"; +import type { TalonJsTestHelpers } from "@cursorless/lib-talonjs-core"; import { takeSnapshot } from "@cursorless/lib-test-case-recorder"; export function constructTestHelpers( diff --git a/packages/test-talon-e2e/src/endToEndTestSetUp.ts b/packages/test-talon-e2e/src/endToEndTestSetUp.ts index 4258063931..a9037a53f4 100644 --- a/packages/test-talon-e2e/src/endToEndTestSetUp.ts +++ b/packages/test-talon-e2e/src/endToEndTestSetUp.ts @@ -1,5 +1,5 @@ import { type IDE, SpyIDE } from "@cursorless/lib-common"; -import type { TalonJsTestHelpers } from "@cursorless/lib-talon-core"; +import type { TalonJsTestHelpers } from "@cursorless/lib-talonjs-core"; import type { Context } from "mocha"; interface EndToEndTestSetupOpts { diff --git a/packages/test-talon-e2e/src/quickjsTest.ts b/packages/test-talon-e2e/src/quickjsTest.ts index 98e2d6c3d7..8d18236a15 100644 --- a/packages/test-talon-e2e/src/quickjsTest.ts +++ b/packages/test-talon-e2e/src/quickjsTest.ts @@ -3,7 +3,7 @@ import { type ActionDescriptor, type CommandLatest, } from "@cursorless/lib-common"; -import { activate } from "@cursorless/lib-talon-core"; +import { activate } from "@cursorless/lib-talonjs-core"; import * as std from "std"; import { talonMock } from "./talonMock"; diff --git a/packages/test-talon-e2e/src/recorded.talonjs.test.ts b/packages/test-talon-e2e/src/recorded.talonjs.test.ts index 857b9568d3..4d1ce9701d 100644 --- a/packages/test-talon-e2e/src/recorded.talonjs.test.ts +++ b/packages/test-talon-e2e/src/recorded.talonjs.test.ts @@ -7,7 +7,7 @@ import { activate, type EditorState, type TalonJsIDE, -} from "@cursorless/lib-talon-core"; +} from "@cursorless/lib-talonjs-core"; import { getRecordedTestPaths, loadFixture, diff --git a/packages/test-talon-e2e/src/talonMock.ts b/packages/test-talon-e2e/src/talonMock.ts index 6d4f60ca97..700f978e92 100644 --- a/packages/test-talon-e2e/src/talonMock.ts +++ b/packages/test-talon-e2e/src/talonMock.ts @@ -7,7 +7,7 @@ import type { TalonContext, TalonContextActions, TalonSettings, -} from "@cursorless/lib-talon-core"; +} from "@cursorless/lib-talonjs-core"; import type { TalonTestHelpers } from "./types/talon"; let _contextActions: TalonContextActions | undefined; diff --git a/packages/test-talon-e2e/src/types/cursorless.ts b/packages/test-talon-e2e/src/types/cursorless.ts index 14a979880d..f50708fdff 100644 --- a/packages/test-talon-e2e/src/types/cursorless.ts +++ b/packages/test-talon-e2e/src/types/cursorless.ts @@ -1,5 +1,5 @@ import type { RunMode } from "@cursorless/lib-common"; -import type { ActivateReturnValue, Talon } from "@cursorless/lib-talon-core"; +import type { ActivateReturnValue, Talon } from "@cursorless/lib-talonjs-core"; export interface Extension { activate(talon: Talon, runMode: RunMode): Promise; diff --git a/packages/test-talon-e2e/src/types/talon.ts b/packages/test-talon-e2e/src/types/talon.ts index 0ced2475f4..4efe06bd92 100644 --- a/packages/test-talon-e2e/src/types/talon.ts +++ b/packages/test-talon-e2e/src/types/talon.ts @@ -1,7 +1,7 @@ import type { EditorState, TalonContextActions, -} from "@cursorless/lib-talon-core"; +} from "@cursorless/lib-talonjs-core"; export interface TalonTestHelpers { contextActions: TalonContextActions; diff --git a/packages/tool-meta-updater/src/updatePackageJson.ts b/packages/tool-meta-updater/src/updatePackageJson.ts index 1be2f4c6f9..e55be4d120 100644 --- a/packages/tool-meta-updater/src/updatePackageJson.ts +++ b/packages/tool-meta-updater/src/updatePackageJson.ts @@ -33,7 +33,7 @@ export async function updatePackageJson( const isCursorlessVscode = input.name === "@cursorless/app-vscode"; const isCursorlessNeovim = input.name === "@cursorless/app-neovim"; const isCursorlessOrgDocs = input.name === "@cursorless/app-web-docs"; - const isCursorlessTestHarness = input.name === "@cursorless/test-runner"; + const isCursorlessTestRunner = input.name === "@cursorless/test-runner"; if (input.description == null || input.description === "") { throw new Error(`No description found in ${packageDir}/package.json`); @@ -57,13 +57,9 @@ export async function updatePackageJson( delete input.types; delete input.exports; // Extensions need a main field, but other non-lib packages shouldn't have - // one. The test harness is a special case since it's technically not a + // one. The test runner is a special case since it's technically not a // library but still requires main for the neovim tests. - if ( - !isCursorlessVscode && - !isCursorlessNeovim && - !isCursorlessTestHarness - ) { + if (!isCursorlessVscode && !isCursorlessNeovim && !isCursorlessTestRunner) { delete input.main; } } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 54498ae9e2..ecd59f1739 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -124,14 +124,14 @@ importers: specifier: ^3.1.0 version: 3.1.0 - packages/app-talon: + packages/app-talonjs: dependencies: '@cursorless/lib-common': specifier: workspace:* version: link:../lib-common - '@cursorless/lib-talon-core': + '@cursorless/lib-talonjs-core': specifier: workspace:* - version: link:../lib-talon-core + version: link:../lib-talonjs-core packages/app-vscode: dependencies: @@ -616,7 +616,7 @@ importers: specifier: ^11.7.5 version: 11.7.5 - packages/lib-talon-core: + packages/lib-talonjs-core: dependencies: '@cursorless/lib-common': specifier: workspace:* @@ -811,9 +811,9 @@ importers: '@cursorless/lib-node-common': specifier: workspace:* version: link:../lib-node-common - '@cursorless/lib-talon-core': + '@cursorless/lib-talonjs-core': specifier: workspace:* - version: link:../lib-talon-core + version: link:../lib-talonjs-core '@cursorless/lib-test-case-recorder': specifier: workspace:* version: link:../lib-test-case-recorder diff --git a/tsconfig.base.json b/tsconfig.base.json index f8d7e54b8d..c5963ed8a1 100644 --- a/tsconfig.base.json +++ b/tsconfig.base.json @@ -19,7 +19,7 @@ "@cursorless/lib-neovim-registry": ["./packages/lib-neovim-registry"], "@cursorless/lib-node-common": ["./packages/lib-node-common"], "@cursorless/lib-sentence-parser": ["./packages/lib-sentence-parser"], - "@cursorless/lib-talon-core": ["./packages/lib-talon-core"], + "@cursorless/lib-talonjs-core": ["./packages/lib-talonjs-core"], "@cursorless/lib-test-case-recorder": [ "./packages/lib-test-case-recorder" ], diff --git a/tsconfig.json b/tsconfig.json index ba37720134..c002ac6c4f 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -6,7 +6,7 @@ "path": "./packages/app-neovim" }, { - "path": "./packages/app-talon" + "path": "./packages/app-talonjs" }, { "path": "./packages/app-vscode" @@ -42,7 +42,7 @@ "path": "./packages/lib-sentence-parser" }, { - "path": "./packages/lib-talon-core" + "path": "./packages/lib-talonjs-core" }, { "path": "./packages/lib-test-case-recorder"