Skip to content

Commit 895ce10

Browse files
authored
Clean up barrels (#2524)
## 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
1 parent 02eaebd commit 895ce10

File tree

9 files changed

+101
-104
lines changed

9 files changed

+101
-104
lines changed

packages/cheatsheet/src/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
export * from "./lib/cheatsheet";
2-
export * from "./lib/CheatsheetInfo";
32
export * from "./lib/cheatsheetBodyClasses";
3+
export * from "./lib/CheatsheetInfo";
44
export * from "./lib/fakeCheatsheetInfo";
55
import defaultCheatsheetInfo from "./lib/sampleSpokenFormInfos/defaults.json";
66
export { defaultCheatsheetInfo };

packages/common/src/ide/fake/FakeIDE.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ import FakeConfiguration from "./FakeConfiguration";
2323
import FakeGlobalState from "./FakeGlobalState";
2424
import FakeMessages from "./FakeMessages";
2525

26-
export default class FakeIDE implements IDE {
26+
export class FakeIDE implements IDE {
2727
configuration: FakeConfiguration = new FakeConfiguration();
2828
messages: FakeMessages = new FakeMessages();
2929
globalState: FakeGlobalState = new FakeGlobalState();

packages/common/src/ide/normalized/NormalizedIDE.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { GeneralizedRange } from "../../types/GeneralizedRange";
22
import { TextEditor } from "../../types/TextEditor";
33
import FakeConfiguration from "../fake/FakeConfiguration";
44
import FakeGlobalState from "../fake/FakeGlobalState";
5-
import FakeIDE from "../fake/FakeIDE";
5+
import { FakeIDE } from "../fake/FakeIDE";
66
import PassthroughIDEBase from "../PassthroughIDEBase";
77
import { FlashDescriptor } from "../types/FlashDescriptor";
88
import type { IDE } from "../types/ide.types";

packages/common/src/ide/spy/SpyIDE.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ export interface SpyIDERecordedValues {
1717
highlights?: Highlight[];
1818
}
1919

20-
export default class SpyIDE extends PassthroughIDEBase {
20+
export class SpyIDE extends PassthroughIDEBase {
2121
messages: SpyMessages;
2222
private flashes: FlashDescriptor[] = [];
2323
private highlights: Highlight[] = [];

packages/common/src/index.ts

Lines changed: 81 additions & 84 deletions
Original file line numberDiff line numberDiff line change
@@ -1,112 +1,109 @@
11
export * from "./cursorlessCommandIds";
22
export * from "./cursorlessSideBarIds";
3-
export * from "./testUtil/extractTargetedMarks";
4-
export { default as FakeIDE } from "./ide/fake/FakeIDE";
5-
export type { Message } from "./ide/spy/SpyMessages";
6-
export type { SpyIDERecordedValues } from "./ide/spy/SpyIDE";
7-
export { default as SpyIDE } from "./ide/spy/SpyIDE";
8-
export { HatStability } from "./ide/types/HatStability";
9-
export * from "./util";
10-
export * from "./ide/util/messages";
11-
export { getKey, splitKey } from "./util/splitKey";
12-
export * from "./util/disposableFrom";
13-
export * from "./util/camelCaseToAllDown";
14-
export { Notifier } from "./util/Notifier";
15-
export type { Listener } from "./util/Notifier";
16-
export type { TokenHatSplittingMode } from "./ide/types/Configuration";
17-
export * from "./ide/types/ide.types";
3+
export * from "./errors";
4+
export * from "./extensionDependencies";
5+
export * from "./FakeCommandServerApi";
6+
export * from "./ide/fake/FakeIDE";
7+
export * from "./ide/inMemoryTextDocument/InMemoryTextDocument";
8+
export * from "./ide/normalized/NormalizedIDE";
9+
export * from "./ide/spy/SpyIDE";
10+
export * from "./ide/spy/SpyMessages";
1811
export * from "./ide/types/Capabilities";
19-
export * from "./ide/types/CommandId";
20-
export * from "./ide/types/FlashDescriptor";
2112
export * from "./ide/types/Clipboard";
13+
export * from "./ide/types/CommandHistoryStorage";
14+
export * from "./ide/types/CommandId";
2215
export * from "./ide/types/Configuration";
23-
export * from "./ide/types/State";
16+
export * from "./ide/types/events.types";
17+
export * from "./ide/types/Events";
18+
export * from "./ide/types/FileSystem.types";
19+
export * from "./ide/types/FlashDescriptor";
2420
export * from "./ide/types/Hats";
21+
export * from "./ide/types/HatStability";
22+
export * from "./ide/types/hatStyles.types";
23+
export * from "./ide/types/ide.types";
2524
export * from "./ide/types/Messages";
26-
export * from "./ide/types/Events";
27-
export * from "./ide/types/QuickPickOptions";
28-
export * from "./ide/types/events.types";
2925
export * from "./ide/types/Paths";
30-
export * from "./ide/types/CommandHistoryStorage";
26+
export * from "./ide/types/QuickPickOptions";
3127
export * from "./ide/types/RawTreeSitterQueryProvider";
32-
export * from "./ide/types/FileSystem.types";
33-
export * from "./ide/inMemoryTextDocument/InMemoryTextDocument";
34-
export * from "./types/RangeExpansionBehavior";
35-
export * from "./types/InputBoxOptions";
36-
export * from "./types/Position";
37-
export * from "./types/Range";
38-
export * from "./types/Edit";
39-
export * from "./types/RevealLineAt";
40-
export * from "./types/Selection";
41-
export * from "./types/TextDocument";
42-
export * from "./types/TextEditor";
43-
export * from "./types/TextEditorDecorationType";
44-
export * from "./types/TextEditorEdit";
45-
export * from "./types/TextEditorOptions";
46-
export * from "./types/TextLine";
47-
export * from "./types/Token";
48-
export * from "./types/SpokenFormType";
49-
export * from "./types/HatTokenMap";
50-
export * from "./types/ScopeProvider";
51-
export * from "./types/SpokenForm";
52-
export * from "./types/commandHistory";
53-
export * from "./types/TalonSpokenForms";
54-
export * from "./types/TestHelpers";
55-
export * from "./types/TreeSitter";
56-
export * from "./util/textFormatters";
57-
export * from "./util/regex";
58-
export * from "./util/serializedMarksToTokenHats";
59-
export * from "./types/snippet.types";
28+
export * from "./ide/types/State";
29+
export * from "./ide/util/messages";
30+
export * from "./scopeSupportFacets/languageScopeSupport";
31+
export * from "./scopeSupportFacets/scopeSupportFacetInfos";
32+
export * from "./scopeSupportFacets/scopeSupportFacets.types";
33+
export * from "./scopeSupportFacets/textualScopeSupportFacetInfos";
34+
export * from "./StoredTargetKey";
35+
export * from "./testUtil/asyncSafety";
36+
export * from "./testUtil/extractTargetedMarks";
6037
export * from "./testUtil/fromPlainObject";
61-
export * from "./testUtil/spyToPlainObject";
62-
export { default as DefaultMap } from "./util/DefaultMap";
63-
export * from "./types/GeneralizedRange";
64-
export * from "./types/RangeOffsets";
65-
export * from "./util/omitByDeep";
66-
export * from "./util/range";
67-
export * from "./util/object";
68-
export * from "./util/uniqWithHash";
69-
export * from "./testUtil/testConstants";
38+
export * from "./testUtil/getSnapshotForComparison";
7039
export * from "./testUtil/serialize";
40+
export * from "./testUtil/serializeTestFixture";
7141
export * from "./testUtil/shouldUpdateFixtures";
42+
export * from "./testUtil/spyToPlainObject";
7243
export * from "./testUtil/TestCaseSnapshot";
73-
export * from "./testUtil/serializeTestFixture";
74-
export * from "./testUtil/getSnapshotForComparison";
75-
export * from "./testUtil/asyncSafety";
76-
export * from "./util/typeUtils";
77-
export * from "./ide/types/hatStyles.types";
78-
export * from "./errors";
79-
export * from "./util/CompositeKeyMap";
80-
export * from "./ide/normalized/NormalizedIDE";
44+
export * from "./testUtil/testConstants";
45+
export * from "./types/command/ActionDescriptor";
8146
export * from "./types/command/command.types";
82-
export * from "./types/command/PartialTargetDescriptor.types";
47+
export * from "./types/command/CommandV6.types";
48+
export * from "./types/command/CommandV7.types";
8349
export * from "./types/command/DestinationDescriptor.types";
84-
export * from "./types/command/ActionDescriptor";
50+
export * from "./types/command/legacy/ActionCommandV5";
8551
export * from "./types/command/legacy/CommandV0V1.types";
8652
export * from "./types/command/legacy/CommandV2.types";
8753
export * from "./types/command/legacy/CommandV3.types";
8854
export * from "./types/command/legacy/CommandV4.types";
89-
export * from "./types/command/legacy/targetDescriptorV2.types";
90-
export * from "./types/command/legacy/ActionCommandV5";
9155
export * from "./types/command/legacy/CommandV5.types";
92-
export * from "./types/command/legacy/PartialTargetDescriptorV5.types";
93-
export * from "./types/command/CommandV6.types";
94-
export * from "./types/command/CommandV7.types";
9556
export * from "./types/command/legacy/PartialTargetDescriptorV3.types";
9657
export * from "./types/command/legacy/PartialTargetDescriptorV4.types";
58+
export * from "./types/command/legacy/PartialTargetDescriptorV5.types";
59+
export * from "./types/command/legacy/targetDescriptorV2.types";
60+
export * from "./types/command/PartialTargetDescriptor.types";
61+
export * from "./types/commandHistory";
9762
export * from "./types/CommandServerApi";
98-
export * from "./util/itertools";
99-
export * from "./extensionDependencies";
100-
export * from "./FakeCommandServerApi";
63+
export * from "./types/Edit";
64+
export * from "./types/GeneralizedRange";
65+
export * from "./types/HatTokenMap";
66+
export * from "./types/InputBoxOptions";
67+
export * from "./types/Position";
68+
export * from "./types/Range";
69+
export * from "./types/RangeExpansionBehavior";
70+
export * from "./types/RangeOffsets";
71+
export * from "./types/RevealLineAt";
72+
export * from "./types/ScopeProvider";
73+
export * from "./types/Selection";
74+
export * from "./types/snippet.types";
75+
export * from "./types/SpokenForm";
76+
export * from "./types/SpokenFormType";
77+
export * from "./types/TalonSpokenForms";
10178
export * from "./types/TestCaseFixture";
79+
export * from "./types/TestHelpers";
80+
export * from "./types/TextDocument";
81+
export * from "./types/TextEditor";
82+
export * from "./types/TextEditorDecorationType";
83+
export * from "./types/TextEditorEdit";
84+
export * from "./types/TextEditorOptions";
85+
export * from "./types/TextLine";
86+
export * from "./types/Token";
87+
export * from "./types/TreeSitter";
88+
export * from "./util";
89+
export * from "./util/camelCaseToAllDown";
90+
export * from "./util/clientSupportsFallback";
91+
export * from "./util/CompositeKeyDefaultMap";
92+
export * from "./util/CompositeKeyMap";
93+
export * from "./util/DefaultMap";
94+
export * from "./util/disposableFrom";
10295
export * from "./util/ensureCommandShape";
10396
export * from "./util/getEnvironmentVariableStrict";
104-
export * from "./util/CompositeKeyDefaultMap";
97+
export * from "./util/itertools";
98+
export * from "./util/Notifier";
99+
export * from "./util/object";
100+
export * from "./util/omitByDeep";
101+
export * from "./util/range";
102+
export * from "./util/regex";
103+
export * from "./util/serializedMarksToTokenHats";
104+
export * from "./util/splitKey";
105+
export * from "./util/textFormatters";
105106
export * from "./util/toPlainObject";
106107
export * from "./util/type";
107-
export * from "./util/clientSupportsFallback";
108-
export * from "./scopeSupportFacets/scopeSupportFacets.types";
109-
export * from "./scopeSupportFacets/scopeSupportFacetInfos";
110-
export * from "./scopeSupportFacets/textualScopeSupportFacetInfos";
111-
export * from "./scopeSupportFacets/languageScopeSupport";
112-
export * from "./StoredTargetKey";
108+
export * from "./util/typeUtils";
109+
export * from "./util/uniqWithHash";

packages/common/src/testUtil/getSnapshotForComparison.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { storedTargetKeys } from "../StoredTargetKey";
2-
import SpyIDE from "../ide/spy/SpyIDE";
2+
import { SpyIDE } from "../ide/spy/SpyIDE";
33
import { ReadOnlyHatMap } from "../types/HatTokenMap";
44
import type { TestHelpers } from "../types/TestHelpers";
55
import { marksToPlainObject } from "../util/toPlainObject";

packages/common/src/util/DefaultMap.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
*
44
* Based on https://aaronmoat.com/implementing-pythons-defaultdict-in-javascript/
55
*/
6-
export default class DefaultMap<K, V> extends Map<K, V> {
6+
export class DefaultMap<K, V> extends Map<K, V> {
77
/**
88
* @param getDefaultValue A function that returns the default value for a given key
99
*/
Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
1-
export * from "./testUtil/plainObjectToTarget";
2-
export * from "./core/StoredTargets";
3-
export * from "./cursorlessEngine";
4-
export * from "./generateSpokenForm/defaultSpokenForms/surroundingPairsDelimiters";
5-
export * from "./generateSpokenForm/generateSpokenForm";
6-
export * from "./spokenForms/defaultSpokenFormMap";
71
export * from "./api/CursorlessEngineApi";
8-
export * from "./CommandRunner";
92
export * from "./CommandHistory";
103
export * from "./CommandHistoryAnalyzer";
11-
export * from "./util/grammarHelpers";
12-
export * from "./core/Snippets";
4+
export * from "./CommandRunner";
135
export * from "./core/mergeSnippets";
6+
export * from "./core/Snippets";
7+
export * from "./core/StoredTargets";
148
export * from "./core/StoredTargets";
9+
export * from "./cursorlessEngine";
10+
export * from "./generateSpokenForm/defaultSpokenForms/surroundingPairsDelimiters";
11+
export * from "./generateSpokenForm/generateSpokenForm";
12+
export * from "./singletons/ide.singleton";
13+
export * from "./spokenForms/defaultSpokenFormMap";
1514
export * from "./testUtil/extractTargetKeys";
15+
export * from "./testUtil/plainObjectToTarget";
1616
export * from "./util/getPartialTargetDescriptors";
17-
export * from "./singletons/ide.singleton";
17+
export * from "./util/grammarHelpers";

packages/vscode-common/src/index.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
export * from "./getExtensionApi";
2-
export * from "./TestHelpers";
32
export * from "./notebook";
4-
export * from "./testUtil/openNewEditor";
5-
export * from "./vscodeUtil";
63
export * from "./runCommand";
7-
export * from "./VscodeApi";
84
export * from "./ScopeVisualizerColorConfig";
5+
export * from "./TestHelpers";
6+
export * from "./testUtil/openNewEditor";
7+
export * from "./VscodeApi";
8+
export * from "./vscodeUtil";

0 commit comments

Comments
 (0)