Skip to content

Commit 991fc6d

Browse files
saidelikeCedric Halbronn
andauthored
move ensureCommandShape into common (required for neovim) (#2318)
## Checklist - [ ] I have added [tests](https://www.cursorless.org/docs/contributing/test-case-recorder/) - [ ] I have updated the [docs](https://github.com/cursorless-dev/cursorless/tree/main/docs) and [cheatsheet](https://github.com/cursorless-dev/cursorless/tree/main/cursorless-talon/src/cheatsheet) - [ ] I have not broken the cheatsheet Co-authored-by: Cedric Halbronn <[email protected]>
1 parent d7df9c3 commit 991fc6d

File tree

5 files changed

+8
-5
lines changed

5 files changed

+8
-5
lines changed

packages/common/src/index.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,9 +94,11 @@ export * from "./util/itertools";
9494
export * from "./extensionDependencies";
9595
export * from "./FakeCommandServerApi";
9696
export * from "./types/TestCaseFixture";
97+
export * from "./util/ensureCommandShape";
9798
export * from "./util/getEnvironmentVariableStrict";
9899
export * from "./util/CompositeKeyDefaultMap";
99100
export * from "./util/toPlainObject";
101+
export * from "./util/type";
100102
export * from "./util/clientSupportsFallback";
101103
export * from "./scopeSupportFacets/scopeSupportFacets.types";
102104
export * from "./scopeSupportFacets/scopeSupportFacetInfos";
Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
1-
import { ActionType, Command, PartialTargetV0V1 } from "@cursorless/common";
2-
import { isString } from "../../util/type";
1+
import { ActionType } from "../types/command/ActionDescriptor";
2+
import { Command } from "../types/command/command.types";
3+
import { PartialTargetV0V1 } from "../types/command/legacy/CommandV0V1.types";
4+
import { isString } from "./type";
35

46
/**
57
* Given a list of arguments, ensure that it has the right shape.

packages/cursorless-engine/src/cursorlessEngine.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import {
44
FileSystem,
55
Hats,
66
IDE,
7+
ensureCommandShape,
78
ScopeProvider,
89
} from "@cursorless/common";
910
import {
@@ -14,7 +15,6 @@ import { Debug } from "./core/Debug";
1415
import { HatTokenMapImpl } from "./core/HatTokenMapImpl";
1516
import { Snippets } from "./core/Snippets";
1617
import { StoredTargetMap } from "./core/StoredTargets";
17-
import { ensureCommandShape } from "./core/commandVersionUpgrades/ensureCommandShape";
1818
import { RangeUpdater } from "./core/updateSelections/RangeUpdater";
1919
import { CustomSpokenFormGeneratorImpl } from "./generateSpokenForm/CustomSpokenFormGeneratorImpl";
2020
import { LanguageDefinitions } from "./languages/LanguageDefinitions";

packages/cursorless-engine/src/processTargets/modifiers/surroundingPair/getIndividualDelimiters.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
1-
import { SimpleSurroundingPairName } from "@cursorless/common";
1+
import { SimpleSurroundingPairName, isString } from "@cursorless/common";
22
import { IndividualDelimiter } from "./types";
33
import { delimiterToText } from "./delimiterMaps";
44
import { concat, uniq } from "lodash";
5-
import { isString } from "../../../util/type";
65

76
/**
87
* Given a list of delimiters, returns a list where each element corresponds to

0 commit comments

Comments
 (0)